Skip to main content
POST
/
orders
/
create-labels-async
curl --request POST \
  --url https://panel.sendcloud.sc/api/v3/orders/create-labels-async \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "integration_id": 70,
  "orders": [
    {
      "order_number": "ORDER-25763",
      "apply_shipping_rules": false
    }
  ]
}
'
{
  "data": [
    {
      "parcel_id": 420,
      "parcels_ids": [
        420
      ],
      "shipment_id": "511",
      "order_id": "593c853e-ca90-4ab4-953c-fd2f47dd8dc3",
      "order_number": "ORD-2024-00174"
    },
    {
      "parcel_id": 4428,
      "parcels_ids": [
        4428
      ],
      "shipment_id": "512",
      "order_id": "23458265234",
      "order_number": "ORD-2024-00166"
    }
  ]
}
To retrieve your documents or view announcement errors, use the id of the relevant shipment with the Retrieve a shipment endpoint. To apply shipping rules to the orders, make sure to set apply_shipping_rules to true. This endpoint will attempt to generate labels for each order. If a request for one label errors, it will still attempt to generate the other labels. Because of this, the response might return a mix of labels and errors. Use the errors source pointer field to see which labels encountered a problem.
If you create orders via the Orders API and then immediately request labels, the orders may not yet be available. Order saving is asynchronous. A successful 201 response from the Orders API does not guarantee the order is immediately ready for shipping. Before calling this endpoint, verify the order exists by retrieving it with the Retrieve an order endpoint.

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Headers

Sendcloud-Partner-Id
string

If you are an official Sendcloud Tech Partner, send your unique Sendcloud Partner UUID as a request header for the system to recognize you.

The header is not required but if it is set, the system will check it. An unknown or invalid UUID will cause a 400 error.

Body

application/json

Payload for creating labels for orders.

Note that if the sender_address_id is not specified, the API will use the default sender address associated with your account.

integration_id
integer
required

The ID of the integration your orders belong to.

Example:

70

orders
Multicollo parcels array Object · object[]
required

Array of order objects you want to create labels for

Required array length: 1 - 20 elements

Multicollo parcels array model used for splitting shipped object into multiple parcels

sender_address_id
integer

The ID of the sender address you would like to ship from. If not specified, your default sender address will be used.

A sender address can be added through the Sendcloud platform and be retrieved using the Retrieve a list of sender addresses endpoint.

Example:

192

brand_id
integer

The ID of the brand. Brands can be added through the Sendcloud platform and be retrieved using the Retrieve a list of brands endpoint.

Note: The Brands API is currently only available in API v2. This reference will be updated when a v3 version becomes available.

Required range: x >= 1
Example:

42

ship_with
Ship with object · object

The ship with object can be used to define how you would like to send your shipment.

You can use a shipping_option_code. This is a unique identifier that displays what carrier and what set of shipping functionalities you want to use.

Example:
{
"type": "shipping_option_code",
"properties": {
"shipping_option_code": "postnl:standard/insured=3000",
"contract_id": 517
}
}

Response

Information about the created parcels.

data
Reference to label · object[]

An array containing the created parcel IDs and other order information.

errors
Error · object[]