Tracking
v 4.0.0
API for managing webhooks for pickup customer accounts in DHL.
Overview

Scope

The following operations are allowed in the Tracking API:

OperationTypePath
Get TrackingGET/tracking/v4/package/open

 

Important

All tracking requests should be authorized for the Pickup. This means that the tracking results will be returned only if the requested package is present within one or more of the authorized pickups for the API user.

We recommend that you track a package using the packageId or the dhlPackageId.

Workflow

There are many ways to track a package. Using one of the package identifiers:

  • packageId
  • dhlPackageId
  • trackingId     
    plus
  • pickup (optional)

A single tracking request supports up to 10 package identifiers of the same kind. Use pickup as an additional query parameter in order to search for the package within a specific pickup.

There are many ways to track a group of packages. Using -

  • manifestId
  • pickup, startDate, endDate
  • pickup, startDate, endDate plus any of the following [^1] parameters
    • city
    • state
    • country
    • postalCode
    • orderedProductId

Any combination of one or more parameters of the above fields are also supported.     
endDate should be within 7 days of startDate

When tracking a group of packages, all searches can be paginated using the following two parameters:

  • offset
  • limit
 /tracking/v4/package/open?pickup=5119000&startDate=20190701&endDate=20190707&offset=5&limit=10

The default offset value is zero if not provided in the request. The max limit supported is 10.     
When the results run into multiple pages, the links object in the response provides the URL for the prev and next page with preset offset and limit values. If there is no links object in the response, then there is no prev or next page available. The total element in the response provides the total number of packages for the query across all the pages.

 

Tracking IDs

There are multiple references for trackingId possible for a package. In order to minimize the complexity, all of them have been grouped under a single identifier called the trackingId. Any of the below identifiers will be supported in the query parameter when searching using the identifier trackingId.

These could be:

  • DSP Mail Identifier trackingId
  • Delivery Confirmation Number (Delcon) deliveryConfirmationNumber
  • IMb code intelligentMailBarcode
  • Overlabeled IMb Code overlabeledIntelligentMailBarcode
  • Overlabeled DSP number overlabeledDspNumber

For consistency, the trackingId returned in the response of the Tracking API will always be the 'DSP Mail Identifier' even though the query searches for other identifiers mentioned above.

We recommend using the DSP Mail Identifier as the trackingId reference in your system. Other references are supported mainly for legacy customers.

In addition to the tracking history, the API response also provides additional information related to the package -

  • pickup Detail pickupDetail
  • package Detail package
  • Recipient information recipient

This information is for reference only and we strongly recommend that this information not be made public if you're using this API to display results in a public tracking page.

 

Request Description

M- Mandatory O- Optional C- Conditional N- Not Applicable

NodeData TypeRequired?LengthDescriptionExample Values
packageIdstringO1:30Customer-provided package ID, also known as the CCN (customer confirmation number) or the GM number.GM60511234500000001
dhlPackageIdstringO1:30DHL-generated package ID.3387191106122423
trackingIdstringO1:30DSP (carrier) tracking number for the package.420300249374869903500011805718
manifestIdstringO1:20Manifest (BOL) number under which the package was manifested.40931443
>pickupstringO4:10DHL eCommerce pickup account number.5320
startDatestringO1:10Date when package first received in a DHLeC distribution center, in YYYY-MM-DD format2020-07-13
endDatestringO1:10Ending receive date, in YYYY-MM-DD format (max range: 7 days inclusive)2020-07-13
citystringC1:40Recipient's cityNewark
statestringC0:50Recipient's state or provinceNJ
postalCodestringC3:10Recipient's postal code30066
countrystringC2Recipient's countryUS
orderedProductIdstringC3DHL eCommerce product ID (defaults to billedProductId if it is different from orderedProductId)MAX
limitintegerC1:10Number of results to return per request (max = 10)10
offsetintegerC0:999999Number of records to skip in the next request0

 

Response Description

M- Mandatory O- Optional C- Conditional N- Not Applicable 

