Skip to content

Send Slimstock forecast

POST
/api-connector/forecast/slimstock
curl --request POST \
--url https://api.tradecloud1.com/v2/api-connector/forecast/slimstock \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "header": { "companyId": "00f03b98-2511-489f-9695-13791b3f66b6", "supplierAccountNumber": "12345", "forecastNumber": "F123456789" }, "lines": [ { "buyerItemNumber": "12345", "buyerItemRevision": "v2", "buyerItemName": "Round tube ø60x45", "supplierItemNumber": "67890", "purchaseUnitOfMeasureIso": "PCE", "startDate": "2023-04-07", "M0": 1234.56, "M1": 1234.56, "M2": 1234.56, "M3": 1234.56, "M4": 1234.56, "M5": 1234.56, "M6": 1234.56, "M7": 1234.56, "M8": 1234.56, "M9": 1234.56, "M10": 1234.56, "M11": 1234.56, "M12": 1234.56, "M13": 1234.56, "M14": 1234.56, "M15": 1234.56, "M16": 1234.56, "M17": 1234.56, "M18": 1234.56, "M19": 1234.56, "M20": 1234.56, "M21": 1234.56, "M22": 1234.56, "M23": 1234.56, "M24": 1234.56, "M25": 1234.56, "M26": 1234.56, "M27": 1234.56, "M28": 1234.56, "M29": 1234.56, "M30": 1234.56, "M31": 1234.56, "M32": 1234.56, "M33": 1234.56, "M34": 1234.56, "M35": 1234.56 } ], "issueDateTime": "2022-12-31T10:11:12" }'

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

Send Slimstock 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 Slimstock and your ERP system, and added to the supplier connection in the Tradecloud portal.

string

Example

12345
forecastNumber
required

The mandatory forecast identifier in Slimstock. The number must be the same for each supplier forecast from the same generated forecast.

string

Example

F123456789
lines
required

The lines of the Slimstock forecast. Each line contains the forecasts of one item.

Array<object>

A forecast line contains a Slimstock item, the date determining the current month and forecasted quantities up to 36 months.

object
buyerItemNumber
required

The item code or number as known in Slimstock and your 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
startDate
required

An arbitrary date in a month. The month of this date is used for the period M0. Date has ISO 8601 date format.

string format: YYYY-MM-DD

Example

2023-04-07
M0

The forecasted demand of this item in the month of startDate. The quantity has a decimal format.

number

Example

1234.56
M1

The forecasted demand of this item in the next, 1st month.

number

Example

1234.56
M2

The forecasted demand of this item in the 2nd month.

number

Example

1234.56
M3

The forecasted demand of this item in the 3rd month.

number

Example

1234.56
M4

The forecasted demand of this item in the 4th month.

number

Example

1234.56
M5

The forecasted demand of this item in the 5th month.

number

Example

1234.56
M6

The forecasted demand of this item in the 6th month.

number

Example

1234.56
M7

The forecasted demand of this item in the 7th month.

number

Example

1234.56
M8

The forecasted demand of this item in the 8th month.

number

Example

1234.56
M9

The forecasted demand of this item in the 9th month.

number

Example

1234.56
M10

The forecasted demand of this item in the 10th month.

number

Example

1234.56
M11

The forecasted demand of this item in the 11th month.

number

Example

1234.56
M12

The forecasted demand of this item in the 12th month.

number

Example

1234.56
M13

The forecasted demand of this item in the 13th month.

number

Example

1234.56
M14

The forecasted demand of this item in the 14th month.

number

Example

1234.56
M15

The forecasted demand of this item in the 15th month.

number

Example

1234.56
M16

The forecasted demand of this item in the 16th month.

number

Example

1234.56
M17

The forecasted demand of this item in the 17th month.

number

Example

1234.56
M18

The forecasted demand of this item in the 18th month.

number

Example

1234.56
M19

The forecasted demand of this item in the 19th month.

number

Example

1234.56
M20

The forecasted demand of this item in the 20th month.

number

Example

1234.56
M21

The forecasted demand of this item in the 21st month.

number

Example

1234.56
M22

The forecasted demand of this item in the 22nd month.

number

Example

1234.56
M23

The forecasted demand of this item in the 23rd month.

number

Example

1234.56
M24

The forecasted demand of this item in the 24th month.

number

Example

1234.56
M25

The forecasted demand of this item in the 25th month.

number

Example

1234.56
M26

The forecasted demand of this item in the 26th month.

number

Example

1234.56
M27

The forecasted demand of this item in the 27th month.

number

Example

1234.56
M28

The forecasted demand of this item in the 28th month.

number

Example

1234.56
M29

The forecasted demand of this item in the 29th month.

number

Example

1234.56
M30

The forecasted demand of this item in the 30th month.

number

Example

1234.56
M31

The forecasted demand of this item in the 31st month.

number

Example

1234.56
M32

The forecasted demand of this item in the 32nd month.

number

Example

1234.56
M33

The forecasted demand of this item in the 33rd month.

number

Example

1234.56
M34

The forecasted demand of this item in the 34nd month.

number

Example

1234.56
M35

The forecasted demand of this item in the 35nd month.

number

Example

1234.56
issueDateTime

ISO local date and time at which the forecast was originally issued in Slimstock.

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

Example

2022-12-31T10:11:12

Successfully verified and sent Slimstock 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.