Orders

Order management endpoints

Manage orders
{ "data": [ { "id": "8gl60vzypnkw142", "...": "..." }, { "id": "9hk71wxzqolx253", "...": "..." } ] }
{ "data": { "id": "8gl60vzypnkw142", "display_id": "#ORD-100000", "sub_total": 1569, "type": null, "delivery_total": 795, "discount_total": 0, "tax_total": 470, "shipping_preference": null, "shipping_method": null, "order_total": 2834, "reference": null, "customer_reference": null, "invoice_reference": null, "vat_no": null, "tracking_no": null, "dispatched_at": null, "currency": "GBP", "customer_name": null, "contact_details": { "phone": null, "email": null }, "billing_details": { "phone": null, "email": null, "firstname": null, "lastname": null, "address": null, "address_two": null, "address_three": null, "city": null, "county": null, "state": null, "country": null, "zip": null }, "shipping_details": { "method": null, "preference": null, "phone": null, "email": null, "firstname": null, "lastname": null, "address": null, "address_two": null, "address_three": null, "city": null, "county": null, "state": null, "country": null, "zip": null }, "status": "awaiting-payment", "created_at": null, "updated_at": null, "placed_at": null } }
Parameter Type Required Description

basket_id

String

true

The Hashid ID of the basket to convert to an order

{ "data": { "id": "8gl60vzypnkw142", "...": "..." } }
Manage an orders lines
{ "data": { "id": "8gl60vzypnkw142", "...": "..." } }
Parameter Type Required Description

quantity

String

true

line_total

String

true

unit_price

String

true

tax_rate

String

true

The rate of tax to charge i.e. 20 for 20%

description

String

true

Add lines to an order
Cause an order to expire
Update an orders shipping address, all fields are required when no address id is provided
{ "data": { "id": "8gl60vzypnkw142", "...": "..." } }
Parameter Type Required Description

firstname

String

true

lastname

String

true

address_id

String

false

The hashed ID of an address to use

address

String

true

city

String

true

county

String

true

email

String

false

state

String

true

zip

String

false

country

String

true

See above for parameters and responses
Get available shipping methods for an order
{ "data": [ { "id": "232Ssef$Ff", "rate": 2000, "tax": 500, "fixed": true, "min_basket": 400, "min_basket_tax": 100, "min_weight": 0, "weight_unit": "kg", "min_height": 0, "height_unit": "m", "min_width": 0, "width_unit": 0, "min_depth": 0, "depth_unit": 0, "min_volume": 0, "volume_unit": 0 } ] }
Set the shipping cost for the order
{ "data": { "id": "8gl60vzypnkw142", "...": "..." } }
Parameter Type Required Description

price_id

String

true

The hashed ID of the price to charge

Get information about a payment provider
Billing information is missing
Order not found
Order has already been processed
ThreeD Secure response from SagePay
{ "threedsecure": true, "status": 200, "transactionId": 123456, "acsUrl": "https:\/\/threedsecure.com\/acs\/redirect\/", "paRequest": "https:\/\/threedsecure.com\/pa\/url\/" }
Successful response from API
{ "data": { "id": "8gl60vzypnkw142", "display_id": "#ORD-100000", "sub_total": 1569, "type": "SagePay", "delivery_total": 795, "discount_total": 0, "tax_total": 470, "shipping_preference": null, "shipping_method": "Standard Delivery Mon-Fri", "order_total": 2834, "reference": "ORD-200-100000", "customer_reference": null, "invoice_reference": "#INV-ORD-200-100000", "vat_no": null, "tracking_no": null, "dispatched_at": null, "currency": "GBP", "customer_name": "Joe Bridges", "contact_details": { "phone": "01234 567890", "email": "joe@joe.com" }, "billing_details": { "phone": "01234 567890", "email": "billing@joe.com", "firstname": "Joe", "lastname": "Bridges", "address": "123 Some Road", "address_two": "Somewhere", "address_three": null, "city": "St Albans", "county": "Hertfordshire", "state": null, "country": "United Kingdom", "zip": "ST56 56T" }, "shipping_details": { "method": "Standard Delivery Mon-Fri", "preference": null, "phone": "012345 67890", "email": "shipping@joe.com", "firstname": "Joe", "lastname": "Bridges", "address": "456 Another Road", "address_two": "Somewhere", "address_three": null, "city": "Some City", "county": "Some County", "state": null, "country": "United Kingdom", "zip": "SC89 89TH" }, "status": "in-process", "created_at": { "date": "2019-07-13 22:10:41.000000", "timezone_type": 3, "timezone": "UTC" }, "updated_at": { "date": "2019-07-15 09:18:10.000000", "timezone_type": 3, "timezone": "UTC" }, "placed_at": { "date": "2019-07-14 18:35:27.000000", "timezone_type": 3, "timezone": "UTC" }, "notes": null, "meta": [] } }
Parameter Type Required Description

order_id

String

true

The hashed ID of the order

payment_token

String

true

The provider payment token

Get an invoice for an order
{ "data": { "encoding": "base64", "contents": "R0lGODlhIQAPAKIEAP\/IyP+goAAAAOoDA\/\/\/\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YeXiu0Eh4lxJ6r0VsSNFhJdSgpXjyAsBjpnVYuwapLkwolt+h2hIxFyufXvGOfv4f0gHwUCQAh+QQJCgAEACwAAAAAIQAPAAADaEi63P5QjTajpG7UpW1nnwQA2wAEGzWWJ4tyLSEIykyYr5jf54u\/NhntNyHCAr5epcRDFpUgJAp6qQ6kxqgUe9N4l1su5ep8js4kCRmVGrvCKa8l89uG5o\/l99PGc26ARYF+eYOCghAJACH5BAUKAAQALAAAAAAhAA8AAANiSLo6\/HC5yIal1M4MRsePJ3LBEJRgA5TnVq0mqgjCXKus\/LanTNu4nC4Y020mHl4rtBIeJcSeq9FbEjRYSXUoKV48gLAY6Z1WLsGqS5MKJbfodoSMRcrn17xjn7+H9IB8FAkAOw==" } }

Model Definitions

Order Transaction