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)

FieldTypeDescription
idintegerOrder ID
incrementIdstringHuman-readable order number
statusstringOrder status
channelNamestringChannel the order was placed on
isGuestintegerWhether the order was placed as guest
customerEmailstringCustomer email
customerFirstNamestringCustomer first name
customerLastNamestringCustomer last name
shippingMethodstringShipping method code
shippingTitlestringShipping method display name
couponCodestringApplied coupon code
isGiftintegerWhether the order is a gift
totalItemCountintegerNumber of distinct items
totalQtyOrderedintegerTotal quantity ordered
baseCurrencyCodestringBase currency code
channelCurrencyCodestringChannel currency code
orderCurrencyCodestringOrder currency code
grandTotalfloatGrand total
baseGrandTotalfloatBase grand total
grandTotalInvoicedfloatGrand total invoiced
baseGrandTotalInvoicedfloatBase grand total invoiced
grandTotalRefundedfloatGrand total refunded
baseGrandTotalRefundedfloatBase grand total refunded
subTotalfloatSub total
baseSubTotalfloatBase sub total
taxAmountfloatTax amount
baseTaxAmountfloatBase tax amount
discountAmountfloatDiscount amount
baseDiscountAmountfloatBase discount amount
shippingAmountfloatShipping amount
baseShippingAmountfloatBase shipping amount
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp

Error Responses

Not Found (404):

json
{
  "message": "Customer order with ID \"999\" not found."
}

Unauthenticated (401):

json
{
  "message": "Customer is not logged in."
}

Accessing Another Customer's Order (404):

Requesting an order that belongs to a different customer returns the same 404 response, preventing enumeration attacks:

json
{
  "message": "Customer order with ID \"5\" not found."
}

Use Cases

  • Display detailed order page in customer account
  • Show order summary with all financial details
  • Track shipping method and status
  • View applied coupons and discounts
  • Display invoiced and refunded amounts

Notes

  • Customer isolation: A customer can never see another customer's orders. Requesting another customer's order returns a 404.
  • Read-only: Only GET operations are available. Orders cannot be modified through this API.
  • Channel scoping: Orders are filtered by the customer's channel for multi-tenant isolation.

Released under the MIT License.