CPL API
Užitečné odkazy
  • Developer
  • Sandbox
Užitečné odkazy
  • Developer
  • Sandbox
Switch to english
  1. ShipmentBatch
  • Back to home
  • API Metody
  • AccessPoint
    • Seznam výdejních míst
  • AddressWhisper
    • Našeptávač adres
  • Codelist
    • Číselník pro službu kontroly věku příjemce
    • Číselník produktů
    • Číselník typů externích čísel
    • Číselník zemí + povolení COD
    • Číselník povolených měn
    • Metoda pro získání poskytovaných služeb k zásilkám.
    • Metoda pro získání minimálních a maximálních hodnot u služeb
    • Fáze zásilky
    • Statusy zásilky /shipment
    • Chybové hlášení
    • Typy osobních dokladů
  • Customer
    • Informace k zákazníkovi – povolené měny
    • Zákazníkovy adresy
  • Info
    • info
  • Order
    • Získání informace o objednávce přepravy
  • OrderBatch
    • Slouží k vytvoření objednávky. Odpověď je v header (Location)
    • Získaní stavu objednávky
  • OrderEvent
    • Zrušení objednání svozu nebo balíku z libovolné adresy
  • Shipment
    • Slouží k získání informací (trackingu) k zásilce
  • ShipmentBatch
    • Vytvoření zásilky
      POST
    • Slouží k úpravě výstupního formátu štítku
      PUT
    • Získání stavu importu zásilky
      GET
    • Získání etikety
      GET
  • ShipmentEvent
    • storno zásilky
    • úprava kontaktu
  • VersionInformation
    • informace o novinkách
  1. ShipmentBatch

Vytvoření zásilky

POST
/shipment/batch
ShipmentBatch
Maintainer:Not configured
Metoda shipment/batch slouží k vytvoření požadavku na získání zásilky , nebo skupiny zásilek. Při zavolání metody je návratovou hodnotou batchId, které následně slouží pro získávání stavu zpracovaní zásilky a následně pro získání etikety. Batch id je v odpovědi zobrazeno v hlavičce (headers) Location.
batchId je unikátní identifikátor, který se generuje pro každé zavolání metody pro vytvoření zásilky a pro další jeho zpracování je potřeba si jej uchovat.

Request

Header Params
Accept-Language
string 
optional
Language specification, default language: cs-CZ
X-Correlation-ID
string 
optional
Correlation Id of request
X-LogLevel
enum<string> 
optional
The forced log level
Allowed values:
TraceDebugInformationWarningErrorCritical
Body Params application/json
returnChannel
optional
Sekce návratových hodnot pro tisk štítku. Pokud vyplníte returnChannel a typ email, tak Vám přijde pro každou požádanou zásilku etiketa na uvedený email. Toto nefunguje na testovacím prostředí. Využití má toto spíše pro return zásilky, kdy žadateli přijde na email rovnou vytvořená etiketa. Chodí ovšem prázdný email bez jakéhokoliv textu pouze s pdf etiketou.
One of
type
optional
Typ návratové cesty štítku. S FTP není podporováno!
address
string  | null 
optional
Pokud je vybrán Type = Email, pak zde vyplňovat email adresu. Pokud je vybrán Type = Ftp, pak zde vyplňovat FTP cestu.
Email formát: xxxxxxx@yyyy.zzz
FTP formát: ftp://user:password@host:port/path
Délka: 100
<= 100 characters
labelSettings
optional
labbelSettings slouží pro definici parametrů štítků
One of
format
enum<string> 
Eps.Api.MyApi2.Web.Constants.ConstLabelFormat
optional
Label format
Allowed values:
ZplPdfJpegPngSvg
dpi
integer <int32> | null 
optional
Volba DPI pro ZPL
>= 203<= 1200
completeLabelSettings
optional
ZPL kodování base64, více etiket
v jedné odpovědi
shipments
array [object {21}] 
required
Zásilky
>= 1 items
referenceId
string 
required
Jedinečná reference
>= 1 characters<= 128 characters
shipmentNumber
string  | null 
optional
Uvadí se zde vlastní číslo zásilky.
V případě přání na generovaní vlastních čísel zásilek, PPL poskytne zákazníkovi číselnou řadu v daném rozsahu a zákazník si může generovat čísla zásilek sám.
productType
string 
required
Typ produktu. Více informací o jednotlivých typech na codelist/product
>= 1 characters
note
string  | null 
optional
Poznámka Délka: 300
depot
string  | null 
optional
Nepoužívat. Délka: 2
ageCheck
string  | null 
optional
Služba kontrola věku (15,18+),
integratorId
integer <int32> | null 
optional
ID integrátora – pouze pro typ: integrátor
>= 1
shipmentSet
optional
Sada zásilek
backAddress
optional
Adresa pro vrácení nedoručených
zásilek
sender
optional
Odesílatel zásilky
senderMask
optional
Odesílatel zásilky – Alternativní adresa
(v případě jiného odesílatele na etiketě,
než je v evidenci.
recipient
object 
required
Příjemce zásilky
specificDelivery
optional
cashOnDelivery
optional
Platební informace pro dobírkové produkty. Dobírka je vázána k produktu, pro to aby požadavek s dobírkou prošel je nutné zadat správný typ produktu v zásilce (PRID, BUSD, SMAD, COND, DOPD, SMED).
insurance
optional
Pojištění balíků. Přidává pojištění pro balík nebo balíky v zásilce. Používejte pokud máte jeden balík v zásilce nebo více balíků se stejnou cenou v sadě. Pro balíky v sadě které mají různou cenu pro které chcete pojištění zadejte insurance v shipmentSetItems.
externalNumbers
array [object {2}]  | null 
optional
ExternalNumbers jsou externí čísla pro zákaznické identifikace. Např. číslo objednávky, nebo určitý kód zboží. Nejčastěji se používá code CUST jako zákaznické. Toto číslo se následně tiskne i přímo na etiketu a zároveň se propisuje zákazníkovi do fakturace. Více v codelist/externalNumbers
services
array [object {1}]  | null 
optional
Služby
dormant
optional
shipmentRouting
optional
directInjection
optional
Využito v případě přímého závozu zásilek do zahraničního depa. Musí být dohodnuto a přiděleno obch. zástupcem.
labelService
optional
shipmentsOrderBy
string  | null 
optional
Řazení etiket - ReferenceId, ShipmentNumber
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 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
X-Correlation-ID
string 
optional
Correlation Id of request otherwise id of response
Location
string 
optional
Součástí location je BatchId které je v uuid formátu
Body
object {0}
Example
{}
🟠400Bad Request
🔴500Server Error
🔴503Service Unavailable
Modified at 2025-04-09 12:58:15
Previous
ShipmentBatch
Next
Slouží k úpravě výstupního formátu štítku
Built with