Skip to content

Get Customer Orders

Retrieve all orders belonging to the authenticated customer. This is a read-only API — customers can only view their own orders. Orders are automatically scoped to the authenticated customer and current channel.

Endpoint

GET /api/shop/customer-orders

Request Headers

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

Response Fields (200 OK)

The response is a plain JSON array of order objects.

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
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

Order Status Values

StatusDescription
pendingAwaiting payment confirmation
processingPayment confirmed, order being processed
completedOrder fulfilled and delivered
canceledOrder canceled
closedOrder closed
fraudFlagged as fraudulent

Empty Collection

When the customer has no orders, an empty array is returned:

json
[]

Error Responses

Unauthenticated (401):

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

Use Cases

  • Display order history in customer account dashboard
  • Show order list with status, totals, and dates
  • Track previous purchases
  • View recent orders

Notes

  • Read-only API: Only GET operations are available. Orders cannot be created, updated, or deleted through this API.
  • Customer isolation: Orders are automatically filtered by the authenticated customer. A customer can never see another customer's orders.
  • Channel scoping: Orders are filtered by the customer's channel for multi-tenant isolation.
  • Response format: The collection endpoint returns all matching orders as a flat JSON array.

Released under the MIT License.