A delivery leg is a stage of the parcel journey defined by a single tracking identifier.
It contains the necessary information for the delivery of a parcel and the information about the carrier delivering the parcel.
A delivery leg can be used to support a tracking experience after the trackable item has been allocated a tracking identifier.
A delivery leg can be linked to a delivery if they share the same delivery reference.
Multiple delivery legs can be linked to one another if they share the same parcel reference.
A delivery leg is identified by its tracking identifier only or its tracking identifier in combination with its parcel reference when both are provided.
Note: Each time you update a delivery leg, you must resubmit the mandatory information of the delivery leg in addition to any other data that you have added or modified.
The delivery leg information has been processed successfully
Bad request.
The request failed validation due to missing required information in the parameters or the body of the request.
Error code: PS-0400.
Unauthorized.
The request did not provide the credentials required to authorize access to the API.
Error code: PS-0401.
Forbidden.
The API user is not authorized to proceed with the processing of the request.
Error code: PS-0403.
Unsupported media format.
The request failed due to an unsupported media type in the request.
Error code: PS-0415.
Internal Server Error.
The processing of the request failed due to an internal problem. The request needs to be retried.
Error code: PS-0500.
{- "trackingIdentifier": "REPLACE-WITH-YOUR-TRACKING-IDENTIFIER",
- "carrierCode": "DPD_UK",
- "carrierDisplayName": "DPD UK",
- "carrierServiceCode": "DPD_UK_CLASSIC",
- "deliveryRef": "REPLACE-WITH-YOUR-DELIVERY-REF",
- "finalDeliveryLeg": true,
- "collection": {
- "accessibility": true,
- "daysHeld": 7,
- "information": "Collection counter on 2nd floor next to womenswear",
- "locationId": "EASYCOLLECT-1234",
- "openingHours": [
- "Mo 08:00-12:00,14:00-17:00",
- "Tu 09:00-20:00",
- "We 09:00-20:00",
- "Th 09:00-20:00",
- "Fr 09:00-20:00",
- "Sa 09:00-17:00",
- "Su 09:00-17:00"
], - "parkingAvailability": true,
- "address": {
- "addressLine1": "200 Grays Inn Road",
- "addressLine2": "string",
- "postCode": "WC1X 8XZ",
- "countryCode": "GBR",
- "companyName": "Metapack",
- "city": "London",
- "stateProvince": "London",
- "timeZone": "Europe/London",
- "contact": {
- "email": "somebody@example.com",
- "phone": "0800155781"
}
}, - "location": {
- "latitude": 51.52325226913702,
- "longitude": -0.1146692876584629,
- "what3words": "lowest.homes.calm"
}
}, - "delivery": {
- "carrierPINCode": "2351",
- "carrierServiceType": "TRACKED",
- "direction": "OUTBOUND",
- "instructions": "Please collect your parcel from the pick up location",
- "returnType": "ON_DEMAND",
- "shippedDateTime": "2019-08-24T14:15:22Z",
- "type": "PUDO",
- "deliveryWindow": {
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z"
}, - "selectedTimeSlot": {
- "from": "11:00:00",
- "to": "12:00:00"
}
}, - "order": {
- "orderRef": "REPLACE-WITH-YOUR-ORDER-REF",
- "orderDate": "2019-08-24T14:15:22Z",
- "marketplace": "Acme",
- "billingAddress": {
- "addressLine1": "200 Grays Inn Road",
- "addressLine2": "string",
- "postCode": "WC1X 8XZ",
- "countryCode": "GBR",
- "companyName": "Metapack",
- "city": "London",
- "stateProvince": "London",
- "timeZone": "Europe/London"
}, - "customer": {
- "customerRef": "REPLACE-WITH-YOUR-CUSTOMER-REF",
- "customerSegment": "VIP",
- "email": "john.doe@example.com",
- "name": "John Doe",
- "phone": "07814354765"
}, - "notificationPreferences": {
- "preferredChannels": [
- "EMAIL"
], - "preferredName": "John",
- "notificationsContact": "RECIPIENT"
}, - "products": [
- {
- "productRef": "PRD-12345",
- "name": "Trainers",
- "description": "string",
- "longDescription": "string",
- "quantity": 1,
- "size": "39 / 6",
- "colour": "Blue",
- "images": {
- "altTag": "Picture of trainers"
}, - "salePrice": {
- "amount": 60.99,
- "currencyCode": "GBP"
}, - "items": [
- {
- "itemRef": "PRD-12345-BL-06"
}
]
}
], - "seller": {
- "brand": "Phasion for Men",
- "brandRef": "PH20MEN",
- "companyName": "Phasion",
- "id": "6a624ffb-1032-4941-ba4b-c23834bfc876",
- "parentOrg": "Metapack"
}
}, - "parcel": {
- "parcelRef": "REPLACE-WITH-YOUR-PARCEL-REF",
- "items": [
- {
- "itemRef": "PRD-12345-BL-06"
}
]
}, - "recipient": {
- "addressLine1": "200 Grays Inn Road",
- "addressLine2": "string",
- "postCode": "WC1X 8XZ",
- "countryCode": "GBR",
- "companyName": "Metapack",
- "city": "London",
- "stateProvince": "London",
- "timeZone": "Europe/London",
- "contact": {
- "name": "John Doe",
- "email": "johndoe@email.com",
- "phone": "07814354765",
- "identity": {
- "birthDate": "13/05/1978"
}
}
}, - "sender": {
- "addressLine1": "200 Grays Inn Road",
- "addressLine2": "string",
- "postCode": "WC1X 8XZ",
- "countryCode": "GBR",
- "companyName": "Metapack",
- "city": "London",
- "stateProvince": "London",
- "timeZone": "Europe/London"
}
}
{- "message": "This is an error message",
- "errorCode": "PS-XXXX",
- "systemMessage": "This is a system message related to the error",
- "traceId": "4d1544c7-1977-4c03-82fa-ecacd1837532",
- "timestamp": "2019-08-24T14:15:22Z"
}