CPL API
Useful links
Useful links
  • Developer
  • Sandbox
Useful links
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
  • Schemas
    • Schemas
      • EmptyNullableObject
      • Eps.Api.MyApi2.Web.Models.Routing.RouteModel
      • AcceptLanguageSchema
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ConnectHierarchyModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ConnectHierarchyResultModel
      • Eps.Api.Infrastructure.WebApi.Model.InfoModel
      • Eps.Api.Infrastructure.WebApi.Model.ProblemJsonBasicModel
      • Eps.Api.Infrastructure.WebApi.Model.ProblemJsonModel
      • Eps.Api.MyApi2.Business.Dto.VersionInformation.VersionInformationDto
      • Eps.Api.MyApi2.Business.Enums.ConstImportState
      • Eps.Api.MyApi2.Business.Enums.ConstPageSize
      • Eps.Api.MyApi2.Business.Enums.ConstRelationType
      • Eps.Api.MyApi2.Business.Enums.ConstReturnChannel
      • Eps.Api.MyApi2.Web.Constants.ConstLabelFormat
      • Eps.Api.MyApi2.Web.Controllers.ShipmentBatchController.GetShipmentBatch.OrderBy.enum
      • Eps.Api.MyApi2.Web.Controllers.ShipmentBatchController.GetShipmentBatchLabel.OrderBy.enum
      • Eps.Api.MyApi2.Web.Models.AccessPoint.AccessPointCapacitySettingModel
      • Eps.Api.MyApi2.Web.Models.AccessPoint.AccessPointModel
      • Eps.Api.MyApi2.Web.Models.AccessPoint.AccessPointWorkHourModel
      • Eps.Api.MyApi2.Web.Models.AccessPoint.ConstMyApi2AccessPointType
      • Eps.Api.MyApi2.Web.Models.AccessPoint.CoordinatesModel
      • Eps.Api.MyApi2.Web.Models.AddressWhisper.AddressWhispModel
      • Eps.Api.MyApi2.Web.Models.AddressWhisper.CalledFrom
      • Eps.Api.MyApi2.Web.Models.Codelist.AgeCheckTypeModel
      • Eps.Api.MyApi2.Web.Models.Codelist.CountryModel
      • Eps.Api.MyApi2.Web.Models.Codelist.CurrencyModel
      • Eps.Api.MyApi2.Web.Models.Codelist.ProofOfIdentityTypeModel
      • Eps.Api.MyApi2.Web.Models.Codelist.ServicePriceLimitModel
      • Eps.Api.MyApi2.Web.Models.Codelist.ShipmentExternalNumberTypeModel
      • Eps.Api.MyApi2.Web.Models.Codelist.ShipmentPhaseModel
      • Eps.Api.MyApi2.Web.Models.Codelist.ShipmentProductType
      • Eps.Api.MyApi2.Web.Models.Codelist.ShipmentServiceModel
      • Eps.Api.MyApi2.Web.Models.Codelist.StatusModel
      • Eps.Api.MyApi2.Web.Models.Codelist.ValidationMessageModel
      • Eps.Api.MyApi2.Web.Models.Customer.AccountModel
      • Eps.Api.MyApi2.Web.Models.Customer.AddressModel
      • Eps.Api.MyApi2.Web.Models.Customer.CustomerModel
      • Eps.Api.MyApi2.Web.Models.CustomerAccess.CreateApiAccessModel
      • Eps.Api.MyApi2.Web.Models.CustomerAccess.CreateSandboxAccessModel
      • Eps.Api.MyApi2.Web.Models.CustomerAccess.ResendSandboxUserEmailModel
      • Eps.Api.MyApi2.Web.Models.Enum.OrderStates
      • Eps.Api.MyApi2.Web.Models.Enum.OrderType
      • Eps.Api.MyApi2.Web.Models.Integrator.AddressType
      • Eps.Api.MyApi2.Web.Models.Integrator.CodAccountModel
      • Eps.Api.MyApi2.Web.Models.Integrator.ContactType
      • Eps.Api.MyApi2.Web.Models.Integrator.CreateCustomerAddressModel
      • Eps.Api.MyApi2.Web.Models.Integrator.CreateCustomerContactModel
      • Eps.Api.MyApi2.Web.Models.Integrator.CreateCustomerModel
      • Eps.Api.MyApi2.Web.Models.Integrator.GetCustomerAddressModel
      • Eps.Api.MyApi2.Web.Models.Integrator.GetCustomerContactModel
      • Eps.Api.MyApi2.Web.Models.Integrator.GetCustomerModel
      • Eps.Api.MyApi2.Web.Models.Order.OrderModel
      • Eps.Api.MyApi2.Web.Models.Order.RecipientAddressModel
      • Eps.Api.MyApi2.Web.Models.Order.SenderAddressModel
      • Eps.Api.MyApi2.Web.Models.OrderBatch.CreateOrderBatchModel
      • Eps.Api.MyApi2.Web.Models.OrderBatch.OrderBatchResultModel
      • Eps.Api.MyApi2.Web.Models.OrderBatch.OrderModel
      • Eps.Api.MyApi2.Web.Models.OrderBatch.OrderResultItemModel
      • Eps.Api.MyApi2.Web.Models.OrderBatch.RecipientAddressModel
      • Eps.Api.MyApi2.Web.Models.OrderBatch.SenderAddressModel
      • Eps.Api.MyApi2.Web.Models.OrderEvent.CancelOrderEventModel
      • Eps.Api.MyApi2.Web.Models.Shipment.AccessPointFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.AdditionalParameterModel
      • Eps.Api.MyApi2.Web.Models.Shipment.BackShipmentFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.DormantShipmentFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.ExternalNumberModel
      • Eps.Api.MyApi2.Web.Models.Shipment.RoutingFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.ServiceModel
      • Eps.Api.MyApi2.Web.Models.Shipment.ShipmentAddressModel
      • Eps.Api.MyApi2.Web.Models.Shipment.ShipmentDeliveryFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.ShipmentModel
      • Eps.Api.MyApi2.Web.Models.Shipment.ShipmentPaymentFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.ShipmentSetFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.ShipmentStates
      • Eps.Api.MyApi2.Web.Models.Shipment.ShipmentWeightFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.SpecificDeliveryFeatureModel
      • Eps.Api.MyApi2.Web.Models.Shipment.TrackAndTraceItemModel
      • Eps.Api.MyApi2.Web.Models.Shipment.TrackAndTraceModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.BackAddressModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.CashOnDeliveryFeatureModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.CompleteLabelModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.CompleteLabelSettingsModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.CreateShipmentBatchModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.DirectInjectionFeatureModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.DormantExternalNumberModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.DormantRecipientAddressModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.DormantServiceModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.DormantShipmentModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.DormantWeighedShipmentFeatureModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ExternalNumberModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.InsuranceFeatureModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.LabelServiceModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.LabelSettingsModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.RecipientAddressModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ReturnChannelModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.SenderAddressModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.SenderMaskAddressModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ServiceModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentBatchResultModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultChildItemModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultItemModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentRoutingModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentSetFeatureModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentSetItemModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.SpecificDeliveryFeatureModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.UpdateShipmentBatchModel
      • Eps.Api.MyApi2.Web.Models.ShipmentBatch.WeighedShipmentFeatureModel
      • Eps.Api.MyApi2.Web.Models.ShipmentEvent.RedirectRecipientAddressModel
      • Eps.Api.MyApi2.Web.Models.ShipmentEvent.RedirectShipmentEventModel
      • XCorrelationIdSchema
      • XLogLevelSchema
      • XPagingSchema
