Skip to content

Get Customer Order

Retrieve detailed information for a specific customer order by its ID. Customers can only access their own orders — requesting another customer's order returns a 404, preventing enumeration attacks.

Endpoint

GET /api/shop/customer-orders/{id}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Path Parameters

ParameterTypeRequiredDescription
idintegerYesCustomer order ID

Response Fields (200 OK)

One order, flat, with four nested blocks at the end. There is no wrapper object.

Identity and status

FieldTypeDescription
idintegerInternal order ID — the value used in this path.
incrementIdstringOrder number shown to the customer.
statusstringOrder status — see Get Customer Orders for the list.
channelNamestringChannel the order was placed on.
isGuestinteger1 when the order was placed without an account.
isGiftinteger1 when the order was marked as a gift.
customerId / channelId / cartIdintegerRelated record IDs.
customerEmail / customerFirstName / customerLastName / customerFullNamestringContact details captured at checkout.
createdAt / updatedAtstringISO 8601 timestamps.

Shipping and discounts

FieldTypeDescription
shippingMethodstringMethod code, e.g. flatrate_flatrate.
shippingTitle / shippingDescriptionstringHuman-readable method label and description.
couponCodestringCoupon applied at checkout, null when none was used.
appliedCartRuleIdsstringComma-separated IDs of the cart rules that fired.
totalItemCount / totalQtyOrderedintegerDistinct lines, and the sum of their quantities.

Money

Every monetary figure comes in an order-currency form and a base* form in the store's base currency. Each family also carries Invoiced and Refunded variants, so a client can show what has actually been billed and returned rather than only what was ordered.

FamilyFields
Grand totalgrandTotal, baseGrandTotal, grandTotalInvoiced, baseGrandTotalInvoiced, grandTotalRefunded, baseGrandTotalRefunded
SubtotalsubTotal, baseSubTotal, subTotalInvoiced, baseSubTotalInvoiced, subTotalRefunded, baseSubTotalRefunded, subTotalInclTax, baseSubTotalInclTax
DiscountdiscountPercent, discountAmount, baseDiscountAmount, discountInvoiced, baseDiscountInvoiced, discountRefunded, baseDiscountRefunded
TaxtaxAmount, baseTaxAmount, taxAmountInvoiced, baseTaxAmountInvoiced, taxAmountRefunded, baseTaxAmountRefunded
ShippingshippingAmount, baseShippingAmount, shippingInvoiced, baseShippingInvoiced, shippingRefunded, baseShippingRefunded, shippingDiscountAmount, baseShippingDiscountAmount, shippingTaxAmount, baseShippingTaxAmount, shippingTaxRefunded, baseShippingTaxRefunded, shippingAmountInclTax, baseShippingAmountInclTax
CurrencyorderCurrencyCode, baseCurrencyCode, channelCurrencyCode

Amounts are raw numbers, not formatted strings — apply the symbol for orderCurrencyCode client-side.

Items

FieldTypeDescription
idintegerOrder-line ID.
sku / namestringProduct identity as captured at checkout.
type / productTypestringProduct type, e.g. simple.
productIdintegerThe catalog product; use it to link back to the product page.
qtyOrdered / qtyShipped / qtyInvoiced / qtyCanceled / qtyRefundedintegerPer-line quantity breakdown.
price / basePrice / priceInclTaxfloatUnit price.
total / baseTotal / totalInclTaxfloatLine total.
discountPercent / discountAmount / taxPercent / taxAmountfloatPer-line discount and tax.

Addresses

The addresses array holds the billing and shipping addresses, told apart by addressType.

FieldTypeDescription
idintegerAddress record ID.
addressTypestringorder_billing or order_shipping.
firstName / lastName / gender / companyName / vatIdstringRecipient details.
address / city / state / country / postcodestringLocation, with the street under address.
email / phonestringContact details captured with the address.

Payment and Shipments

The payment block is a single object of id, method, and methodTitle. shipments is an array, empty until the order ships.

Error Responses

StatusBody detailCause
404Customer order with ID "999999" not foundNo such order, or the order belongs to another customer. The two cases are deliberately indistinguishable.
403Unauthenticated. Please login to perform this actionNo customer Bearer token was sent.
401The storefront key header was missing or wrong.

Use Cases

  • Order detail page — one call returns the lines, both addresses, and the payment method, so no follow-up fetches are needed.
  • "Partially shipped" badge — compare qtyShipped against qtyOrdered per line; the order-level status alone does not show partial fulfilment.
  • Refund summary — the *Refunded figures state what was actually returned, which the order total does not reflect.
  • Reorderitems[].productId and qtyOrdered are enough to rebuild a cart.

Best Practices

  • Show incrementId, keep id — the increment ID is the number on the customer's confirmation email; the plain id is internal and addresses this endpoint.
  • Read the Invoiced and Refunded variants before showing "amount paid"grandTotal is what was ordered, not what has been billed.
  • Do not treat an empty shipments array as an error — it simply means nothing has shipped yet.
  • Split addresses by addressType — both live in one array, and a page that renders addresses[0] as billing will be wrong whenever the order shipped first.

Released under the MIT License.