Skip to main content
The Admin Orders API gives you full visibility into every order placed on the platform and the ability to drive each order through its lifecycle. You can query the entire order queue with flexible filtering, inspect line-item snapshots and payment details for any individual order, and trigger status transitions that automatically apply side effects — such as creating shipment records, releasing reserved inventory, or marking payments as refunded. All write operations are guarded by CSRF token validation.
All endpoints under /admin/orders require an authenticated session with the ADMIN or SUPER_ADMIN role. For every PATCH request, first call GET /auth/csrf-token and pass the returned token in the x-csrf-token header.

Order Status Lifecycle

Every order begins in pending status and advances through a fixed set of allowed transitions. The server enforces the transition matrix — any attempt to move to a disallowed status returns 409 Conflict.
Status transitions trigger automatic side effects on the server:
  • shipped — creates a shipment record with the provided carrier and optional tracking_number.
  • cancelled — releases any reserved or committed inventory back to quantity_available for the affected variants.
  • refunded — marks the associated payment record as refunded.
You do not need to call separate inventory or payment endpoints — the transition endpoint handles all side effects atomically.

List Orders

Retrieve a paginated list of all orders across all customers. Filter by status, search by order number or customer name, and narrow results to a specific date window.

Query Parameters

integer
default:"1"
Page number (1-based).
integer
default:"20"
Results per page. Range: 1–100.
string
Filter by order status. Accepted values: pending, confirmed, processing, shipped, delivered, cancelled, returned, refunded.
Free-text search across order number and customer name/email.
string
ISO 8601 datetime (with timezone offset) for the inclusive lower bound of the placed_at range. Example: 2024-01-01T00:00:00.000Z.
string
ISO 8601 datetime for the inclusive upper bound of placed_at. Must be greater than or equal to placed_from. Example: 2024-12-31T23:59:59.000Z.
string
default:"-placed_at"
Sort field. Prefix with - for descending. Accepted values: placed_at, -placed_at, order_number, -order_number, total_amount, -total_amount, customer_name, -customer_name.

Response

boolean
Always true on a 200 response.
array
Array of order summary objects.
object
Pagination metadata.
Example — list all shipped orders from Q1 2024
200 Response

Get Order Detail

Retrieve the full detail of a single order, including all line items with frozen price snapshots, the shipping address, payment information, and shipment tracking data (if available).

Path Parameters

string
required
The order’s public ID. Must start with ord_.

Response

boolean
Always true on a 200 response.
object
Full order detail object.
Example — fetch a single order
200 Response

Update Order Status

Advance an order to the next permitted status. Pass the target status in the request body. When transitioning to shipped, you must also provide a carrier; tracking_number is optional but recommended.
Invalid status transitions — for example, attempting to move an order from pending directly to shipped, or re-opening a cancelled order — return 409 Conflict. Always check the transition table above before calling this endpoint. A 409 is also returned if a concurrent update wins a row-lock race.

Path Parameters

string
required
The order’s public ID. Must start with ord_.

Request Body

string
required
The target status. Accepted values: confirmed, processing, shipped, delivered, cancelled, returned, refunded.
string
Shipping carrier name (e.g. "DHL", "FedEx"). Required when status is shipped. Maximum 100 characters.
string
Carrier tracking number. Optional, but strongly recommended when transitioning to shipped. Maximum 100 characters.
200 Response — shipped
409 Response — illegal transition