Skip to main content

TradeOrder

Trade order provides access to the wholesales customer order resource.

TradeOrder Properties​

Example of a returned trade order object with items included

{
"response": {
"Page": 1,
"PageCount": 54,
"RecordsSent": 100,
"RecordsFound": 5396,
"TradeOrder": [
{
"id": 166,
"Customer_Code": "TEST",
"Outlet_Code": "TEST",
"Order_Ref": "S00074",
"Customer_Ref": "",
"Comments": "",
"Tradename": "Test tradename",
"Status": 6,
"Created_date": "2014-07-22T23:00:00.000Z",
"Sent_To_WH": "0000-00-00T00:00:00.000Z",
"Currency": "",
"Source": "Showroom",
"Total_Quantity": 42,
"Total_Value": 495,
"Delivery_Address": "Test Comapny\r7 West Street\rCorby\rNN18 0JB\r",
"Delivery_Date": "2014-07-22T23:00:00.000Z",
"Delivery_Window": 0,
"Delivery_Instructions": "",
"Invoiced": "2014-07-22T23:00:00.000Z",
"Invoice_Ref": "00084",
"Invoice_Address": "Test Comapny\r7 West Street\rCorby\rNN18 0JB\r",
"Details": null,
"Country": "",
"Items": [
{
"id": 1181,
"Order_id": 166,
"SKU": "D0000001001",
"Article": "STA PREST (BLACK)",
"Colour_Code": "001",
"Colour_Name": "BLACK",
"Item_Price": 12.5,
"Line_Qty": 2,
"Line_Value": 25,
"Currency": "GBP",
"Brand": "Relco London",
"Product_Group": "Trousers",
"Line_Ref": "",
"Cust_SKU_Ref": "",
"Location": "",
"Sizes": [
{
"SKUSize": "D0000001001B",
"Size": "30",
"Qty": 1,
"SizeSort": 2
},
{
"SKUSize": "D0000001001C",
"Size": "32",
"Qty": 1,
"SizeSort": 3
}
]
}
]
}
]
}
}
PropertyExampleDescription
id1300Unique id of the order
Customer_Code"CXLDN"Customer code
Outlet_Code"CLXO"Outlet code
Order_Ref"S00002"Order reference
Customer_Ref"XXX001"Customers order reference
Comments""Order comments
Tradename"Brand A"The tradename under which the order was placed
Status6Status code for the order
Created_Date"2017-01-12T00:00:00.000Z"Creation date of the order
Sent_To_WH"2017-01-12T00:00:00.000Z"Date the order was sent to the warehouse (used with warehouse integration)
Currency"GBP"The currency for the order
Source"Showroom"The source of the order
Total_Quantity51Total items on the order
Total_Value614Total sell price for the order
Delivery_Address"CX LONDON\r132 CATHERINE ST\rCAMBRIDGE\rCAMBRIDGESHIRE\rCB1 3AR\r"Delivery address text
Delivery_Date"2017-01-17T00:00:00.000Z"Required delivery date
Delivery_Window10Delivery window in days for the order
Delivery_Instructions""Delivery instructions
Invoiced"2017-01-17T00:00:00.000Z"Invoiced date
Invoice_Ref"00033"Invoice reference
Invoice_Address"CX LONDON\r132 CATHERINE ST\rCAMBRIDGE\rCAMBRIDGESHIRE\rCB1 3AR\r"Invoice address text
DetailsnullObject containing customer values (where implemented)
Country"UK "Country code for order
Items[]Array of trade order items see tradeorderitem resource

TradeOrder Methods​

GET /api/tradeorder​

Returns all trade orders in the system with all published fields.

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 POST /api/retailorder Parses the request object and creates a trade order (if validated). The trade customer code and items are all passed as part of the request object. It is important to pass the Outlet_code for the related customer otherwise the order will be orphaned and not processed. Currently customers must exist prior to orders being placed.

All exposed properties of the RetailOrder can be inserted with the exception of id. The eample given shows the recommended fields to be used. Please see the TradeOrderItem documentation for item fields which are allowable in a post.

The response will return the entire tradeorder following creation.

TradeOrderItem What you can do with TradeOrderItem:

This is currently a read only resource when called on its own.