Working with Delivery Manager
Track a parcel shipped with Delivery Manager
If you are an existing customer of MetaPack and you ship your parcels using Delivery Manager then these parcels will be made available in the Tracking API automatically. The information regarding the parcels would have been provided by the means of a delivery leg(s) via our own internal platform.
After your delivery legs have been created for a given parcel then the parcel journey becomes available and can be retrieved using any of the access patterns that are detailed in the guide Use a safe access pattern to retrieve parcel journeys. Our recommendation is to use the order reference in combination with the tracking identifier. The parcel journey includes all information available in the delivery leg(s) and is enriched with additional information available within MetaPack.
The amount of information returned in the Parcel Journeys will depend on the complexity of your shipping with MetaPack. For this guide we will assume that most of your volume is a single parcel order handled by a single carrier. In order to perform this test you should have two pieces of information from the result of a Delivery Manager allocation call available: the orderNumber and trackingCode.
Steps:
- Open the resource GET Retrieve the parcel journeys for an order or a parcel .
- In the tab Parameters , set the value of the query parameter orderRef to your orderNumber from the Delivery Manager allocation call.
- In the tab Parameters , set the value of the query parameter trackingIdentifier to your trackingCode from the Delivery Manager allocation call.
- Remove all other query parameters so that only the orderRef and trackingIdentifier are retained.
- Send the request to retrieve the parcel journey.
- Expect a successful response with a 200 OK response code and a JSON body.
- The response body will likely look similiar to the example detailed below.
[
{
"delivery": {
"type": "HOME",
"direction": "OUTBOUND",
"carrierServiceType": "TRACKED",
"shippedDateTime": "2022-01-01T09:00:00.000Z",
"deliveryWindow": {
"from": "2022-01-02T09:00:00.000Z",
"to": "2022-01-05T09:00:00.000Z"
}
},
"order": {
"orderRef": "ORDER-METAPACK-DM",
"seller": {
"brand": "Phasion Retail"
}
},
"recipient": {
"addressLine1": "123 Fake street",
"addressLine2": "London",
"postCode": "SW18 ABC",
"countryCode": "GBR",
"timeZone": "Europe/London",
"contact": {
"email": "joe.bloggs@example.com",
"phone": "01234555666",
"name": "joe bloggs"
}
},
"sender": {
"addressLine1": "200 Grays Inn Rd",
"addressLine2": "London",
"postCode": "WC1X 8XZ",
"countryCode": "GBR",
"timeZone": "Europe/London"
},
"parcel": {
"deliveryRef": "ORDER-METAPACK-DM",
"parcelRef": "PARCEL-REFERENCE-1",
"deliveryLegs": [
{
"carrierCode": "DPD_UK",
"carrierTrackingURL": "https://www.dpd.co.uk/service/tracking?parcel=TRACK-001",
"trackingIdentifier": "TRACK-001",
"carrierDisplayName": "DPD UK",
"finalDeliveryLeg": true
}
],
"items": []
},
"latestTrackingStatus": {
"eventCode": "DELIVERED",
"eventDate": "2022-01-04T09:00:00.000Z",
"eventTimeZone": "Europe/London",
"trackingIdentifier": "TRACK-001",
"eventDescription": "Delivered",
"statusCode": "DELIVERED",
"statusDescription": "Delivered",
"eventCategory": "HAPPY"
},
"trackingEvents": [
{
"eventCode": "DELIVERED",
"eventDate": "2022-01-04T09:00:00.000Z",
"eventTimeZone": "Europe/London",
"trackingIdentifier": "TRACK-001",
"eventDescription": "Delivered",
"statusCode": "DELIVERED",
"statusDescription": "Delivered",
"eventCategory": "HAPPY"
}
]
}
]
In this simple example, the parcel journey makes available the following information.
-
delivery
: information about the type of delivery
-
type
: Supported types are
[ HOME, PUDO, STORE ]
. -
direction
: Supported directions are
[ OUTBOUND, RETURN ]
. -
carrierServiceType
: Supported services are
[ TRACKED, UNTRACKED ]
.
-
type
: Supported types are
-
order
: information about the order
- orderRef : the reference of the order, this will be the orderNumber from the Delivery Manager allocation call.
- seller.brand : the brand that your shoppers have made the purchase from.
- recipient : the person recieving the parcel(s) in an order.
- sender : contains the information about the location from which the parcels for an order will ship.
-
parcel.deliveryLegs
:
- trackingIdentifier : the identifier used to track the parcel, this will be the trackingCode from the Delivery Manager allocation call.
- carrierTrackingURL : a link for tracking the parcel directly on the carrier website.
- carrierDisplayName : the name of the carrier delivering the parcel.
- finalDeliveryLeg : an indicator that identifies the delivery leg for the final mile delivery.
- parcel.items : an array used to identify items within the parcel. This will remain empty because MetaPack Delivery Manager does not know about the items you have shipped in your parcels.
- latestTrackingStatus : the latest tracking event informing about the progress of the delivery for the parcel.
- trackingEvents : an array that contains all the tracking events that compose the tracking history of the parcel sorted in chronological order.
In the case of a delivery to a PUDO location or a Store the Parcel Journey will include the information required to collect the parcel.
[
{
"delivery": {
"type": "PUDO",
...
},
"collection": {
"accessibility": true,
"daysHeld": 7,
"information": "Collection counter on 2nd floor next to womenswear",
"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,
"storeDetailsURL": "https://easycollect.com/shops/info",
"address": {
"addressLine1": "200 Grays Inn Road",
"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"
}
},
...
}
]
Summary:
Number of parcels in Delivery Manager | Number of carriers | Number of delivery legs created by MetaPack | Number of parcel journeys |
---|---|---|---|
1 | 1 | 1 | 1 |
2 | 1 | 2 | 2 |
n | m | n*m | n |
Top up parcels shipped from other platforms
If you ship some of your volume outside of MetaPack you can chose to send us delivery leg(s) for these parcels. This means all your parcels across all your shipping platforms can be made available through the Tracking API. We refer to this as "Top up". Learning how to integrate with the API to be able to send us your additional volume is explained in the following guides:
Parcels in Delivery Manager | Parcels from other shipping platform | Top up delivery legs | Number of parcel journeys |
---|---|---|---|
n | 0 | 0 | n |
n | 1 | 1 | n + 1 |
n | m | m | n + m |
Track an order before parcel allocation in Delivery Manager
If you often have long lead times between order acceptance and shipping your parcels then you might want to enable your customers to track their orders prior to them being allocated to a carrier. This is made possible by the means of a delivery that will be linked with delivery legs using the order reference as the unique delivery reference.
The following guide explains how a delivery can be used to enable a pre-allocation tracking experience.