Skip to main content

Orders

Authenticated API

Order endpoints require a valid JWT Bearer token. Accessible via the API gateway at /v1/commerce/orders/*.

Create Order

POST /v1/commerce/orders

Request

FieldTypeRequiredDescription
sourcestringYesOrder source: "pos", "qr_code", "mobile_app", "kiosk", "online"
currencystringYesISO 4217 currency code (e.g., "USD")
itemsarrayYesOrder line items (see below)
location_idstring (UUID)NoLocation UUID
customer_idstring (UUID)NoCustomer UUID
table_idstring (UUID)NoTable UUID (for dine-in)
guest_namestringNoGuest name (for takeout/delivery)
notesstringNoOrder-level notes
send_to_kdsbooleanNoAuto-route to kitchen display (default: false)
metadataobjectNoCustom key-value metadata

Item Fields

FieldTypeRequiredDescription
namestringYesItem name
quantityintegerYesQuantity
unit_pricenumberYesPrice per unit
menu_item_idstring (UUID)NoLink to menu item
modifiersobjectNoModifier selections
notesstringNoItem-level notes (e.g., "no onions")
course_typestringNo"fire_now", "appetizer", "main", "dessert"
seat_numberintegerNoSeat number for split checks

Response

{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"tenant_id": "550e8400-e29b-41d4-a716-446655449100",
"location_id": "550e8400-e29b-41d4-a716-446655449110",
"source": "pos",
"status": "pending",
"currency": "USD",
"subtotal": 14.99,
"tax_total": 1.20,
"discount_total": 0.00,
"total": 16.19,
"items": [
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"order_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Margherita Pizza",
"quantity": 1,
"unit_price": 14.99,
"total_price": 14.99,
"modifiers": {},
"notes": null
}
],
"created_at": "2026-02-19T15:30:00Z",
"updated_at": "2026-02-19T15:30:00Z"
}

Examples

curl -X POST https://dev.api.olympuscloud.ai/v1/commerce/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"source": "pos",
"currency": "USD",
"table_id": "550e8400-e29b-41d4-a716-446655440001",
"send_to_kds": true,
"items": [
{
"name": "Margherita Pizza",
"quantity": 1,
"unit_price": 14.99,
"course_type": "main"
},
{
"name": "Caesar Salad",
"quantity": 1,
"unit_price": 9.99,
"course_type": "appetizer"
}
]
}'

Get Order

GET /v1/commerce/orders/:id

curl https://dev.api.olympuscloud.ai/v1/commerce/orders/b2c3d4e5-f6a7-8901-bcde-f12345678901 \
-H "Authorization: Bearer $TOKEN"

List Orders

GET /v1/commerce/orders

Query parameters:

ParameterTypeDescription
statusstringFilter by status: pending, confirmed, preparing, ready, completed, cancelled
location_idUUIDFilter by location
limitintegerMax results (default: 50)
offsetintegerPagination offset
curl "https://dev.api.olympuscloud.ai/v1/commerce/orders?status=pending&limit=10" \
-H "Authorization: Bearer $TOKEN"

Update Order Status

PUT /v1/commerce/orders/:id/status

curl -X PUT https://dev.api.olympuscloud.ai/v1/commerce/orders/ORDER_ID/status \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"status": "confirmed"}'

Order Status Flow

draft → pending → confirmed → preparing → ready → completed
↘ cancelled
↘ refunded

Calculate Order Total

POST /v1/commerce/orders/calculate

Pre-calculate totals (subtotal, tax, discounts) before submitting an order.

Response

{
"subtotal": 24.98,
"tax": 2.00,
"total": 26.98,
"tip": 0.00,
"delivery_fee": 0.00,
"discount": 0.00
}