Push API (DHL Global Forwarding)
v 2.2.2
Division: DHL Global Forwarding

Best for:

  • Subscribing to DHL Global Forwarding Push APIs
    • Register for Push API subscription
    • Provide your URL callback details
    • Start to receive messages pushed from DHL to your API
  • Business customers of DHL Global Forwarding
  • Air and Ocean Freight shipments
Region: Global
Used for: Shipping, Tracking
Overview

Push API allows developer to subscribe to messages/notifications from DHL Global Forwarding transport management systems. Developer can specify his/her callback URL and credentials during the registration process. Messages/notifications will be pushed to the callback URL on best effort basis.

Available Push APIs

  1. Timestamp Notification Push API
    • To subscribe to notifications on availability of new shipment timestamps, for shipments booked using Shipment Booking (DHL Global Forwarding) API
       
  2. Invoice Push API
    • To subscribe to Sales Invoice data once shipment invoice is posted by DHL Global Forwarding. Developer can choose to receive a notification message or choose to receive the Sales Invoice data

Upcoming Push APIs

  1. ePOD Push API
    • To subscribe to notifications on availability of Proof of Delivery 
Timestamp Notification Push API

Purpose

As shipment is being transported, shipment's latest location and events are constantly being recorded in order to provide up-to-date shipment visibility. Each recorded event creates a timestamp containing information about the event.

Use this API to subscribe to notifications of new timestamps for your shipments booked using Shipment Booking (DHL Global Forwarding) API. The notification is a simple JSON message containing basic information about the latest event. 

Example use case:

  1. Book a shipment using Shipment Booking (DHL Global Forwarding) API
  2. Subscribe to the Timestamp Notification Push API
    • Specify your API endpoint and credentials for DHL to push the notification to 
  3. DHL will push a notification to your API endpoint whenever a new timestamp is recorded for your shipment
  4. If you need full shipment tracking details for the shipment, invoke the Shipment Tracking (DHL Global Forwarding) API

Sample Timestamp Notification Message

{
    "timestampNotification": {
        "type": "shipment",
        "shipmentID": "S2100012844",
        "housebillNumber": "Q398960",
        "timestampCode": "RCS",
        "timestampDescription": "Received at airline",
        "timestampDateTime": "2021-07-16T19:32:00+08:00",
        "notificationID": "efe7147f-f9cf-4046-9606-33ba8ed4c709",
        "shipmentTrackingURL": "https://api-sandbox.dhl.com/dgff/transportation/shipment-tracking?housebill=Q398960",
        "_DGFBookingID": "02b3b90cb0294077b37d2efc0f78c7f6"
    }
}

Below are the timestamp codes to expect from the API.

Ocean Freight Shipment

TimestampCode TimestampDescription
A02 Estimated Pick Up Date
A05 Gated in at Port/Terminal
A12 Actual Freight Available
A13 Gated out at Port/Terminal
A17 Customer Booking Received
A30 Arrival at Origin CFS/CY
A31 CFS/CY Cut-Off Date
A37 Actual Arrival at Destination CFS/CY
A39 Import Customs Cleared
A40 Shipment Cancelled (if applicable)
A41 Consignee / Broker Notified
A60 Document Handover (if no POD)
ARD Actual Vessel Arrival
A29 Estimated Vessel Arrival
A28 Estimated Vessel Departure
A34 Shipment Entered into System
A04 Actual Pickup Date (customer)
A32 Shipment Delivered
A42 Actual Vessel Departure
ONH Arrival to CFS

Air Freight Shipment

TimestampCode TimestampDescription
HBE Shipment Entered into System
RRT Estimated Future Pick-Up
FUT Future Delivery Requested
RFD Appointment Requested by DGF
EOD Appointment Confirmed by Customer
APT Actual Pickup Time
RCD Received at Origin
EXD All Export Documents Received
DEW Departed DHL Station
CAC Delivered to airline
RCS Received at airline
DOS Document Handover (Export)
DEP Carrier: Departed
EAA Carrier: Arrived (1st Transit Point)
EAB Carrier: Departed (1st Transit Point)
EAC Carrier: Arrived (2nd Transit Point)
EAD Carrier: Departed (2nd Transit Point)
ARR Carrier: Arrived
ARV Arrived Final Destination
DLV Handover Freight to Forwarder
DIH Pick-up from Airline
FPR Freight Recovered at
TBN Broker Notified
STU Ready for Import Clearance
CUS Import Customs Entry
CLC Import Customs Cleared
OFD Out for Delivery
DOH Import Document Handover
DOI Document Handover (Import)
EPD Estimated Delivery
POD Shipment Delivered
CAN Shipment Cancelled

Prerequisite

