Sales, Inventory, & Operations Planning API - Reference
POST
/v1
Looking for the Flat File Processor?
Please note, this is the Development environment. For Production data flows, please use siop.api.oregontool.com.

Request Headers
X-Api-Key
<your-api-key>
Content-Type
application/json
Accept
application/json


Request Content
application/json
{ "dataItems": [ { "soldToId": "012345", "shipToId": "987654", "materialId": "ADF-42356", "oregonToolMaterialId": "OTX-42356", "year": 2023, "month": 5, "day": 7, "unitsSold": 22, "onHand": 45, "unitsOnHand": 38, "unitsOnShelf": 32, "unitsOnOrder": 40, "unitsInTransit": 20, "unitOfMeasure": "EA", "targetInventory": 50, "minimumStock": 10, "maximumStock": 100, "safetyStock": 6 } ] }

Optionally, the API will accept and return XML. Just specify 'application/xml', as applicable, for Content-Type and/or Accept headers.



Response
application/json
A successful POST will return HTTP Status 201 | Created, with no Content.
Non-success responses will return Content which you may inspect to understand why your POST failed; all properties are nullable; here is an example:
{ "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more validation errors occurred.", "status": 400, "tracedId": "00-b8992e4f52c659ef02b4f901ce1336a6-deaa6ed8bd9afea2-00", "errors" { "$.dataItems[1].onHand": [ "The onHand field is required." ], "$.dataItems[5].unitsOnShelf": [ "The JSON value could not be converted to System.Nullable`1[System.Int32]" ], } "message": "An error occurred!" }
The "status" property, if provided, will match the HTTP Status Code of the response.
The "errors" property, if provided, contains the properties of your posted siop / siop.dataItems entities which failed validation. Error messages for each property are returned as an array of strings.
Non-success responses which are not related to data validation may only return the "status" and "message" properties.


Schema
siop
dataItems
*
siop.dataItem[]
\ Array of siop.dataItems (see siop.dataItem schema)
*
Required property.


Schema
siop.dataItem
soldToId
*
string
max length: 10
\ Your Oregon Tool customer number/id
shipToId
*
string
max length: 10
\ Your Oregon Tool ship-to customer number/id
materialId
*
string
max length: 18
\ Your internal material/part identifier
oregonToolMaterialId
string
max length: 10
nullable
\ Oregon Tool material/part identifier (if different from your internal)
year
*
integer
32-bit signed
min: 1990
max: 9999
\ Calendar year of the data period
month
*
integer
32-bit signed
min: 1
max: 12
\ Calendar month of the data period
day
integer
32-bit signed
min: 1
max: 31
nullable
\ Calendar day of the data period (defaults to first of the month if not provided)
unitsSold
*
integer
32-bit signed
\ Units sold for the period
onHand
integer
32-bit signed
nullable
\ Total unit inventory on site for the period
unitsOnHand
integer
32-bit signed
nullable
\ Units available to be moved to the shelf for purchase/sale for the period
unitsOnShelf
integer
32-bit signed
nullable
\ Units available for purchase/sale for the period
unitsOnOrder
integer
32-bit signed
nullable
\ Units ordered but not yet received for the period
unitsInTransit
integer
32-bit signed
nullable
\ Units shipped but not yet received for the period
unitOfMeasure
string
max length: 3
nullable
\ Unit of Measure
targetInventory
integer
32-bit signed
nullable
\ SKU stock level to always have on hand
minimumStock
integer
32-bit signed
nullable
\ Lowest quantity of SKU to be stored
maximumStock
integer
32-bit signed
nullable
\ Highest quantity of SKU to be stored
safetyStock
integer
32-bit signed
nullable
\ Quantity of SKU held in inventory to reduce risk that the item will be out of stock
*
Required property.


Example using


Example using
curl --request POST \ --url https://siop.api.oregontool.com/v1 \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <your-api-key>' \ --data '{ "dataItems": [ { "soldToId": "13035", "shipToId": "12256", "materialId": "X32456", "year": 2023, "month": 1, "day": 1, "unitsSold": 0, "onHand": 0, "unitsOnHand": 3, "unitsOnShelf": 2, "unitsOnOrder": 1, "unitsInTransit": 0, "unitOfMeasure": "EA", "targetInventory": 3, "minimumStock": 2, "maximumStock": 5, "safetyStock": 2 } ] }'