NodeData TypeRequired?LengthDescriptionExample Values
totalintegerM1:999999Total number of records in the result set.14
limitintegerM1:10Maximum number of records returned in the request (max = 10).10
offsetintegerM0:999999Number of records skipped in the result set.0
timestampstringM1:50Timestamp of response; ISO-8601 date/time format.2020-07-28T18:00:00.087Z
linksobjectO Links to other pages in the tracking request. 
previousstringO1:50HTTPS link to the previous set of records (paging)./tracking/v4/package/open?packageId=123456789&limit=10&offset=10
nextstringO1:50HTTPS link to the next set of records (paging)./tracking/v4/package/open?packageId=123456789&limit=10&offset=0
packagesarrayO An array of packages. 
recipientobjectM The recipients address block. 
citystringO1:30Recipient cityNewark
statestringO0:50Recipient stateNJ
postalCodestringO0:20Recipient postal code7114
countrystringO2Recipient countryUS
signedForNamestringO0:20Signature for packageJess
eventsarrayO An array of tracking events 
locationstringO0:100Event locationHebron, KY, US
datestringO1:10Event date in YYYY-MM-DD format2019-10-24
timestringO1:8Event time in HH:MM:SS format15:20:24
timeZonestringO0:30Event timezoneET
gmtOffsetstringO0:10Event date and time offset to GMT. Present only for US domestic events.GMT-08:00
postalCodestringO0:20Recipient postal code41048
countrystringO2Event countryUS
primaryEventIdintegerM1:6Event id220
primaryEventDescriptionstringO1:100Event descriptionPROCESSED
secondaryEventIdintegerO0:6Event id100
secondaryEventDescriptionstringO0:100Secondary event descriptionPROCESSED in FACILITY
packageobjectM Package detail 
dhlPackageIdstringO1:30DHL-generated package ID.3387191106122423
packageIdstringO1:30Customer-provided package ID, also known as the CCN (customer confirmation number) or the GM number.GM60511234500000001
manifestIdstringO1:30Number assigned to the Consignment/BOL during Manifesting531818890913173105551
trackingIdstringO1:30Last-mile carrier package ID. For international shipments, this ID is only available after the package has been shipped. For domestic shipments, this ID contains the full USPS IMpb number and is always available. If the package is overlabeled for any reason, this field contains the latest carrier package ID.420071149361269903500011492028
deliveryConfirmationNumberstringO1:50For domestic shipments, this is the USPS tracking number, which is part of the IMpb number and is also sometimes referred to as the PIC (package identification code). If the package is overlabeled for any reason, this field contains the latest USPS tracking number. For international shipments, this field contains the last-mile carrier package ID (same value as the trackingId field) and is only available after the package has been shipped.9361269903500011492028
overlabeledDspNumberstringO1:60For domestic shipments which have been overlabeled, this is the original USPS tracking number. The USPS tracking number is part of the IMpb number and is also sometimes referred to as the PIC (package identification code). For international shipments and non-overlabeled domestic shipments, this field is unused.9261269903500013618305
intelligentMailBarcodestringO1:60For domestic flats shipments, this is the USPS IMb number. If the package is overlabeled for any reason, this field contains the latest IMb number. For international shipments and non-flats domestic shipments, this field is unused.0031043534391627906195625053434
overlabeledIntelligentMailBarcodestringO1:60For domestic flats shipments which have been overlabeled, this is the original USPS IMb number. For international shipments and non-overlabeled / non-flats domestic shipments, this field is unused.0031043534391640211895625057522
productClassstringO1:50DHL eCommerce product class assigned to the packageDomestic
orderedProductIdstringO3DHL eCommerce original ordered product name assigned to the itemEXP
billedProductIdstringO3DHL eCommerce product id assigned to the packageEXP
productNamestringO1:500The full name of the productDHL Parcel International Direct
signatureConfirmationFlagbooleanOtrue, falseDoes the package have signature confirmation?true
expectedDeliverystringO1:10Date the package is expected to receive a delivery scan. In YYYY-MM-DD format.12/25/2019
weightobjectO Weight of the package 
valuefloatM0:999999999Total rate calculated for this product7.40
currencystringM3:3Three-character ISO currency code for the rateUSD
effectiveFormstringM10Date that reflects when a rate was last updated2024-01-28
rateComponentsarrayM Rate components 
valuestringM1:10Unique rate component identifierZBPT
partIdstringM1:20Invoiced part identifier for this rate component36
descriptionstringM1:50Short description of this rate componentBase Rate
amountfloatM0:999999999Amount of this rate component, expressed in the total rate currency6.23
valuefloatM1:9999.99Package weight3.2
unitOfMeasurestringM1:3Package weight unitlb
intelligentMailBarcodeFlagbooleanOtrue, falseWhether IMB was appliedtrue
declaredValueintegerO1:50Declared value of the item23
declaredValueCurrencystringO3Declared value currencyUSD
batchReferencestringO1:50Customer provided reference for the packageTEST
contentCategorystringO1:50Mail content category assigned to the item01