CPL API
Useful links
  • Developer
  • Sandbox
Useful links
  • Developer
  • Sandbox
Přepni do češtiny
  1. ShipmentBatch
  • Back to home
  • API Methods
  • AccessPoint
    • List of access points
  • AddressWhisper
    • Address Whisperer
  • Codelist
    • Codelist for the beneficiary's age verification service
    • Codelist product
    • Codelist externalNumbers
    • Codelist country + COD authorization
    • Codelist currency
    • Method for obtaining the services provided for shipments.
    • A method for obtaining minimum and maximum values ​​for services
    • Codelist shipment phase
    • Codelist status
    • Codelist of validation messages
    • Types of personal documents
  • Customer
    • Customer information - permitted currencies
    • Customer addresess
  • Data
    • Single label print
  • Info
    • /info
  • Order
    • Order tracking
  • OrderBatch
    • Create an order
    • Get order status
  • OrderEvent
    • Order cancel
  • Shipment
    • Shipment tracking
  • ShipmentBatch
    • Shipment creation
      POST
    • Used to modify the output format of the label.
      PUT
    • Getting import state
      GET
    • Pick up label
      GET
  • ShipmentEvent
    • Shipment cancel
    • Adding informations to shipment
  • VersionInformation
    • News
  1. ShipmentBatch

Shipment creation

POST
/shipment/batch
Maintainer:Not configured

Purpose and usage#

The shipment/batch method is used to create a request for retrieving a shipment or a group of shipments. When the method is called, the return value is batchId, which is then used to obtain the processing status of the shipment and subsequently to retrieve the label.
To successfully call the method, it is necessary to use the batchId, which is obtained from the Location header in the response to the POST shipment/batch request.

Request

Header Params

Body Params application/json

