Richieste di ritiro
Pianificare un ritiro una tantum di pacchi dal proprio indirizzo. DPD verrà a ritirare i pacchi alla data richiesta.
Endpoint: POST /api/v1/collection-requests
Autenticazione: Token JWT Bearer obbligatorio
Campi
| Campo | Tipo | Lunghezza | Obbligatorio | Descrizione |
|---|---|---|---|---|
invoicingNumber | String | 1–20 | Sì | Numero cliente DPD |
pickupDate | String | 10 | Sì | Data di ritiro richiesta (yyyy-MM-dd), deve essere futura |
note | String | 0–255 | No | Istruzioni speciali di ritiro |
sender | AddressDTO | — | Sì | Indirizzo di ritiro |
receiver | AddressDTO | — | Sì | Indirizzo di destinazione finale |
numberOfParcels | Integer | — | Sì | Numero di pacchi previsto (1–999) |
weight | Double | — | No | Peso totale in grammi |
serviceCode | String | 2–10 | Sì | Codice servizio DPD (es. PSD, PSI) |
Esempio
curl -X POST "https://label-print-shipments.dpd.ch/api/v1/collection-requests?locale=it_CH" \
-H "Authorization: Bearer <jwt_token>" \
-H "Content-Type: application/json" \
-d '[{
"invoicingNumber": "12345678",
"pickupDate": "2025-10-31",
"serviceCode": "PSD",
"numberOfParcels": 5,
"sender": {
"name": "Società Mittente SA",
"countryCode": "CH",
"zipCode": "6900",
"city": "Lugano",
"street": "Via Industria 25"
},
"receiver": {
"name": "Società Destinataria SRL",
"countryCode": "IT",
"zipCode": "20121",
"city": "Milano",
"street": "Via Monte Napoleone 1",
"email": "info@destinatario.it"
}
}]'
note
weight è espresso in grammi (es. 25000 = 25 kg). pickupDate deve essere una data futura.