The order object
Order
Parameter | Data type | Default | Description |
---|---|---|---|
order_number | string | The order number for this order | |
type | string | The order type of the order | |
customer_id | int | The customer of the order | |
internal_status | string | draft | Possible values: draft , selection , approved |
cancelled | boolean | false | Is the order cancelled? |
archived | boolean | false | Is the order archived? |
status | string | The status label of the order | |
comments_internal | string | A comment on the order that should not be viewed by the customer | |
comments_external | string | A comment on the order that should be viewable by the customer | |
meta | {} | An object with {"key": "value"} with custom meta data of the order. This is used for storing custom fields | |
price_before_discount | float | The total price of the order before discount and ex VAT | |
discount_amount | float | The total discount given as an amount ex VAT | |
discount_percentage | float | The total discount given as a percentage | |
net_price | float | The total price of the order ex VAT, shipping and handling fee and after discount | |
shipping | float | The shipping amount ex VAT | |
handling_fee | float | The handling fee amount ex VAT | |
vat_amount | float | The total VAT amount | |
total_price_after_vat | float | The total price of the order incl VAT | |
created_at | datetime | ||
updated_at | datetime | ||
lines.* | If eager loaded | An array of object order line |
Order line
Parameter | Data type | Default | Description |
---|---|---|---|
product_id | int | The product bought | |
variant_id | int | The variant bought | |
quantity | int | The quantity bought. This will not decrease as the order is delivered and invoiced | |
shipped | int | The quantity that has been shipped. NOTE: This increases when pieces are sent to warehouse, not when they are actually delivered | |
invoiced | int | The quantity invoiced. This increases whenever an invoice for the order is booked | |
meta | {} | An object with {"key": "value"} with custom meta data of the order line. This is used for storing custom fields | |
price_before_discount | float | The unit price of the line before discount and ex VAT | |
discount_amount | float | The unit discount given as an amount ex VAT | |
discount_percentage | float | The discount given as a percentage | |
net_price | float | The unit price of the line ex VAT and after discount | |
vat_amount | float | The unit VAT amount | |
total_price | float | The total price of the line ex VAT. This is calculated as quantity * net_price | |
total_price_after_vat | float | The total price of the line incl VAT | |
created_at | datetime | ||
updated_at | datetime |