Get Order
Retrieves the details of a single order, including its line items, addresses, shipments and payments.
HTTP Request
- URL:
/orders/{id} - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_ORDERorREAD_WRITE_ORDER
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. The ID of the order (not the order number). |
cURL Example
curl --location '<BASE_URL>/orders/664f2310d5775459152d6dd8' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The order was returned successfully.
- 400 Bad Request: The access token is missing or invalid, the order ID is not valid, or no order exists with this ID.
Sample JSON Response
{
"success": true,
"data": {
"id": "664f2310d5775459152d6dd8",
"entityId": "ORD-1042",
"checkout": "664f2308d5775459152d6d2e",
"company": "664dec6cd5775459152d4922",
"customer": "664dec6cd5775459152d4926",
"customerDetails": {
"firstName": "Maria",
"lastName": "Lopez",
"email": "maria.lopez@northwindsupply.com",
"phoneNumber": "512-555-0142"
},
"companyDetails": {
"name": "Northwind Supply",
"email": "ap@northwindsupply.com",
"phoneNumber": "512-555-0100"
},
"guestOrder": false,
"orderedAt": "2024-05-23T11:05:52.545Z",
"shippingAddress": {
"id": "664dec6cd5775459152d4931",
"shippingAddressId": "664dec6cd5775459152d4924",
"firstName": "Maria",
"lastName": "Lopez",
"companyName": "Northwind Supply",
"address1": "4100 Industrial Blvd",
"address2": "Dock 3",
"phoneNumber": "512-555-0142",
"city": "Austin",
"state": { "name": "Texas", "code": "TX" },
"country": { "name": "United States", "code": "US" },
"zipcode": "78744"
},
"billingAddress": {
"id": "664f2308d5775459152d6d2f",
"billingAddressId": "664dec6cd5775459152d4923",
"firstName": "Maria",
"lastName": "Lopez",
"address1": "4100 Industrial Blvd",
"city": "Austin",
"state": { "name": "Texas", "code": "TX" },
"country": { "name": "United States", "code": "US" },
"zipcode": "78744"
},
"lineItems": [
{
"id": "664f2310d5775459152d6ddb",
"productId": "663a0cbe516313e5bc94ab30",
"variantId": null,
"name": "Safety Glasses",
"image": "https://cdn.example.com/products/safety-glasses.webp",
"sku": "SFTY-4006",
"productSku": "SFTY-4006",
"quantity": 12,
"price": 45,
"extendedTotalPrice": 540,
"discountAmount": 0,
"isFreeGift": false,
"options": [],
"fulfilledQuantity": 12,
"returned": false,
"selectedCurrencyPrice": null
}
],
"currency": { "currency": "USD", "symbol": "$" },
"selectedCurrency": null,
"selectedCurrencyAmount": null,
"shipmentDetails": {
"shippingMethod": {
"name": "flatRate",
"label": "Flat Rate",
"shippingMethodId": "663a0afe4587085935a4fa0d"
}
},
"paymentDetails": [],
"payments": [
{
"id": "666f2310d5775459152d6ff0",
"entityId": "PMT-1007",
"source": "order",
"amount": 552,
"amountReceived": 552,
"currency": { "currency": "USD", "symbol": "$" },
"status": "captured",
"methodName": "stripe",
"methodLabel": "Credit Card",
"type": "online",
"gatewayRef": "pi_3PJk2bKZ8x4c1d0A1b2c3d4e",
"refundedAmount": 0,
"createdBy": { "id": "664dec6cd5775459152d4926", "name": "Maria Lopez", "type": "store" },
"createdAt": "2024-05-23T11:05:54.010Z",
"updatedAt": "2024-05-23T11:05:54.010Z"
}
],
"fulfilledItems": [
{
"_id": "665a1b2cd5775459152d7001",
"items": [
{
"lineItemId": "664f2310d5775459152d6ddb",
"quantity": 12,
"remainingQuantity": 0
}
],
"carrier": "ups",
"carrierName": "UPS",
"trackingNumber": "1Z999AA10123456784",
"trackingUrl": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
"fulfilledAt": "2024-05-24T15:20:00.000Z",
"voided": false
}
],
"paymentTerm": null,
"refunds": [],
"paymentStatus": "paid",
"orderStatus": "fulfilled",
"refundedAmount": 0,
"shippingCost": 12,
"shippingDiscountAmount": 0,
"taxAmount": 0,
"couponCodes": [],
"discounts": [],
"discountAmount": 0,
"lineDiscountAmount": 0,
"additionalCosts": [],
"subTotal": 540,
"total": 552,
"totalPaid": 552,
"staffNotes": "Deliver to dock 3.",
"approved": true,
"approvalBy": { "name": "Maria Lopez", "user": "664dec6cd5775459152d4926", "type": "customer" },
"isCompanyDeleted": false,
"createdBy": { "id": "664dec6cd5775459152d4926", "name": "Maria Lopez", "type": "store" },
"metaFields": [],
"timeline": [],
"createdAt": "2024-05-23T11:05:52.550Z",
"updatedAt": "2024-05-24T15:20:00.120Z"
}
}
Response Details
Order Data
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of the order. |
entityId | String | Order number shown to customers and staff. |
checkout | String | ID of the storefront checkout the order came from, if any. |
company | String | ID of the customer's company, for B2B orders. |
customer | String | ID of the customer who placed the order. |
customerDetails | Object | Customer firstName, lastName, email and phoneNumber. |
companyDetails | Object | Company name, email and phoneNumber, for B2B orders. |
guestOrder | Boolean | Whether the order was placed without an account. |
orderedAt | String | Date and time the order was placed. |
shippingAddress | Object | Shipping address. See Address Object. |
billingAddress | Object | Billing address. See Address Object. |
lineItems | Array | Ordered items. See Line Item Object. |
currency | Object | Store currency currency (code) and symbol. All amounts use this currency. |
selectedCurrency | Object | Currency the customer shopped in, with its exchange rate, if different from the store currency. |
selectedCurrencyAmount | Object | Order amounts in the customer's selected currency. |
shipmentDetails | Object | Selected shipping method (name, label, shippingMethodId). |
paymentDetails | Array | Payment method entries chosen at checkout, such as offline methods. |
payments | Array | Payments recorded for this order. See Payment Object. |
fulfilledItems | Array | Shipments. See Shipment Object. |
warehouseDetails | Object | Fulfilling warehouse id and name, when set. |
paymentTerm | Object | Payment term paymentTermId, name, paymentDueDays, dueType, depositRequired, depositPercentage. |
refunds | Array | Refunds, each with paymentId, reason and amount. |
paymentStatus | String | unpaid, authorized, declined, partially paid, paid, partially refunded, refunded, voided or processing. |
orderStatus | String | pending, processing, partially fulfilled, fulfilled, restocked, cancelled or voided. |
refundedAmount | Number | Amount refunded. |
shippingCost | Number | Shipping charge. |
shippingDiscountAmount | Number | Discount on shipping. |
taxAmount | Number | Tax charged. |
couponCodes | Array | Coupon codes used. |
discounts | Array | Order and shipping discounts applied. |
discountAmount | Number | Total order-level discount. |
lineDiscountAmount | Number | Total line-level discount. |
storeCreditAmount | Number | Store credit used. |
additionalCosts | Array | Extra charges, each with name and amount. |
subTotal | Number | Sum of all line totals. |
total | Number | Order total. |
totalPaid | Number | Amount paid so far. |
customerNotes | String | Notes the customer entered at checkout. |
staffNotes | String | Internal notes. |
approved | Boolean | Whether the order is approved. |
approvalBy | Object | Who approved the order. |
isCompanyDeleted | Boolean | Whether the customer's company has been deleted. |
createdBy | Object | Who created the order (id, name, type). Orders created through the API have type api. |
metaFields | Array | Custom field values. See Metafields. |
timeline | Array | Order history events. |
createdAt | String | Date and time the order was created (ISO 8601). |
updatedAt | String | Date and time the order was last updated (ISO 8601). |
Line Item Object
| Field | Type | Description |
|---|---|---|
id | String | Line item ID. Use it as lineItemId when updating or shipping the order. |
productId | String | Product ID. |
variantId | String | Variant ID, for products with variants. |
name | String | Product name. |
image | String | Product image URL. |
sku | String | SKU of the ordered variant or product. |
productSku | String | SKU of the parent product. |
quantity | Number | Quantity ordered. |
price | Number | Unit price. |
extendedTotalPrice | Number | Line total. |
discountAmount | Number | Discount on this line. |
isFreeGift | Boolean | Whether the line is a free gift from a promotion. |
options | Array | Variant options (optionName, optionValueLabel, optionValue). |
fulfilledQuantity | Number | Quantity shipped so far. |
returned | Boolean | Whether the line has been returned. |
selectedCurrencyPrice | Object | Line prices in the customer's selected currency. |
Address Object
| Field | Type | Description |
|---|---|---|
shippingAddressId / billingAddressId | String | ID of the saved address. |
firstName, lastName | String | Recipient name. |
companyName, companyEmail | String | Company contact details. |
address1, address2 | String | Street address. |
city | String | City. |
state | Object | State name and code. |
country | Object | Country name and code. |
zipcode | String | Postal code. |
phoneNumber | String | Phone number. |
Shipment Object
| Field | Type | Description |
|---|---|---|
_id | String | Shipment ID. Use it to void a shipment. |
items | Array | Lines in the shipment, with lineItemId, quantity and remainingQuantity. |
carrier | String | Carrier code or name. |
carrierName | String | Carrier display name. |
trackingNumber | String | Tracking number. |
trackingUrl | String | Tracking page URL. |
labelId, labelDownloadUrl | String | Shipping label details, when a label was generated. |
packageDetail | Object | Package details sent when shipping. |
fulfilledAt | String | Date and time of the shipment. |
voided | Boolean | Whether the shipment has been voided. |
Payment Object
| Field | Type | Description |
|---|---|---|
id | String | Payment ID. |
entityId | String | Payment number. |
amount | Number | Payment amount. |
amountReceived | Number | Amount received. |
status | String | Payment status, for example captured. |
methodName, methodLabel | String | Payment method. |
type | String | online (card payment at checkout), store_credit, manual or external (recorded through Update Order). |
gatewayRef | String | Payment reference or transaction ID. |
refundedAmount | Number | Amount refunded from this payment. |
createdBy | Object | Who recorded the payment. |
createdAt | String | Date and time the payment was recorded. |