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 inpending 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 providedcarrierand optionaltracking_number. - →
cancelled— releases any reserved or committed inventory back toquantity_availablefor the affected variants. - →
refunded— marks the associated payment record as refunded.
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.string
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 targetstatus in the request body. When transitioning to shipped, you must also provide a carrier; tracking_number is optional but recommended.
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