CPL API
Useful links
  • Developer
  • Sandbox
Useful links
  • Developer
  • Sandbox
Přepni do češtiny
  1. Examples
  • Introduction
  • General
  • Creation of orders and shipments
  • Changelog
  • Authentication
    • Getting Bearer token
  • API Methods
  • Examples
    • Response - pick up labels (PDF A4)
    • Response - pickup label (ZPL)
    • Response - pick up label (JPG)
    • Shipment - shipment set items
    • International Shipment with or without COD – Parcels in a Set
    • Multiple shipments in one request
    • Shipment connect
  • FAQ
  • Postman Collection
  • Postman Flows
  1. Examples

Shipment connect

The prerequisite for successfully merging shipments is to specify the additionallyAdded flag and the external number ESPN when creating the shipment, see Shipment 1.
Shipment 1
{
  "returnChannel": {
      "type": "Email",
      "address": "jakub@test.cz"
  },
  "labelSettings": {
      "format": "Pdf",
      "dpi": 300,
      "completeLabelSettings": {
          "isCompleteLabelRequested": false
      }
  },
  "shipments": [
      {
          "referenceId": "123456",
          "productType": "BUSS",
          "note": "poznamka",
          "depot": "07",
          "shipmentSet": {
              "numberOfShipments": 1,
              "additionallyAdded": true
          },
          "sender": {
              "name": "Mirek test",
              "street": "Testovaci 222",
              "city": "Trutnov",
              "zipCode": "11000",
              "country": "CZ",
              "phone": "123456789",
              "email": "kuba@test.cz"
          },
          "recipient": {
              "name": "Test recipient",
              "street": "HLinska 2",
              "city": "České Budějovice",
              "zipCode": "37001",
              "country": "CZ",
              "phone": "1236547895",
              "email": "krab@test.cz"
          },
          "externalNumbers": [
              {
                  "externalNumber": "123",
                  "Code": "ESPN"
              }
          ]
      }
  ]
}
The label of such a shipment will have the following numbering format:
image.png
Later, once more shipments are accumulated and ready to be merged, the request body for the POST shipment/batch/connectSet call will look like this:
request body
{
  "customerId": <your customerId>,
  "externalSetNumber": "123",
  "shipmentNumbers": [
   "80050531022",
   "80050531023"
  ]
}
If the shipments meet all the prerequisites for successful merging, the response body will look like this:
response body
{
  "masterShipmentNumber": "80050531022",
  "shipmentNumbers": [
      "80050531022",
      "80050531023"
  ]
}
The masterShipmentNumber specifies the leading (primary) shipment, and the entire list of shipments is provided in shipmentNumbers.
Modified at 2025-09-11 13:13:00
Previous
Multiple shipments in one request
Next
FAQ