POST Orders
Use this endpoint to create a new order within a branch.
User level: Advanced
Endpoint
POST /v1/{scopeId}/orders| Property | Value |
|---|---|
| Method | POST |
| Scope ID | Branch UUID |
| Authentication | Authorization: Bearer <access_token> |
| Required scope | routix:orders:write |
| Content-Type | application/json |
| Request body | JSON object |
Create rules
- The API validates server-side whether the order belongs to the allowed organization and branch.
organization_idandbranch_idare set server-side.- Only allowed fields can be sent in the request body.
Allowed create fields
| Field |
|---|
reference |
status |
account_id |
pickup_date |
delivery_date |
comment |
Example request
curl -X POST "https://api.routix.com/v1/550e8400-e29b-41d4-a716-446655440000/orders" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{
"reference": "ORD-2025-001",
"status": "draft",
"account_id": "550e8400-e29b-41d4-a716-446655440010",
"pickup_date": "2025-01-20",
"delivery_date": "2025-01-21"
}'Example response
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440011",
"reference": "ORD-2025-001",
"status": "draft",
"account_id": "550e8400-e29b-41d4-a716-446655440010"
},
"version": "v1"
}Error response
{
"error": "create_failed",
"error_description": "The order could not be created"
}Possible error codes
400 invalid_request400 invalid_create400 create_failed401 unauthorized401 invalid_token403 invalid_token_type403 insufficient_scope404 not_found405 method_not_allowed
Last updated on

