POST
/v1/orders
Create Order
Summary
Create an order from a quote
Description
Creates a manufacturing order from an approved quote. The quote must be valid and not expired.
Request Example
curl -X POST "http://127.0.0.1:8000/api/v1/orders" \
-H "Authorization: Bearer asap_dev_change_me" \
-H "Content-Type: application/json" \
-d '{"quote_id": "quo_1234567890abcdef", "po_number": "PO-12345", "contact": {"name": "John Doe", "email": "john@example.com"}}'
Response Example
{
"request_id": "req_1234567890abcdef",
"order_id": "ord_1234567890abcdef",
"created_at": "2026-01-23T11:00:00Z",
"status": "accepted",
"quote_id": "quo_1234567890abcdef",
"tracking": null,
"timeline": [
{"status": "accepted", "at": "2026-01-23T11:00:00Z"}
]
}
Error Codes
This endpoint may return the following error codes:
| Code | Status | Meaning |
|---|---|---|
missing_auth |
401 | No Authorization header provided |
invalid_api_key |
403 | API key is invalid or missing |
invalid_quote_id |
400 | quote_id must look like 'quo_...' |
quote_not_found |
404 | Quote not found or expired |
Authentication
This endpoint requires Bearer token authentication:
Authorization: Bearer YOUR_API_KEY