Example
{
    "returnChannel": {
        "type": "<string>",
        "address": "<string>"
    },
    "labelSettings": {
        "format": "<string>",
        "dpi": "<integer>",
        "completeLabelSettings": {
            "isCompleteLabelRequested": "<boolean>",
            "pageSize": "<string>",
            "position": "<integer>"
        }
    },
    "shipments": [
        {
            "productType": "<string>",
            "recipient": {
                "country": "<string>",
                "zipCode": "<string>",
                "name": "<string>",
                "name2": "<string>",
                "street": "<string>",
                "city": "<string>",
                "contact": "<string>",
                "phone": "<string>",
                "email": "<string>"
            },
            "referenceId": "<string>",
            "shipmentNumber": "<string>",
            "note": "<string>",
            "depot": "<string>",
            "ageCheck": "<string>",
            "integratorId": "<integer>",
            "shipmentSet": {
                "numberOfShipments": "<integer>",
                "shipmentSetItems": [
                    {
                        "shipmentNumber": "<string>",
                        "weighedShipmentInfo": {
                            "weight": "<double>"
                        },
                        "externalNumbers": [
                            {
                                "code": "<string>",
                                "externalNumber": "<string>"
                            },
                            {
                                "code": "<string>",
                                "externalNumber": "<string>"
                            }
                        ],
                        "insurance": {
                            "insuranceCurrency": "<string>",
                            "insurancePrice": "<double>"
                        }
                    },
                    {
                        "shipmentNumber": "<string>",
                        "weighedShipmentInfo": {
                            "weight": "<double>"
                        },
                        "externalNumbers": [
                            {
                                "code": "<string>",
                                "externalNumber": "<string>"
                            },
                            {
                                "code": "<string>",
                                "externalNumber": "<string>"
                            }
                        ],
                        "insurance": {
                            "insuranceCurrency": "<string>",
                            "insurancePrice": "<double>"
                        }
                    }
                ]
            },
            "backAddress": {
                "country": "<string>",
                "zipCode": "<string>",
                "name": "<string>",
                "name2": "<string>",
                "street": "<string>",
                "city": "<string>",
                "contact": "<string>",
                "phone": "<string>",
                "email": "<string>"
            },
            "sender": {
                "country": "<string>",
                "zipCode": "<string>",
                "name": "<string>",
                "name2": "<string>",
                "street": "<string>",
                "city": "<string>",
                "contact": "<string>",
                "phone": "<string>",
                "email": "<string>"
            },
            "senderMask": {
                "country": "<string>",
                "zipCode": "<string>",
                "name": "<string>",
                "name2": "<string>",
                "street": "<string>",
                "city": "<string>",
                "contact": "<string>",
                "phone": "<string>",
                "email": "<string>"
            },
            "specificDelivery": {
                "specificDeliveryDate": "<dateTime>",
                "specificDeliveryTimeFrom": "<dateTime>",
                "specificDeliveryTimeTo": "<dateTime>",
                "specificTakeDate": "<dateTime>",
                "parcelShopCode": "<string>"
            },
            "cashOnDelivery": {
                "codCurrency": "<string>",
                "codPrice": "<double>",
                "codVarSym": "088919",
                "iban": "<string>",
                "swift": "<string>",
                "specSymbol": "<string>",
                "account": "<string>",
                "accountPre": "<string>",
                "bankCode": "<string>"
            },
            "insurance": {
                "insuranceCurrency": "<string>",
                "insurancePrice": "<double>"
            },
            "externalNumbers": [
                {
                    "code": "<string>",
                    "externalNumber": "<string>"
                },
                {
                    "code": "<string>",
                    "externalNumber": "<string>"
                }
            ],
            "services": [
                {
                    "code": "<string>"
                },
                {
                    "code": "<string>"
                }
            ],
            "dormant": {
                "shipmentNumber": "<string>",
                "note": "<string>",
                "recipient": {
                    "country": "<string>",
                    "zipCode": "<string>",
                    "name": "<string>",
                    "name2": "<string>",
                    "street": "<string>",
                    "city": "<string>",
                    "contact": "<string>",
                    "phone": "<string>",
                    "email": "<string>"
                },
                "externalNumbers": [
                    {
                        "code": "<string>",
                        "externalNumber": "<string>"
                    },
                    {
                        "code": "<string>",
                        "externalNumber": "<string>"
                    }
                ],
                "services": [
                    {
                        "code": "<string>"
                    },
                    {
                        "code": "<string>"
                    }
                ],
                "weighedShipmentInfo": {
                    "weight": "<double>"
                }
            },
            "shipmentRouting": {
                "inputRouteCode": "28696"
            },
            "directInjection": {
                "directAddressing": "<boolean>",
                "gatewayZipCode": "<string>",
                "gatewayCity": "<string>",
                "country": "<string>"
            },
            "labelService": {
                "labelless": "<boolean>"
            }
        }
    ],
    "shipmentsOrderBy": "<string>"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/shipment/batch' \
--header 'Accept-Language;' \
--header 'X-Correlation-ID;' \
--header 'X-LogLevel;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "returnChannel": {
        "type": "<string>",
        "address": "<string>"
    },
    "labelSettings": {
        "format": "<string>",
        "dpi": "<integer>",
        "completeLabelSettings": {
            "isCompleteLabelRequested": "<boolean>",
            "pageSize": "<string>",
            "position": "<integer>"
        }
    },
    "shipments": [
        {
            "productType": "<string>",
            "recipient": {
                "country": "<string>",
                "zipCode": "<string>",
                "name": "<string>",
                "name2": "<string>",
                "street": "<string>",
                "city": "<string>",
                "contact": "<string>",
                "phone": "<string>",
                "email": "<string>"
            },
            "referenceId": "<string>",
            "shipmentNumber": "<string>",
            "note": "<string>",
            "depot": "<string>",
            "ageCheck": "<string>",
            "integratorId": "<integer>",
            "shipmentSet": {
                "numberOfShipments": "<integer>",
                "shipmentSetItems": [
                    {
                        "shipmentNumber": "<string>",
                        "weighedShipmentInfo": {
                            "weight": "<double>"
                        },
                        "externalNumbers": [
                            {
                                "code": "<string>",
                                "externalNumber": "<string>"
                            },
                            {
                                "code": "<string>",
                                "externalNumber": "<string>"
                            }
                        ],
                        "insurance": {
                            "insuranceCurrency": "<string>",
                            "insurancePrice": "<double>"
                        }
                    },
                    {
                        "shipmentNumber": "<string>",
                        "weighedShipmentInfo": {
                            "weight": "<double>"
                        },
                        "externalNumbers": [
                            {
                                "code": "<string>",
                                "externalNumber": "<string>"
                            },
                            {
                                "code": "<string>",
                                "externalNumber": "<string>"
                            }
                        ],
                        "insurance": {
                            "insuranceCurrency": "<string>",
                            "insurancePrice": "<double>"
                        }
                    }
                ]
            },
            "backAddress": {
                "country": "<string>",
                "zipCode": "<string>",
                "name": "<string>",
                "name2": "<string>",
                "street": "<string>",
                "city": "<string>",
                "contact": "<string>",
                "phone": "<string>",
                "email": "<string>"
            },
            "sender": {
                "country": "<string>",
                "zipCode": "<string>",
                "name": "<string>",
                "name2": "<string>",
                "street": "<string>",
                "city": "<string>",
                "contact": "<string>",
                "phone": "<string>",
                "email": "<string>"
            },
            "senderMask": {
                "country": "<string>",
                "zipCode": "<string>",
                "name": "<string>",
                "name2": "<string>",
                "street": "<string>",
                "city": "<string>",
                "contact": "<string>",
                "phone": "<string>",
                "email": "<string>"
            },
            "specificDelivery": {
                "specificDeliveryDate": "<dateTime>",
                "specificDeliveryTimeFrom": "<dateTime>",
                "specificDeliveryTimeTo": "<dateTime>",
                "specificTakeDate": "<dateTime>",
                "parcelShopCode": "<string>"
            },
            "cashOnDelivery": {
                "codCurrency": "<string>",
                "codPrice": "<double>",
                "codVarSym": "088919",
                "iban": "<string>",
                "swift": "<string>",
                "specSymbol": "<string>",
                "account": "<string>",
                "accountPre": "<string>",
                "bankCode": "<string>"
            },
            "insurance": {
                "insuranceCurrency": "<string>",
                "insurancePrice": "<double>"
            },
            "externalNumbers": [
                {
                    "code": "<string>",
                    "externalNumber": "<string>"
                },
                {
                    "code": "<string>",
                    "externalNumber": "<string>"
                }
            ],
            "services": [
                {
                    "code": "<string>"
                },
                {
                    "code": "<string>"
                }
            ],
            "dormant": {
                "shipmentNumber": "<string>",
                "note": "<string>",
                "recipient": {
                    "country": "<string>",
                    "zipCode": "<string>",
                    "name": "<string>",
                    "name2": "<string>",
                    "street": "<string>",
                    "city": "<string>",
                    "contact": "<string>",
                    "phone": "<string>",
                    "email": "<string>"
                },
                "externalNumbers": [
                    {
                        "code": "<string>",
                        "externalNumber": "<string>"
                    },
                    {
                        "code": "<string>",
                        "externalNumber": "<string>"
                    }
                ],
                "services": [
                    {
                        "code": "<string>"
                    },
                    {
                        "code": "<string>"
                    }
                ],
                "weighedShipmentInfo": {
                    "weight": "<double>"
                }
            },
            "shipmentRouting": {
                "inputRouteCode": "28696"
            },
            "directInjection": {
                "directAddressing": "<boolean>",
                "gatewayZipCode": "<string>",
                "gatewayCity": "<string>",
                "country": "<string>"
            },
            "labelService": {
                "labelless": "<boolean>"
            }
        }
    ],
    "shipmentsOrderBy": "<string>"
}'

Responses

🟢201Created
application/json
Created
Headers

Body

Example
{}
🟠400Bad Request
🔴500Server Error
🔴503Service Unavailable
Modified at 2025-05-21 11:59:08
Previous
ShipmentBatch
Next
Used to modify the output format of the label.