Skip to main content

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_ORDER or READ_WRITE_ORDER

Path Parameters​

ParameterTypeDescription
idStringRequired. 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​

FieldTypeDescription
idStringUnique identifier of the order.
entityIdStringOrder number shown to customers and staff.
checkoutStringID of the storefront checkout the order came from, if any.
companyStringID of the customer's company, for B2B orders.
customerStringID of the customer who placed the order.
customerDetailsObjectCustomer firstName, lastName, email and phoneNumber.
companyDetailsObjectCompany name, email and phoneNumber, for B2B orders.
guestOrderBooleanWhether the order was placed without an account.
orderedAtStringDate and time the order was placed.
shippingAddressObjectShipping address. See Address Object.
billingAddressObjectBilling address. See Address Object.
lineItemsArrayOrdered items. See Line Item Object.
currencyObjectStore currency currency (code) and symbol. All amounts use this currency.
selectedCurrencyObjectCurrency the customer shopped in, with its exchange rate, if different from the store currency.
selectedCurrencyAmountObjectOrder amounts in the customer's selected currency.
shipmentDetailsObjectSelected shipping method (name, label, shippingMethodId).
paymentDetailsArrayPayment method entries chosen at checkout, such as offline methods.
paymentsArrayPayments recorded for this order. See Payment Object.
fulfilledItemsArrayShipments. See Shipment Object.
warehouseDetailsObjectFulfilling warehouse id and name, when set.
paymentTermObjectPayment term paymentTermId, name, paymentDueDays, dueType, depositRequired, depositPercentage.
refundsArrayRefunds, each with paymentId, reason and amount.
paymentStatusStringunpaid, authorized, declined, partially paid, paid, partially refunded, refunded, voided or processing.
orderStatusStringpending, processing, partially fulfilled, fulfilled, restocked, cancelled or voided.
refundedAmountNumberAmount refunded.
shippingCostNumberShipping charge.
shippingDiscountAmountNumberDiscount on shipping.
taxAmountNumberTax charged.
couponCodesArrayCoupon codes used.
discountsArrayOrder and shipping discounts applied.
discountAmountNumberTotal order-level discount.
lineDiscountAmountNumberTotal line-level discount.
storeCreditAmountNumberStore credit used.
additionalCostsArrayExtra charges, each with name and amount.
subTotalNumberSum of all line totals.
totalNumberOrder total.
totalPaidNumberAmount paid so far.
customerNotesStringNotes the customer entered at checkout.
staffNotesStringInternal notes.
approvedBooleanWhether the order is approved.
approvalByObjectWho approved the order.
isCompanyDeletedBooleanWhether the customer's company has been deleted.
createdByObjectWho created the order (id, name, type). Orders created through the API have type api.
metaFieldsArrayCustom field values. See Metafields.
timelineArrayOrder history events.
createdAtStringDate and time the order was created (ISO 8601).
updatedAtStringDate and time the order was last updated (ISO 8601).

Line Item Object​

FieldTypeDescription
idStringLine item ID. Use it as lineItemId when updating or shipping the order.
productIdStringProduct ID.
variantIdStringVariant ID, for products with variants.
nameStringProduct name.
imageStringProduct image URL.
skuStringSKU of the ordered variant or product.
productSkuStringSKU of the parent product.
quantityNumberQuantity ordered.
priceNumberUnit price.
extendedTotalPriceNumberLine total.
discountAmountNumberDiscount on this line.
isFreeGiftBooleanWhether the line is a free gift from a promotion.
optionsArrayVariant options (optionName, optionValueLabel, optionValue).
fulfilledQuantityNumberQuantity shipped so far.
returnedBooleanWhether the line has been returned.
selectedCurrencyPriceObjectLine prices in the customer's selected currency.

Address Object​

FieldTypeDescription
shippingAddressId / billingAddressIdStringID of the saved address.
firstName, lastNameStringRecipient name.
companyName, companyEmailStringCompany contact details.
address1, address2StringStreet address.
cityStringCity.
stateObjectState name and code.
countryObjectCountry name and code.
zipcodeStringPostal code.
phoneNumberStringPhone number.

Shipment Object​

FieldTypeDescription
_idStringShipment ID. Use it to void a shipment.
itemsArrayLines in the shipment, with lineItemId, quantity and remainingQuantity.
carrierStringCarrier code or name.
carrierNameStringCarrier display name.
trackingNumberStringTracking number.
trackingUrlStringTracking page URL.
labelId, labelDownloadUrlStringShipping label details, when a label was generated.
packageDetailObjectPackage details sent when shipping.
fulfilledAtStringDate and time of the shipment.
voidedBooleanWhether the shipment has been voided.

Payment Object​

FieldTypeDescription
idStringPayment ID.
entityIdStringPayment number.
amountNumberPayment amount.
amountReceivedNumberAmount received.
statusStringPayment status, for example captured.
methodName, methodLabelStringPayment method.
typeStringonline (card payment at checkout), store_credit, manual or external (recorded through Update Order).
gatewayRefStringPayment reference or transaction ID.
refundedAmountNumberAmount refunded from this payment.
createdByObjectWho recorded the payment.
createdAtStringDate and time the payment was recorded.