POST /api/v1/orders
Create a new order through the public storefront checkout. Does not require authentication. Middleware:throttle:api.transactionsAuthentication: Not required
Request body
Full name of the customer. Maximum 255 characters.
Customer phone number. Maximum 20 characters.
Customer email address.
Delivery address. Maximum 500 characters.
Special instructions. Maximum 1000 characters.
Must be
pickup or delivery.One of:
cash, bank_transfer, card, pending. Defaults to pending.Optional discount code. Normalized to uppercase before validation.
UUID of the pickup/delivery location. Defaults to the tenant’s primary active location.
Array of order line items. Minimum 1 item required.
Response 201 Created
Error responses
| Status | Cause |
|---|---|
422 | Validation failure (missing fields, invalid product_id, invalid delivery_type) |
429 | Transaction rate limit exceeded |
GET /api/v1/orders
List orders for the authenticated user’s tenant. Supports filtering by status. Middleware:auth:sanctum, tenant.ownership, throttle:apiAuthentication: Required
Query parameters
Filter by order status. One of:
pending, confirmed, processing, ready, delivered, cancelled.Response 200 OK
Paginated collection of order objects (20 per page) scoped to the authenticated tenant.
GET /api/v1/orders/
Fetch a single order by ID. The order must belong to the authenticated tenant. Middleware:auth:sanctum, tenant.ownership, throttle:apiAuthentication: Required
Path parameters
Numeric order ID.
Error responses
| Status | Cause |
|---|---|
404 | Order not found or does not belong to authenticated tenant |
PATCH /api/v1/orders//status
Transition an order to a new status. Middleware:auth:sanctum, tenant.ownership, throttle:apiAuthentication: Required
Path parameters
Numeric order ID.
Request body
Target status. Must be one of the allowed order statuses:
pending, confirmed, processing, ready, delivered, cancelled.Response 200 OK
Updated order resource with the same shape as the list endpoint.
Error responses
| Status | Cause |
|---|---|
404 | Order not found |
422 | Invalid or disallowed status value |
DELETE /api/v1/orders/
Cancel an order. Internally transitions the status tocancelled.
Middleware: auth:sanctum, tenant.ownership, throttle:apiAuthentication: Required
Path parameters
Numeric order ID.
Response 204 No Content
Empty body on success.
Error responses
| Status | Cause |
|---|---|
404 | Order not found or not owned by authenticated tenant |