You must have access to Shipment Booking (Global Forwarding) API in order to subscribe to Timestamp Notification Push API. 

For more information on Shipment Booking (Global Forwarding) API, see https://developer.dhl.com/api-reference/dgf-shipment-booking#get-started-section/overview

Approval process

Timestamp Notification API is automatically approved for users of Shipment Booking (Global Forwarding) API. Please contact dgf.apisupport@dhl.com if you need any help.

Invoice Push API

Purpose

Use this API to subscribe to invoice data posted to your organization account. Developer can choose to receive a notification (with link to download the Invoice data) or to receive the complete Invoice data from DHL Global Forwarding Push API. 

Example use case:

  1. Subscribe to the Invoice Push API
    • Specify your API endpoint and credentials for DHL to push the notification to 
  2. Contact dgf.apisupport@dhl.com to approve your request
  3. DHL will push Invoice data to your API endpoint whenever a new invoice is posted to your organization account

Sample Invoice Notification Message

{
  "invoiceNotification" : {
    "type" : "sales-invoice",
    "invoiceNumber" : "X0000494",
    "issueDate" : "2021-04-09T14:33:00",
    "paymentDueDate" : "2021-12-09T14:33:00",
    "url" : "https://api-uat.dhl.com/dgff/transportation/sales-invoice/68dc1075-b90a-47e1-94d4-28f2b1899b59"
  }
}

 

Prerequisite

You must be a valid customer of DHL Global Forwarding to subscribe to Sales Invoice Push API. 

Approval process

Please contact dgf.apisupport@dhl.com to approve your request. The team will perform the necessary verification and setup on your accounts for you to start receive Sales Invoice Push API data.

User Guide

Authentication

Push API uses oAuth 2.0 protocol to authenticate and authorize access to API consumers. For implementation details, please see Swagger specification on the "Reference Docs" tab. 

To view your API credentials :

  1. From the My Apps screen, click on the name of your app.
    The Details screen appears. 
  2. If you have access to more than one API, click the name of the relevant API. 
    Note: The APIs are listed under the “Credentials” section. 
  3. Click the Show link below the asterisks that is hiding the Consumer Key
    The Consumer Key appears.    

 

Environments

The addressable API base URL/URI environments are:  

Environment Description
https://api-sandbox.dhl.com/dgff/push/subscription/timestamp-notification Test environment
https://api.dhl.com/dgff/push/subscription/timestamp-notification

Production environment

https://api-sandbox.dhl.com/dgff/push/subscription/invoice Test environment
https://api.dhl.com/dgff/push/subscription/invoice Production environment
Legal Terms

Specifics for the use of Push API Data

  1. To register for the use of and access to the Push API (DHL Global Forwarding) – hereinafter “DGF Push API” – You and/or the legal entity you are authorized to represent (hereinafter “You”/”Your”) need to have an active customer account with a DHL Global Forwarding entity (hereinafter referred to as “DHL”). An API Productive Key and access details will be provided to You subject to a successful validation of Your credentials by DHL. For the avoidance of doubt, a reference to the DGF Push API in these Legal Terms is deemed a reference to the DGF Push API including the API Services (such API Services include the upload and download of documents as set forth herein and in the scope description), unless the context suggests otherwise.
  2. The DGF Push API provides the possibility to receive notifications of new timestamps (i.e. records of shipment's latest location and other transport events) for Your DHL shipments booked using the Shipment Booking API (DHL Global Forwarding). Data, which You receive via the DGF Push API shall generally be deemed Confidential Information in the meaning of section “Communication” of the General Developer Portal Terms of Use. You must not reveal and/or provide third parties with the data and/or analyze, modify such data in any form and/or derive data/information especially for competitive purposes from it without our prior written consent.
  3. If You engage an external developer, or other IT services provider to develop Your Application or any other third party (“Third Parties”) to access and/or use the DGF Push API on Your behalf, You remain fully liable for any acts or omissions of such Third Parties in connection with the access to and/or usage of the DGF Push API.
  4. These Legal Terms and the General Developer Portal Terms of Use govern Your use of and/or access to the DGF Push API and, unless otherwise stated herein, do not replace and/or modify the applicable terms and conditions of carriage; any transportation services agreement; or any other agreements with DHL or any of its affiliates, which govern services or products provided to You (separately, each an “Agreement”). Notwithstanding the foregoing, You expressly acknowledge and agree that solely with respect to Your use of and access to the DGF Push API the Legal Terms shall take precedence over the terms and conditions in an Agreement, unless an Agreement specifically addresses the use of or access to the DGF Push API by You, in which case the Agreement shall prevail.
1.0
24.Jan.2022
  • First release
  • Added Timestamp Notification Push API