Useful links
Useful links
  • Developer
  • Sandbox
Useful links
Useful links
  • Developer
  • Sandbox
Přepni do češtiny
  1. Examples

Multiple shipments in one request

If you intend to send multiple shipments in one request, the body of the request can look as follows:
**POST shipment/batch request body for creating multiple shipments in one request**
{
  "returnChannel": {
    "type": "Email",
    "address": "gggg@ppl.cz"
  },
  "labelSettings": {
    "format": "Pdf",
    "dpi": 300,
    "completeLabelSettings": {
      "isCompleteLabelRequested": true,
      "pageSize": "default",
      "position": 2
    }
  },
  "shipments": [
    {
      "referenceId": "123456",
      "productType": "BUSS",
      "note": "poznamka",
      "depot": "07",
      "shipmentSet": {
        "numberOfShipments": 2
      },
      "sender": {
        "name": "Sender Name 1",
        "street": "Vysni Lhoty 222",
        "city": "Dobrá",
        "zipCode": "73951",
        "country": "CZ",
        "phone": "5465489",
        "email": "pavel@xdhdgf.cz"
      },
      "recipient": {
        "name": "Recip name 1",
        "street": "Nové Dvory-Podhůří 3844",
        "city": "Frýdek-Místek",
        "zipCode": "73801",
        "country": "CZ",
        "phone": "564654654",
        "email": "pavel@ghfd.cz"
      }
    },
    {
      "referenceId": "654321",
      "productType": "BUSS",
      "note": "poznamka",
      "depot": "07",
      "shipmentSet": {
        "numberOfShipments": 2
      },
      "sender": {
        "name": "Sender name 2",
        "street": "Vysni Lhoty 222",
        "city": "Dobrá",
        "zipCode": "73951",
        "country": "CZ",
        "phone": "321654987",
        "email": "pavel@cccccc.cz"
      },
      "recipient": {
        "name": "Recip name 2",
        "street": "Nové Dvory-Podhůří 3844",
        "city": "Frýdek-Místek",
        "zipCode": "73801",
        "country": "CZ",
        "phone": "123654789",
        "email": "pavel@cccccc.cz"
      }
    }
  ]
}
After creating such shipments, you will get the following response from the GET shipment/batch/{batchId} method.
In items, you can see that each shipment is separated and has its own master parcel.
**Response from GET shipment/batch/{batchId}**
{
  "completeLabel": {
    "labelUrls": [
      "https://api-dev.dhl.com/ecs/ppl/myapi2/shipment/batch/e4e989ee-a724-4b6c-a21a-9dd63804e14a/label?pageSize=Default&position=2&limit=200&offset=0"
    ]
  },
  "items": [
    {
      "referenceId": "123456",
      "shipmentNumber": "80050527937",
      "labelUrl": "https://api-dev.dhl.com/ecs/ppl/myapi2/data/2043c2c7-395b-494d-dc5a-08dd6c0ea4b5",
      "importState": "Complete",
      "relatedItems": [
        {
          "shipmentNumber": "80050527938",
          "labelUrl": "https://api-dev.dhl.com/ecs/ppl/myapi2/data/014215a9-7b60-440b-dc5b-08dd6c0ea4b5",
          "importState": "Complete",
          "relationType": "ShipmentSet"
        }
      ]
    },
    {
      "referenceId": "654321",
      "shipmentNumber": "80050527939",
      "labelUrl": "https://api-dev.dhl.com/ecs/ppl/myapi2/data/55ebe8cd-aa00-49d5-9a45-08dd6c0ea4ba",
      "importState": "Complete",
      "relatedItems": [
        {
          "shipmentNumber": "80050527940",
          "labelUrl": "https://api-dev.dhl.com/ecs/ppl/myapi2/data/9405c51f-d8b9-497e-9a46-08dd6c0ea4ba",
          "importState": "Complete",
          "relationType": "ShipmentSet"
        }
      ]
    }
  ]
}
If you set "isCompleteLabelRequested": true, you will see a completeLabel object containing the URL with all labels.
image.png
image.png
Modified at 2025-05-05 03:43:54
Previous
International Shipment with or without COD – Parcels in a Set
Next
Shipment connect