Order
Order provides access to the order resource. Orders will be downloaded into the system from host platforms. Orders will require dispatching to customers and updating with tracking details. If you are looking to download a system generated dispatch note or invoice for the order please look at File Utilities.
Order Properties
Property | Example | Description |
---|---|---|
id | "788F9E..." | Unique id of the order |
fk_warehouse | "157194..." | The foreign key to the warehouse the order has been linked to. |
fk_brandStore | "A0E87A..." | The foreign key to the brandStore id. |
brandOrderRef | "" | The order ref assigned by the brand if applicable. |
hostOrderRef | "166774" | The order reference given by the host. |
hostCustOrderRef | "" | The order ref used by the host for their customer (if different to hostOrderRef) |
orderDate | "2020-09-04T10:16:06" | Order date |
shipDate | "" | Order expected shipping date sometime specified by host |
sentToWHDate | "" | Date sent to warehouse (where applicable) |
deliveryDate | "" | Date the order was sent out for delivery |
status | "" | Marketplace reference. |
carrier | "UK48HR" | Shipping carrier |
trackingRef | "" | Shipping tracking reference |
detail | {object} | Object containing summary order data as well as any host specific order related fields |
shipAddress | {object} | Object containing the shipping address |
billAddress | {object} | Object containing the billing address |
order_brandStore | null | Object containing additional order details (where applicable) |
order_orderItem | {}[related entities]} | collection of orderItems related to the order see orderitem resource |
Order Methods
GET | /api/order |
---|
Returns all orders for the current scope with all published fields.
POST | /api/order |
---|
Parses the request object and creates an order (if validated). The order items are passed as part of the request object. The total value of the items will be validated against the Gross value passed in the order header.
All exposed properties of the Order can be inserted with the exception of id. The example given shows the recommended fields to be used. Please see the Order Items documentation for item fields which are allowable in a post to the order endpoint.
The response will return the entire order and in addition a response_status property. It is the responsibility of the developer to ensure that fields are filled to the customers requirement. This may vary based on shipping and processing requirements.
Example
Example of a returned order entity with included related items
{
"response": {
"page": 1,
"pageCount": 1,
"recordsSent": 1,
"recordsFound": 1,
"order": [
{
"id": "788F9E86F23B0A46B458983FB1B5AA38",
"fk_brandStore": "A0E87AE771BAC84DBA994FEC70537912",
"brandOrderRef": "",
"hostOrderRef": "166774",
"hostCustOrderRef": "",
"orderDate": "2020-09-04T10:16:06",
"shipDate": "",
"sentToWHDate": "",
"status": "",
"carrier": "UK48HR",
"trackingRef": "",
"fk_warehouse": "1571945CAB99744086F9FDFC9D9332D5",
"detail": {
"hostCarrier": "UK* Standard Delivery (3 - 5 working days)",
"hostStatus": "Awaiting Fulfillment",
"customerMessage": "",
"net": 52.455,
"gross": 62.95,
"vat": 7.16,
"shippingGross": 2.95,
"shippingTax": 0.49
},
"shipAddress": {
"id": 166670,
"title": "Mrs",
"forename": "Shirley",
"surname": "Johnson",
"company": "",
"line1": "12 Windy Avenue",
"line2": "Pitturbury",
"town": "Beltchworth",
"county": "",
"postcode": "KL2 9PL",
"country": "United Kingdom",
"countryCode": "GB",
"phone": "",
"email": "shirley.johnson@email.com"
},
"billAddress": {
"forename": "Shirley",
"surname": "Johnson",
"company": "",
"line1": "12 Windy Avenue",
"line2": "Pitturbury",
"town": "Beltchworth",
"county": "",
"postcode": "KL2 9PL",
"country": "United Kingdom",
"countryCode": "GB",
"phone": "",
"email": "shirley.johnson@email.com"
},
"deliveryDate": "",
"order_brandStore": {
"id": "A0E87AE771BAC84DBA994FEC70537912",
"fk_brand": "252DF4B7194C8E4599CB0430920AFB5D",
"fk_store": "5AEE4DB4C520B740ABA582528E1E8ABB",
"fk_warehouse": "1571945CAB99744086F9FDFC9D9332D5",
"detail": {
"stockType": "inStock",
"adjustType": "Absolute",
"adjustValue": 0
},
"brandStore_store": {
"__KEY": "5AEE4DB4C520B740ABA582528E1E8ABB"
},
"brandStore_brand": {
"__KEY": "252DF4B7194C8E4599CB0430920AFB5D"
},
"brandStore_warehouse": {
"__KEY": "1571945CAB99744086F9FDFC9D9332D5"
}
},
"order_orderItem": [
{
"id": "C0458E1496D21B499A3DCAE799A2DC87",
"fk_order": "788F9E86F23B0A46B458983FB1B5AA38",
"fk_variant": "E3DDB440D1E0554D957B029B3F58D361",
"orderQty": 1,
"itemPrice": 49.995,
"lineNet": 49.995,
"lineTax": 6.67,
"lineGross": 60,
"currency": "",
"shipQty": 0,
"returnQty": 0,
"detail": {
"hostRef": 338510,
"gift": "N",
"status": "ACC"
},
"status": "",
"hostItemRef": "",
"returnDate": "",
"orderItem_order": {
"__KEY": "788F9E86F23B0A46B458983FB1B5AA38"
},
"orderItem_variant": {
"id": "E3DDB440D1E0554D957B029B3F58D361",
"fk_product": "CD89680B3E306142A84BBA174A48A73B",
"code": "YM1531059__D",
"barcode": "5052011764155",
"colour": "Tan",
"sequence": 4,
"size": "12",
"detail": null,
"vatable": false,
"rrp": 0,
"variant_product": {
"id": "CD89680B3E306142A84BBA174A48A73B",
"fk_brand": "252DF4B7194C8E4599CB0430920AFB5D",
"code": "YM1531",
"title": "Button Through Coat With Check Print Lin",
"category": "COAT",
"description": "",
"productBrand": "MY RETAIL",
"season": "AW19",
"origin": "CHINA",
"composition": "",
"careInstructions": "",
"createdDate": "2020-09-04T11:05:41",
"status": "",
"detail": null,
"commodityCode": "",
"product_brand": {
"__KEY": "252DF4B7194C8E4599CB0430920AFB5D"
}
}
}
}
]
}
]
}
}