Full Order API Spec

Our powerful API integration allows you to submit each individual parcel and order, get instant feedback, and have the most flexible data structures.

Create or Update a Tracking/Order

You can create a new tracking and order in the parcelLab system using the v4/track/orders endpoint. This allows you to submit tracking information (that is: courier and tracking_number) for one or multiple parcels with a corresponding order number and can also be used to inform parcelLab to expect tracking information for a specified order.

If submitting the order details before the tracking information, the relevant tracking details that follow should be sent via the v4/track/orders endpoint as well when you receive it.

Send shipping_address or billing_address only when you can provide a complete address object. Each address object requires address_line, postal_code, city, and country_iso3; blank strings and null values are not accepted for these fields. If a complete shipping address is not available, omit shipping_address and send order-level fields such as destination_country_iso3, recipient_email, recipient_name, and, when available, recipient_postal_code on the tracking instead.

Create or Update Order (recommended)

put

Create or update an order. If the order already exists, only changed fields or mutation actions such as add_tracking, cancel_tracking, or line-item mutations need to be submitted. This endpoint is idempotent. external_id or order_number is required to identify the order.

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.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

Create a new order record with shipment and recipient data.

accountintegerOptional

Account to which this order belongs

order_numberstring · min: 1 · max: 255Optional

Order number (customer facing)

external_referencestring · max: 255Optional

Retailer reference (e.g. internal system ID) for this order, unique.

client_keystring · max: 512Optional

Name of the technical client / shop (corresponds to the system setup), e.g. 'mybrand-a.com'

destination_country_iso3string · min: 1 · max: 3Optional

Destination country ISO 3166-1 alpha 3 code

language_iso2string · max: 3Optional

ISO 639-1 language code of the recipient, if known, required for localized communication

shipping_addressany ofOptional
or
object · EmptyOptional
delivery_methodstring · max: 255Optional

Delivery method (e.g. 'standard shipping'), needs to be set up in the system

recipient_emailany of · min: 1Optional

Recipient email address, must be provided, in case email is not known or should be unset, use the literal string '_unset' instead.

string · emailOptional
or
const: _unsetOptionalPossible values:
recipient_namestring · max: 255Optional

Recipient name

customer_numberstring · max: 255Optional

Customer number (e.g. from the retailer)

invoice_numberstring · max: 255Optional

Invoice number (e.g. from the retailer)

payment_methodstring · max: 255Optional

Payment method (e.g. 'credit card')

order_total_amountstring · nullableOptional

Total amount of the order (usually after tax & discount)

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_tax_amountstring · nullableOptional

Tax amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_net_amountstring · nullableOptional

Net amount of the order (usually before tax)

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_discount_amountstring · nullableOptional

Discount amount of the order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_currencystring · max: 3Optional

Currency of the order, e.g. USD, EUR (ISO 4217)

order_datestring · nullableOptional

Date and time when the order was placed

channelstring · max: 255Optional

Channel through which the order was placed (e.g. 'webshop')

announced_delivery_datestring · nullableOptional

Announced delivery date

announced_delivery_date_minstring · nullableOptional

Announced delivery date range of order (min)

announced_delivery_date_maxstring · nullableOptional

Announced delivery date range of order (min)

billing_addressany ofOptional
or
object · EmptyOptional
timezonestringOptional

Timezone of the recipient, if known, not required, but strongly recommended

order_statusstring · max: 255Optional

Current status of the order, as setup in the system

has_multiple_shipmentsboolean · nullableOptional

Indicates this order has been split into multiple shipments

cancelled_datestring · nullableOptional

Datetime when the order was cancelled

cancelled_reasonstring · enumOptional
  • customer - Customer
  • inventory - Inventory
  • payment - Payment-related
  • other - Other
Possible values:
tagsstring[]Optional

Tags for the object, format :e.g. 'category:Home Apparel'

Responses
200

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.

application/json

Create a new order record with shipment and recipient data.

accountintegerRequired

Account to which this order belongs

order_numberstring · max: 255Required

Order number (customer facing)

external_idstringRead-onlyRequired

Unique identifier for this order, generated by parcelLab for this order

external_referencestring · max: 255Optional

Retailer reference (e.g. internal system ID) for this order, unique.

client_keystring · max: 512Optional

Name of the technical client / shop (corresponds to the system setup), e.g. 'mybrand-a.com'

destination_country_iso3string · max: 3Required

Destination country ISO 3166-1 alpha 3 code

language_iso2string · max: 3Optional

ISO 639-1 language code of the recipient, if known, required for localized communication

shipping_addressany ofOptional
or
object · EmptyOptional
delivery_methodstring · max: 255Optional

Delivery method (e.g. 'standard shipping'), needs to be set up in the system

recipient_emailany ofRequired

Recipient email address, must be provided, in case email is not known or should be unset, use the literal string '_unset' instead.

