Tracciamento
Recuperare la cronologia di tracciamento in tempo reale per un pacco DPD, inclusi tutti gli eventi di stato, i timestamp e le informazioni sulla posizione.
Endpoint: GET /api/v1/tracking/{parcelNumber}
Autenticazione: Token JWT Bearer obbligatorio
Richiesta
Parametro di percorso:
| Parametro | Tipo | Obbligatorio | Esempio |
|---|---|---|---|
parcelNumber | String | Obbligatorio | 05305000123456 |
Parametro di query:
| Parametro | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
locale | String | Facoltativo | Localizza le descrizioni — de_CH, en_US, fr_CH, it_CH |
# Base
curl -X GET "https://label-print-shipments.dpd.ch/api/v1/tracking/05305000123456" \
-H "Authorization: Bearer <jwt_token>"
# Con locale
curl -X GET "https://label-print-shipments.dpd.ch/api/v1/tracking/05305000123456?locale=it_CH" \
-H "Authorization: Bearer <jwt_token>"
Risposta
200 OK:
{
"shipmentInfo": {
"type": "shipment",
"service": "PSD",
"product": "DPD Classic"
},
"statusInfo": [
{
"name": "ACCEPTED",
"displayName": "Parcel handed to DPD",
"description": "DPD has received your parcel.",
"location": "",
"date": "2025-10-29 14:30:00",
"hasBeenReached": true,
"isCurrent": false
},
{
"name": "AT_SENDING_DEPOT",
"displayName": "In transit",
"description": "The parcel is at the parcel dispatch centre.",
"location": "Bern Hub",
"date": "2025-10-30 08:15:00",
"hasBeenReached": true,
"isCurrent": true
},
{
"name": "DELIVERED",
"displayName": "Parcel delivered",
"description": "Your parcel has been delivered successfully.",
"location": "",
"date": "",
"hasBeenReached": false,
"isCurrent": false
}
]
}
Campi statusInfo
| Campo | Tipo | Descrizione |
|---|---|---|
name | String | Identificatore del codice di stato |
displayName | String | Etichetta di stato tradotta |
description | String | Descrizione dettagliata tradotta |
location | String | Luogo in cui si è verificato l'evento |
date | String | Timestamp (yyyy-MM-dd HH:mm:ss), vuoto se non ancora raggiunto |
hasBeenReached | Boolean | Indica se questo stato si è verificato |
isCurrent | Boolean | Indica se questo è lo stato corrente |
Codici di stato
| Stato | Inglese (en_US) | Tedesco (de_CH) | Francese (fr_CH) | Italiano (it_CH) |
|---|---|---|---|---|
ACCEPTED | Parcel handed to DPD | Paket an DPD übergeben | Colis reçu | Pacco ricevuto |
AT_SENDING_DEPOT | In transit | Paket unterwegs | Colis en cours d'acheminement | Pacco in viaggio |
ON_THE_ROAD | At parcel delivery centre | Im Paketzustellzentrum | Colis au centre de tri | Pacco nel centro consegne pacchi |
AT_DELIVERY_DEPOT | Parcel out for delivery | In Zustellung | Colis livré | Pacco consegnato |
DELIVERED | Parcel delivered | Paket zugestellt | Colis livré | Pacco consegnato |
Flusso di stato tipico
ACCEPTED → AT_SENDING_DEPOT → ON_THE_ROAD → AT_DELIVERY_DEPOT → DELIVERED
Codici di stato HTTP
| Codice | Descrizione |
|---|---|
200 OK | Dati di tracciamento restituiti |
401 Unauthorized | Token mancante o non valido |
404 Not Found | Numero di pacco non trovato |