Skip to main content

Pickup Orders

Create scheduled recurring pickup orders. DPD will collect parcels from your location on specified days and time windows.

EndpointAuth
POST /api/v1/pickup-ordersBearer JWT token required

Request

Query parameter: lang (optional) — e.g., de_CH, en_US, fr_CH, it_CH

Body: List<PickupOrderDTO>

Fields

FieldTypeLengthRequiredDescription
invoicingNumberString1–20MandatoryCustomer billing number
pickupDateString10MandatoryScheduled pickup date (yyyy-MM-dd), must be future
weekDayIntegerOptionalDay of week (1=Mon … 7=Sun). Auto-calculated from pickupDate if omitted
fromTime1String5OptionalMorning time window start (HH:mm)
toTime1String5OptionalMorning time window end (HH:mm)
fromTime2String5OptionalAfternoon time window start (HH:mm)
toTime2String5OptionalAfternoon time window end (HH:mm)
addressAddressDTOMandatoryPickup location address
numberOfParcelsIntegerMandatoryExpected number of parcels (1–99)
tourString0–50OptionalTour/route identifier
clientSoftwareString1–30MandatoryClient application name. The request is rejected if this is missing or blank
clientVersionString1–10MandatoryClient application version. The request is rejected if this is missing or blank

Time windows

You can specify up to two time windows (morning and afternoon). Leave afternoon fields empty for a single continuous window.

WindowFieldsExample
MorningfromTime1 / toTime108:00 / 12:00
AfternoonfromTime2 / toTime213:00 / 17:00

Example

curl -X POST "https://label-print-shipments.dpd.ch/api/v1/pickup-orders?lang=de_CH" \
-H "Authorization: Bearer <jwt_token>" \
-H "Content-Type: application/json" \
-d '[
{
"invoicingNumber": "12345678",
"pickupDate": "<next working day, yyyy-MM-dd>",
"weekDay": 5,
"fromTime1": "08:00",
"toTime1": "12:00",
"fromTime2": "13:00",
"toTime2": "17:00",
"numberOfParcels": 15,
"address": {
"name": "Warehouse Location A",
"countryCode": "CH",
"zipCode": "8000",
"city": "Zürich",
"street": "Industriestrasse 45",
"phone": "+41441234567",
"email": "warehouse@company.ch",
"reference": "WAREHOUSE-A"
},
"tour": "TOUR-ZH-WEST",
"clientSoftware": "Customer App",
"clientVersion": "4.0.0"
}
]'

Response

201 Created — all orders created:

{
"tracingId": "TRACE-321",
"success": [
{ "tracingId": "123456789" }
],
"failed": []
}

Each success[] item carries the tracingId assigned to the created order, plus identificationNumber echoed back when the request item supplied one. There is no id on a success item — id appears only on failed[] items.

Null fields are omitted from responses, so a success item commonly contains nothing but tracingId.

207 Multi-Status — partial success with field-level errors. Each failed[] item carries an identificationNumber (echoes the client-supplied value, when the request item had one), an errorCode; field violations are a flat fieldErrors[] array, each entry with its own path:

{
"tracingId": "TRACE-322",
"success": [],
"failed": [
{
"identificationNumber": "client-supplied-id-5",
"errorCode": "SYS-VALIDATION-FAILURE",
"fieldErrors": [
{
"path": "numberOfParcels",
"code": "SHP-VAL-NUMBEROFPARCELS-MAX-CHARACTERS",
"message": "Number of parcels exceeds the maximum allowed length."
},
{
"path": "address.countryCode",
"code": "SHP-VAL-COUNTRYCODE-REQUIRED",
"message": "Country code is required."
}
]
}
]
}

A transient failure (no fieldErrors — an outage is not a field problem) looks like this instead:

{
"identificationNumber": "client-supplied-id-7",
"errorCode": "SHP-ROUTING-ENGINE-UNAVAILABLE",
"reason": "SHP-ROUTING-ENGINE-UNAVAILABLE: Routing engine is temporarily unavailable. Please try again."
}

Status codes:

CodeDescription
201 CreatedAll pickup orders created
207 Multi-StatusSome succeeded, some failed
400 Bad RequestValidation error, or every item in the batch failed (whatever the cause, including a routing-engine outage)
401 UnauthorizedMissing or invalid token

Difference from Collection Requests

Pickup OrdersCollection Requests
FrequencyRecurring (weekly schedule)One-time
Time windowsUp to 2 (morning + afternoon)Defined by DPD
Parcels limit99999
Weight fieldNot requiredOptional (grams)