TradeOrderItem
What you can do with TradeOrderItem:
This is currently a read only resource when called on its own.
http://URL/api/tradeorderitem?showzeros=true Example uses the showzeros parameter (see description below)
{
"response": {
"Page": 1,
"PageCount": 755,
"RecordsSent": 100,
"RecordsFound": 75413,
"TradeOrderItem": [
{
"id": 71,
"Order_id": 64,
"SKU": "B0000027009",
"Article": "CK 2 (MULTI)",
"Colour_Code": "009",
"Colour_Name": "",
"Item_Price": 10.5,
"Line_Qty": 1,
"Line_Value": 10.5,
"Currency": "GBP",
"Brand": "Relco London",
"Product_Group": "Short Sleeve Shirts",
"Line_Ref": "",
"Cust_SKU_Ref": "",
"Location": "",
"Sizes": [
{
"SKUSize": "B0000027009A",
"Size": "S",
"Qty": 0,
"SizeSort": 1
},
{
"SKUSize": "B0000027009B",
"Size": "M",
"Qty": 1,
"SizeSort": 2
},
{
"SKUSize": "B0000027009C",
"Size": "L",
"Qty": 0,
"SizeSort": 3
},
{
"SKUSize": "B0000027009D",
"Size": "XL",
"Qty": 0,
"SizeSort": 4
},
{
"SKUSize": "B0000027009E",
"Size": "XXL",
"Qty": 0,
"SizeSort": 5
},
{
"SKUSize": "B0000027009F",
"Size": "3XL",
"Qty": 0,
"SizeSort": 6
}
]
}
]
}
}
TradeOrderItem Properties
| Property | Example | Description |
|---|---|---|
| id | 71 | Unique id for the retail order item |
| Order_id | 64 | Order id links the item to the order |
| SKU | "B0000027009" | Style/Colour code for the order item |
| Article | "Delivery" | Article name |
| Colour_Code | "009" | Colour code |
| Colour_Name | "Blue" | Colour name |
| Item_Price | 10.5 | Item prices for line item |
| Line_Qty | 1 | Total quantity for the line |
| Line_Value | 10.5 | Total value for line |
| Currency | "GBP" | Currency for the line item |
| Brand | "Test Brand" | Brand name for the item |
| Product_Group | "Dresses" | Product group for the item |
| Cust_SKU_Ref | "ABC123" | The customers reference for the SKU |
| Location | "A001" | Warehouse pick location for item |
| Sizes | [] | Array of size level item quantities |
| SKUSize | "B0000027009A" | SKU/Size level code |
| Size | "M" | Size code |
| Qty | 1 | Quantity for the size in the line |
| SizeSort | 2 | The size sort code for the size item |
| Barcode | "3900011122234" | Barcode of the order item |
ShowZeros Custom Parameter
The ShowZeros parameter can be used to display sizes for the order item that have a zero quantity in them. By default the behaviour is to return only sizes that have a non zero quantity.
Example /api/supplyorderitem?showzeros=true NOTE: When posting in a trade order the system will try and match the product by SKUSize (if present) or the optional Barcode property (only used for POST). If neither is present the order will fail. As SKUSize can contain multiple spaces between colour code and size letter this may provide you with an issue. To work around this you can replace spaces with underscores in the SKUSize field. If you pass back a SKUSize with underscores these will automatically be replaced with spaces for matching purposes.
Q. Why no POST option. A. All items must be sent as part of the tradeorder message.