Skip to main content

Order Item

Order item provides access to the item level of the order resource. This is currently a read only resource.

OrderItem Properties

PropertyExampleDescriptionAllowed in Order POST
id"847CFD..."Unique id for the order itemNo
fk_order"B56919..."Foreign key to the related orderNo
fk_variant"FAC105..."The foriegn key to the related variantYes if orderItem_variant.barcode or orderItem_variant.code not used
orderQty1The quantity ordered for the lineYes mandatory
itemPrice25The price for a single itemYes mandatory
lineNet25The line net costYes
lineTax2.50The line taxYes
lineGross30The line grossYes
currency"GBP"CurrencyYes
shipQty0The quantity that has been shippedNo
returnQty0The quantity returnedNo
status"ACC"The status of the itemNo
hostItemRef""The item ref set by the host if applicableYes
orderItem_order{object}The related order resource to exclude use "exclude=orderItem_order.*"No
orderItem_variant{object}The related variant detailsNo apart from the following optional fields
variant.barcode""Barcode for the variant itemYes if fk_variant and orderItem_variant.code are not passed
variant.code""Code for the variant itemYes if fk_variant and orderItem_variant.code are not passed

Order Item Methods

GET/api/orderitem?fk_order=B569198A1370DE47B4B30E8761C01582

Returns all order items for the specified order.

NOTE: When posting in an order the system will try and match the product passed on the variant id, barcode or code to optimise matching.

Q. Why no POST option. A. All items must be sent as part of the order message.

Example

Example of a returned order item entity
{
"response": {
"page": 1,
"pageCount": 1,
"recordsSent": 1,
"recordsFound": 1,
"orderItem": [
{
"id": "847CFD2E5C17A34295288BEBC9331F2E",
"fk_order": "B569198A1370DE47B4B30E8761C01582",
"fk_variant": "FAC10544B2ABCD45BCC6138FC20C3300",
"orderQty": 1,
"itemPrice": 25,
"lineNet": 25,
"lineTax": 2.5,
"lineGross": 30,
"currency": "",
"shipQty": 0,
"returnQty": 0,
"detail": null,
"status": "ACC",
"hostItemRef": "",
"returnDate": "",
"orderItem_order": {
"id": "B569198A1370DE47B4B30E8761C01582",
"fk_brandStore": "A0E87AE771BAC84DBA994FEC70537912",
"brandOrderRef": "",
"hostOrderRef": "161449",
"hostCustOrderRef": "",
"orderDate": "0000-00-00T00:00:00",
"shipDate": "",
"sentToWH": "2020-08-27T08:35:05",
"status": "",
"carrier": "UK* Standard Delivery (3 - 5 w",
"trackingRef": "",
"fk_warehouse": "1571945CAB99744086F9FDFC9D9332D5",
"detail": {
"hostStatus": "Shipped",
"customerMessage": "",
"shippingGross": 2.95,
"shippingTax": 0.49
},
"shipAddress": {
"id": 161345,
"forename": "Helen",
"surname": "Dawson",
"company": "",
"line1": "The Stables",
"line2": "South Elkington",
"town": "Louth",
"county": "Lincolnshire",
"postcode": "Ln11 0RY",
"country": "United Kingdom",
"countryCode": "GB",
"phone": "07450199522",
"email": "helendawson.hd16@gmail.com"
},
"billAddress": {
"forename": "Helen",
"surname": "Dawson",
"company": "",
"line1": "The Stables",
"line2": "South Elkington",
"town": "Louth",
"county": "Lincolnshire",
"postcode": "Ln11 0RY",
"country": "United Kingdom",
"countryCode": "GB",
"phone": "07450199522",
"email": "helendawson.hd16@gmail.com"
},
"deliveryDate": "",
"order_brandStore": {
"__KEY": "A0E87AE771BAC84DBA994FEC70537912"
},
"order_warehouse": {
"__KEY": "1571945CAB99744086F9FDFC9D9332D5"
}
},
"orderItem_variant": {
"id": "FAC10544B2ABCD45BCC6138FC20C3300",
"fk_product": "432F23BAE7D2054DB09537AA522058DA",
"code": "ML5558027__F",
"barcode": "5052011767491",
"colour": "Navy",
"sequence": 6,
"size": "16",
"detail": null,
"vatable": false,
"rrp": 0,
"variant_product": {
"__KEY": "432F23BAE7D2054DB09537AA522058DA"
}
}
}
]
}
}