string · emailOptional
or
const: _unsetOptionalPossible values:
recipient_namestring · max: 255Optional

Recipient name

customer_numberstring · max: 255Optional

Customer number (e.g. from the retailer)

invoice_numberstring · max: 255Optional

Invoice number (e.g. from the retailer)

payment_methodstring · max: 255Optional

Payment method (e.g. 'credit card')

order_total_amountstring · nullableOptional

Total amount of the order (usually after tax & discount)

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_tax_amountstring · nullableOptional

Tax amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_net_amountstring · nullableOptional

Net amount of the order (usually before tax)

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_discount_amountstring · nullableOptional

Discount amount of the order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_currencystring · max: 3Optional

Currency of the order, e.g. USD, EUR (ISO 4217)

order_datestring · nullableOptional

Date and time when the order was placed

channelstring · max: 255Optional

Channel through which the order was placed (e.g. 'webshop')

announced_delivery_datestring · nullableOptional

Announced delivery date

announced_delivery_date_minstring · nullableOptional

Announced delivery date range of order (min)

announced_delivery_date_maxstring · nullableOptional

Announced delivery date range of order (min)

billing_addressany ofOptional
or
object · EmptyOptional
timezonestringOptional

Timezone of the recipient, if known, not required, but strongly recommended

order_statusstring · max: 255Optional

Current status of the order, as setup in the system

has_multiple_shipmentsboolean · nullableOptional

Indicates this order has been split into multiple shipments

cancelled_datestring · nullableOptional

Datetime when the order was cancelled

cancelled_reasonstring · enumOptional
  • customer - Customer
  • inventory - Inventory
  • payment - Payment-related
  • other - Other
Possible values:
tagsstring[]Optional

Tags for the object, format :e.g. 'category:Home Apparel'

put
/v4/track/orders/

Create a Tracking/Order

You can create trackings and orders in the parcelLab system using the v4/track/orders endpoint.

The same endpoint is used to create and update a tracking and order. For further information, see how to update an order.

Create Order

post

Create 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.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

Create a new order record with shipment and recipient data.

accountintegerRequired

Account to which this order belongs

order_numberstring · min: 1 · max: 255Required

Order number (customer facing)

external_referencestring · max: 255Optional

Retailer reference (e.g. internal system ID) for this order, unique.

client_keystring · max: 512Optional

Name of the technical client / shop (corresponds to the system setup), e.g. 'mybrand-a.com'

destination_country_iso3string · min: 1 · max: 3Required

Destination country ISO 3166-1 alpha 3 code

language_iso2string · max: 3Optional

ISO 639-1 language code of the recipient, if known, required for localized communication

shipping_addressany ofOptional
or
object · EmptyOptional
delivery_methodstring · max: 255Optional

Delivery method (e.g. 'standard shipping'), needs to be set up in the system

recipient_emailany of · min: 1Required

Recipient email address, must be provided, in case email is not known or should be unset, use the literal string '_unset' instead.

string · emailOptional
or
const: _unsetOptionalPossible values:
recipient_namestring · max: 255Optional

Recipient name

customer_numberstring · max: 255Optional

Customer number (e.g. from the retailer)

invoice_numberstring · max: 255Optional

Invoice number (e.g. from the retailer)

payment_methodstring · max: 255Optional

Payment method (e.g. 'credit card')

order_total_amountstring · nullableOptional

Total amount of the order (usually after tax & discount)

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_tax_amountstring · nullableOptional

Tax amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_net_amountstring · nullableOptional

Net amount of the order (usually before tax)

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_discount_amountstring · nullableOptional

Discount amount of the order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_currencystring · max: 3Optional

Currency of the order, e.g. USD, EUR (ISO 4217)

order_datestring · nullableOptional

Date and time when the order was placed

channelstring · max: 255Optional

Channel through which the order was placed (e.g. 'webshop')

announced_delivery_datestring · nullableOptional

Announced delivery date

announced_delivery_date_minstring · nullableOptional

Announced delivery date range of order (min)

announced_delivery_date_maxstring · nullableOptional

Announced delivery date range of order (min)

billing_addressany ofOptional
or
object · EmptyOptional
timezonestringOptional

Timezone of the recipient, if known, not required, but strongly recommended

order_statusstring · max: 255Optional

Current status of the order, as setup in the system

has_multiple_shipmentsboolean · nullableOptional

Indicates this order has been split into multiple shipments

cancelled_datestring · nullableOptional

Datetime when the order was cancelled

cancelled_reasonstring · enumOptional
  • customer - Customer
  • inventory - Inventory
  • payment - Payment-related
  • other - Other
Possible values:
tagsstring[]Optional

Tags for the object, format :e.g. 'category:Home Apparel'

Responses
post
/v4/track/orders/

Retrieve All Orders

You can retrieve a list of all orders for your account using the v4/track/orders endpoint.

List Orders

get

List all orders

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountinteger[]Optional
cursorstringOptional

