Skip to Content

POST Orders

Use this endpoint to create a new order within a branch.

User level: Advanced

Endpoint

POST /v1/{scopeId}/orders
PropertyValue
MethodPOST
Scope IDBranch UUID
AuthenticationAuthorization: Bearer <access_token>
Required scoperoutix:orders:write
Content-Typeapplication/json
Request bodyJSON object

Create rules

  • The API validates server-side whether the order belongs to the allowed organization and branch.
  • organization_id and branch_id are 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_request
  • 400 invalid_create
  • 400 create_failed
  • 401 unauthorized
  • 401 invalid_token
  • 403 invalid_token_type
  • 403 insufficient_scope
  • 404 not_found
  • 405 method_not_allowed
Last updated on