Orders
Orders capture commerce transactions — purchases, plan changes, add-on attaches.
GET /api/v1/orders— listPOST /api/v1/orders— createGET /api/v1/orders/{id}— retrievePATCH /api/v1/orders/{id}— update
GET /api/v1/orders
List orders in this tenant.
Auth scope:
read
Response 200
{
"data": [
{
"id": "ord_01H...",
"tenantId": "ten_01H...",
"orderNumber": "ORD-1714672883000",
"status": "draft",
"items": [{ "productId": "prod_01H...", "quantity": 2 }],
"totalCents": 9800,
"currency": "USD",
"createdAt": "2026-05-02T14:01:23Z"
}
],
"nextActions": [
{ "rel": "createOrder", "method": "POST", "href": "/api/v1/orders" }
]
}cURL
POST /api/v1/orders
Create an order. The platform:
Evaluates
order_createpolicies. Any blocking policy returns403.Resolves prices through the pricing engine for each line item with a modeled product.
If any line references a product with non-modeled (passthrough) charges, calls the active billing adapter's
quoteCartto get an authoritative live quote. If the adapter lacksquoteCart, returns502.Persists the order with the authoritative total (mixed-cart safe).
Auth scope:
commerce
Body
contactId
UUID
no
Contact placing the order
organizationId
UUID
no
Account
items
array
no
Line items (default [])
totalCents
integer
no
Hint total (defaults to 0); ignored when pricing rules apply
currency
string (≤10)
no
Defaults to USD
customerContext
object
no
Passed to the pricing engine (segment, locale, partner)
journeyId
UUID
no
Journey that produced the order
Item shape
productId
UUID
Product reference (recommended)
quantity
integer
Defaults to 1
priceCents
integer
Hint; resolved at server-side
Response 201
Errors
400
Validation failed
403
Blocked by an order_create policy
502
Order needs a live billing-system quote and adapter cannot fulfill it
cURL
GET /api/v1/orders/{id}
Retrieve an order.
Auth scope:
read
Response 200
Same shape as data from POST, minus rulesApplied (the rules block is recorded at creation time only).
Errors
404
Order not found
cURL
PATCH /api/v1/orders/{id}
Update an order's status, items, or total. Evaluates order_update policies first.
Auth scope:
commerce
Body (all optional)
status
string (≤50)
items
array
totalCents
integer
Response 200
Errors
403
Blocked by an order_update policy
404
Order not found
cURL
Related
Last updated
Was this helpful?
