POST Orders
Gebruik dit endpoint om een nieuwe order binnen een branch aan te maken.
Gebruikersniveau: Gevorderd
Endpoint
POST /v1/{scopeId}/orders| Eigenschap | Waarde |
|---|---|
| Method | POST |
| Scope ID | Branch UUID |
| Authenticatie | Authorization: Bearer <access_token> |
| Vereiste scope | routix:orders:write |
| Content-Type | application/json |
| Request body | JSON object |
Create-regels
- De API controleert server-side of de order binnen de toegestane organization en branch valt.
organization_idenbranch_idworden server-side gezet.- Alleen toegestane velden mogen in de request body worden meegestuurd.
Toegestane createvelden
| Veld |
|---|
reference |
status |
account_id |
pickup_date |
delivery_date |
comment |
Voorbeeldrequest
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"
}'Voorbeeldresponse
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440011",
"reference": "ORD-2025-001",
"status": "draft",
"account_id": "550e8400-e29b-41d4-a716-446655440010"
},
"version": "v1"
}Foutresponse
{
"error": "create_failed",
"error_description": "The order could not be created"
}Mogelijke foutcodes
400 invalid_request400 invalid_create400 create_failed401 unauthorized401 invalid_token403 invalid_token_type403 insufficient_scope404 not_found405 method_not_allowed
Last updated on

