Order
Create Order
Changed onCreate a new order if it does not already exist. Duplicate orders return a validation error. For idempotent create-or-update behavior, use the PUT endpoint.
Payload validation:
- Request-blocking validation failures return HTTP 400 and no order or mutation history is written. Serializer and Pydantic validation errors use the standard {"type": "client_error", "errors": [...]} shape. Early order identifier and account authorization failures return {"detail": "..."}.
- recipient_email must be a valid email address or the literal _unset.
- Country, language, currency, timezone, enum, date, datetime, decimal, length, and required-field validations are enforced at the request boundary.
- shipping_address and tracking-level shipping_address are strictly validated, including region codes. billing_address uses the more permissive address schema and can coerce invalid region codes to null.
- Mutation payloads must use a supported type. Tracking mutations require either tracking_number plus courier, or external_reference.
- Tracking-level delivery_method must be configured for the account.
- add_tracking with tracking_number plus courier performs a best-effort same-account conflict check before enqueueing. The check is eventually consistent and Backend persistence still enforces downstream uniqueness.
Successful responses can still contain per-mutation validation information:
- Non-fatal validation warnings are returned in mutations[].result.warnings. Today this covers dropped unrecognized add_tracking.tracking fields and articles_order replacement warnings when mutations are present.
- Accepted mutation failures do not reject the whole request. The HTTP response remains 200 or 201, while the affected mutation returns mutations[].result.success=false.
post/v4/track/orders/
Request
- The document declares no server URL.
- Auth
- API key in header Authorization
- or HTTP bearer
Request body
Example request
{
"articles_order": [
{
"article_name": "Blue T-Shirt",
"line_item_id": "ITEM-001",
"product_id": "PROD-123",
"quantity": 2,
"sku": "TSHIRT-BLUE-M"
}
],
"mutations": [
{
"tracking": {
"articles": [
{
"article_name": "Blue T-Shirt",
"line_item_id": "ITEM-001",
"product_id": "PROD-123",
"quantity": 2,
"sku": "TSHIRT-BLUE-M"
}
]
}
}
]
}Response
Order payload. Mutation actions include mutations[].result. Non-fatal validation warnings are returned in mutations[].result.warnings; accepted mutation failures are returned as mutations[].result.success=false.
Example response
{
"articles_order": [
{
"article_name": "Blue T-Shirt",
"line_item_id": "ITEM-001",
"product_id": "PROD-123",
"quantity": 2,
"sku": "TSHIRT-BLUE-M"
}
],
"mutations": [
{
"tracking": {
"articles": [
{
"article_name": "Blue T-Shirt",
"line_item_id": "ITEM-001",
"product_id": "PROD-123",
"quantity": 2,
"sku": "TSHIRT-BLUE-M"
}
]
}
}
]
}Changes
- info
endpoint added
- info