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
  • 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

Getting import state

GET
/shipment/batch/{batchId}
ShipmentBatch

Purpose and usage#

This method returns the processing status of the shipment, and in the case of the "Complete" status, it returns a URL (either bulk or per individual package) for downloading the generated 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 Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/shipment/batch/?OrderBy' \
--header 'Accept-Language;' \
--header 'X-Correlation-ID;' \
--header 'X-LogLevel;'
Response Response Example
200 - Example 1
{
  "completeLabel": {
    "labelUrls": [
      "http://example.com"
    ]
  },
  "items": [
    {
      "referenceId": "string",
      "shipmentNumber": "string",
      "insuranceCurrency": "string",
      "insurancePrice": 0,
      "labelUrl": "http://example.com",
      "importState": "Accepted",
      "errorMessage": "string",
      "errorCode": "string",
      "relatedItems": [
        {
          "shipmentNumber": "string",
          "insuranceCurrency": "string",
          "insurancePrice": 0,
          "labelUrl": "http://example.com",
          "importState": "Accepted",
          "errorMessage": "string",
          "errorCode": "string",
          "relationType": "ShipmentSet"
        }
      ]
    }
  ]
}

Request

Path Params
batchId
string <uuid>
required
The batch id
Query Params
OrderBy
optional
Sort items by defined fields. For multiple sorting use field names separated by comma. Use "-" to descendant order (eg.: OrderBy=field1,-field2).
Orderable fields: ShipmentNumber, ReferenceId, see also schema Eps.Api.MyApi2.Web.Controllers.ShipmentBatchController.GetShipmentBatch.OrderBy.enum
Any of
Allowed values:
ShipmentNumberReferenceId
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

Responses

🟢200OK
application/json
Success
Headers
X-Correlation-ID
string 
optional
Correlation Id of request otherwise id of response
Body
ShipmentBatchResultModel
completeLabel
optional
One of
CompleteLabelModel
labelUrls
array[string <uri>] | null 
optional
LabelUrls
items
array[object (Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultItemModel) {9}]  | null 
optional
Items
referenceId
string  | null 
optional
Reference Id
shipmentNumber
string  | null 
optional
Shipment number
insuranceCurrency
string  | null 
optional
Insurance currency
insurancePrice
number <double> | null 
optional
Insurance price
labelUrl
string <uri> | null 
optional
Label uri
importState
enum<string> 
optional
Allowed values:
AcceptedInProcessCompleteError
errorMessage
string  | null 
optional
Error message
errorCode
string  | null 
optional
Error code
relatedItems
array[object (Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultChildItemModel) {8}]  | null 
optional
Related items
🟠400Bad Request
🟠404Record Not Found
🔴500Server Error
🔴503Service Unavailable
Previous
Used to modify the output format of the label.
Next
Pick up label
Built with