Skip to content

Send forecast

POST
/api-connector/forecast
curl --request POST \
--url https://api.tradecloud1.com/v2/api-connector/forecast \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "header": { "companyId": "00f03b98-2511-489f-9695-13791b3f66b6", "supplierAccountNumber": "12345", "forecastNumber": "F123456789" }, "lines": [ { "item": { "buyerItemNumber": "12345", "buyerItemRevision": "v2", "buyerItemName": "Round tube ø60x45", "supplierItemNumber": "67890", "purchaseUnitOfMeasureIso": "PCE" }, "schedule": [ { "startDate": "2023-01-01", "endDate": "2023-01-31", "quantity": 1234.56 } ] } ], "issueDateTime": "2022-12-31T10:11:12" }'

Send a new forecast for one supplier. Requires buyer and integration roles.

Send forecast by buyer

Media typeapplication/json
object
header
required

The header of the forecast, which is targeted at only one supplier.

object
companyId

The optional Tradecloud company ID of the buyer. Only needed when the integration user is authorized for multiple companies.

string format: uuid

Example

00f03b98-2511-489f-9695-13791b3f66b6
supplierAccountNumber
required

The mandatory supplier account code or number as known in your forecast or ERP system and added to the supplier connection in the Tradecloud portal.

string

Example

12345
forecastNumber
required

The mandatory forecast code or number as known in your forecast or ERP system. The number must be the same for each supplier forecast from the same generated forecast.

string

Example

F123456789
lines
required

The lines of this forecast, each consisting of an item and forecast schedule.

Array<object>

A forecast line contains an item and a schedule with forecasted demands per period.

object
item
required

The forecasted item (or article, goods).

object
buyerItemNumber
required

The item code or number as known in your forecast or ERP system. An item number should be unique and immutable.

string

Example

12345
buyerItemRevision

The revision (or version) of this item.

string

Example

v2
buyerItemName
required

The short name of this item.

string

Example

Round tube ø60x45
supplierItemNumber

The item code or number as known by your supplier. Advised in case of wholesale suppliers.

string

Example

67890
purchaseUnitOfMeasureIso
required

The purchase unit of measure for this item, passed through as-is to the supplier. No standard is enforced; UN/ECE Recommendation N°20 (Codes for Units of Measure) is recommended if you want a standard.

string

Example

PCE
schedule
required

The forecast schedule lines for this item, each consisting of a forecast period and forecasted demand during this period.

Array<object>

A forecast period and the forecasted demand during this period.

object
startDate
required

The first day of this forecast period. Date has ISO 8601 date format.

string format: YYYY-MM-DD

Example

2023-01-01
endDate
required

The last day of this forecast period. Date has ISO 8601 date format.

string format: YYYY-MM-DD

Example

2023-01-31
quantity
required

The forecasted demand in this period. Quantity has a decimal format.

number

Example

1234.56
issueDateTime

ISO local date and time at which the forecast was originally issued in your forecast or ERP system.

string format: YYYY-MM-DDThh:mm:ss

Example

2022-12-31T10:11:12

Successfully verified and sent forecast.

Successfully queued forecast. The forecast has not yet been verified.

Bad request, the user should check the response body for more info.

Media type*/*
object
code
required
string

Example

missing.property
message
required
string

Example

Property X was missing

Not authenticated, the user should authenticate using a valid access token, use Basic Authentication, or refresh to get a valid token. May or may not contain a structured response body

Media type*/*
object
message
required
string

Example

Authentication failed
attemptsLeft

The number of authentication attempts left before the user is banned. Applicable when authentication through Basic Authentication fails.

integer

Example

2
banned

Int describing the number of seconds left before the user is allowed to attempt a login with Basic Authentication again.

integer

Example

300

Not authorized, the user is authenticated but does not have the necessary permission.

Media type*/*
object
message
required
string

Example

Not authorized for this action

Supplier not found.

An unexpected error occurred, Tradecloud ops will be alerted. May or may not contain a structured response body.

Media type*/*
object
code
required
string

Example

some.error
message
required
string

Example

Some error occurred
cause

The cause of this error. Free-format JSON object.

object

Service is not healthy (bad gateway), Tradecloud ops will be alerted. Will not contain a structured response body.

Service is unavailable (overloaded or down for maintenance), Tradecloud ops will be alerted. May or may not contain a structured response body.

Media type*/*
object
message
required
string

Example

Could not retrieve data from external source.

Service is unavailable (gateway timeout), Tradecloud ops will be alerted. Will not contain a structured response body.