CPL API
Useful links
Useful links
  • Developer
  • Sandbox
Useful links
Useful links
  • Developer
  • Sandbox
Přepni do češtiny
  1. Shipment
  • 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
    • Document type
  • Customer
    • Customer information - permitted currencies
    • Customer addresess
    • Number range creation
  • Data
    • Single label print
  • Info
    • /info
  • Order
    • Order tracking
  • OrderBatch
    • Create an order
    • Get order status
  • OrderEvent
    • Order cancel
  • Shipment
    • Shipment tracking
      GET
    • Save customs documents to shipment
      POST
  • ShipmentBatch
    • Shipment creation
    • Used to combine sets of shipments
    • Used to modify the output format of the label.
    • Getting import state
    • Pick up label
  • ShipmentEvent
    • Shipment cancel
    • Adding informations to shipment
  • Routing
    • Used to obtain routing information for a label
  • VersionInformation
    • News
  1. Shipment

Save customs documents to shipment

POST
/shipment/{shipmentNumber}/documents
Maintainer:Not configured

Purpose and Usage#

This method is used to upload customs documents to an existing shipment in the PPL system. It is used for international shipments where customs documentation (invoices, proforma invoices, customs declarations, etc.) needs to be attached to the shipment for customs clearance.

Parameters#

Path parameters:
shipmentNumber (string, required) — the shipment number to which the documents are being uploaded. The shipment must already exist in the PPL system (i.e., it must have been previously created via POST /shipment/batch.
Query parameters:
documentFileType (required) — the type of document being uploaded. Values must correspond to the "Document Types" codelist (codelist/documentType), which is available in the Codelist section of the documentation. Only one document type can be uploaded per request. If multiple document types belong to a shipment, they must be uploaded separately by making additional requests.

Body#

files — the actual file (or files) containing the customs document. Uploaded as multipart/form-data, i.e., standard file upload.
File restrictions:
Supported formats: pdf, doc, docx, xls, xlsx, jpg, jpeg, png, odt, ods, txt
Maximum total file size per request: 1 MB
Maximum number of files per request: 5

Typical Workflow#

1.
Create a shipment via POST /shipment/batch → use GET /shipment/batch/{batchId} to wait for the Complete status and obtain the shipmentNumber
2.
Retrieve and select permitted document types from GET /codelist/documentFileType
3.
Upload customs documents via this endpoint
4.
If needed, verify the shipment status via GET /shipment/{shipmentNumber}

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Query Params

Header Params

Body Params multipart/form-data

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//documents?documentFileType' \
--header 'Accept-Language;' \
--header 'X-Correlation-ID;' \
--header 'X-LogLevel;' \
--header 'Authorization: Bearer <token>' \
--form 'files=""'

Responses

🟢200
Success
Headers

This response does not have a body.
🟠400
🟠401
🟠403
🟠404
🔴500
🔴503
Modified at 2026-02-11 12:38:07
Previous
Shipment tracking
Next
ShipmentBatch