The pagination cursor value.

external_referencestringOptional
order_numberstringOptional
orderingstringOptional

Order results by any response field. Prefix with - for descending (e.g. -id).

Responses
200Success
application/json
nextstring · uri · nullableOptionalExample: http://api.example.org/accounts/?cursor=cD00ODY%3D"
previousstring · uri · nullableOptionalExample: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
get
/v4/track/orders/

Retrieve Orders by ID

You can retrieve a specific order using the v4/track/orders endpoint.

Lookup Order (by identifier)

get

Looks up an order by a unique identifier, either order_number or external_id. Returns all static order information,and order trackings.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
unique_idstringRequiredPattern: ^(?!info)[^/.]+$
Query parameters
Responses
200Success
application/json

Create a new order record with shipment and recipient data.

accountintegerRequired

Account to which this order belongs

order_numberstring · max: 255Required

Order number (customer facing)

external_idstringRead-onlyRequired

Unique identifier for this order, generated by parcelLab for this order

external_referencestring · max: 255Optional

Retailer reference (e.g. internal system ID) for this order, unique.

client_keystring · max: 512Optional

Name of the technical client / shop (corresponds to the system setup), e.g. 'mybrand-a.com'

destination_country_iso3string · max: 3Required

Destination country ISO 3166-1 alpha 3 code

language_iso2string · max: 3Optional

ISO 639-1 language code of the recipient, if known, required for localized communication

shipping_addressany ofOptional
or
object · EmptyOptional
delivery_methodstring · max: 255Optional

Delivery method (e.g. 'standard shipping'), needs to be set up in the system

recipient_emailany ofRequired

Recipient email address, must be provided, in case email is not known or should be unset, use the literal string '_unset' instead.

string · emailOptional
or
const: _unsetOptionalPossible values:
recipient_namestring · max: 255Optional

Recipient name

customer_numberstring · max: 255Optional

Customer number (e.g. from the retailer)

invoice_numberstring · max: 255Optional

Invoice number (e.g. from the retailer)

payment_methodstring · max: 255Optional

Payment method (e.g. 'credit card')

order_total_amountstring · nullableOptional

Total amount of the order (usually after tax & discount)

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_tax_amountstring · nullableOptional

Tax amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_net_amountstring · nullableOptional

Net amount of the order (usually before tax)

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_discount_amountstring · nullableOptional

Discount amount of the order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_currencystring · max: 3Optional

Currency of the order, e.g. USD, EUR (ISO 4217)

order_datestring · nullableOptional

Date and time when the order was placed

channelstring · max: 255Optional

Channel through which the order was placed (e.g. 'webshop')

announced_delivery_datestring · nullableOptional

Announced delivery date

announced_delivery_date_minstring · nullableOptional

Announced delivery date range of order (min)

announced_delivery_date_maxstring · nullableOptional

Announced delivery date range of order (min)

billing_addressany ofOptional
or
object · EmptyOptional
timezonestringOptional

Timezone of the recipient, if known, not required, but strongly recommended

order_statusstring · max: 255Optional

Current status of the order, as setup in the system

has_multiple_shipmentsboolean · nullableOptional

Indicates this order has been split into multiple shipments

cancelled_datestring · nullableOptional

Datetime when the order was cancelled

cancelled_reasonstring · enumOptional
  • customer - Customer
  • inventory - Inventory
  • payment - Payment-related
  • other - Other
Possible values:
tagsstring[]Optional

Tags for the object, format :e.g. 'category:Home Apparel'

get
/v4/track/orders/{unique_id}/

Retrieve the Security Hash

You can retrieve the security hash as part of the order details response (see above) to securely access the Order Status page.

The security hash is generated per tracking, not per order. Orders with multiple trackings will have multiple security hashes.

To retrieve the security hash:

  1. Call the v4/track/orders endpoint using one of the following identifiers:

    • order_number GET /v4/track/orders/{order_number}/?lookup_by=order-number&account={account_id}

    • external_id GET /v4/track/orders/{external_id}/

  2. Authenticate the request using your API token.

  3. In the response, locate the trackings array and retrieve the security_hash value.

  4. If multiple trackings exist, identify the correct one using:

    • tracking_number + courier

    • external_reference

Example response:

To use the security hash, append it to the URL of any website running our tracking plugin as &s=<securityHash>. For more information, see our Order Status page setup documentation.

Payload

The payload holds the order-specific information as specified in the data model. All attributes are named key-value pairs in a flat JSON formatted object.

All available keys can be found in the data model.

Data Model

Credentials

Credentials are assigned by our Support team as required for the services used. Overall, there are different pairs of credentials for different services to assure security.

Code Samples

You can use our API with jQuery, Node, Ruby, Python, PHP, and other programming languages.

For examples of programming languages, please fill in our contact form and they will be provided on request.

For a simple test, cURL can be used.

Last updated

Was this helpful?