Best for:
- Creating domestic and international palletized road freight transport orders (> 35 kg) across Europe with DHL Freight.
Precondition:
- For existing DHL Freight business customers with a valid contract.
Shipment Booking API allows you to create road freight transport orders/bookings with DHL Freight.
Following information is mandatory for booking:
-
Shipment header details, containing - transportation productCode
- requested pickup and delivery dates and instructions
- total weight, volume, no. pieces
- payerCode (incoterm)
- multiple references (for invoice and tracking. See details in schema)
-
Parties (Consignor/Sender and Consignee/Receiver are mandatory. Pickup and Delivery details are required only if they are different than Consignor or Consignee details). - ID (Account ID or Invoice ID). Only required for the freight payer party, based on payerCode.
- type (e.g. consignor, consignee, pickup, delivery. See details in schema)
- single reference (printed on your label)
- Address
-
Additional services (optional). You can only use additional services that are allowed for your product.
See API's for Product API and Additional Services API.
- Pieces (shipment pieces details) and Dangerous Good (ADR) details if goods have ADR classifications.
Note: the pieces segment contains the "id" field which represents the Serial Shipping Container Code (SSCC) also known as barcode number or license plate. This must be either a GS1 or ANSIFACT code. If your company has an own GS1/ANSIFACT account for this, you can provide your own SSCC codes to us in your booking request. If you do not have these, DHL Freight will generate them for you in GS1 format.
After successful transport order/booking creation, you receive the unique shipment ID and license plates back in the response.
Use the shipment ID for tracking and response data for creating your labels via the Print API.
For additional information, please contact api4freight@dhl.com
Get Access
You must request credentials for any applications you develop. Please check below the options to request your access:
Internal DHL developer:
[1] Click My Apps on the portal website. | [2] Click the + Add App button. | [3.] Complete the Add App form |
You can select the APIs you want to access. When you have completed the form, click the Add App button. |
Authentication
Every call to the API requires a subscription key. This key needs to be either passed through a query string parameter or specified in the request header (DHL-API-Key).
The LocalityRegister API requires a two step authentication where you first need to get access to the LocalityRegister API (see below) and as a second step you need to retrieve a Bearer Token.
To view your API subscription keys:
- From the My Apps screen, click on the name of your app.
The Details screen appears.
- 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.
- Click the **Show ** link below the asterisks that is hiding the Consumer Key.
The Consumer Key appears.
With your obtained API Key and API Secret you need to obtain a bearer token via the DHL Group Authentication API.
Set username with your API Key.
Set Password with your API Secret.
The obtained Bearer Token now can be used for accessing the API products in your APP.
Environments
The addressable API base URL/URI environments are:
Environment | Description |
https://api-sandbox.dhl.com/freight/shipping/orders/v1 | Sandbox environment |
https://api.dhl.com/freight/shipping/orders/v1 | Production environment |
Rate limits
Rate limits protect the DHL infrastructure from suspicious requests that exceed defined thresholds.
The table below details the main request limits:
Service Level | Maximum calls per second | Maximum calls per day | - | 250 |
---|
Please contact api4freight@dhl.com if you need a different service level.
When the limit is reached, you will receive an HTTP Status code:
429: Too many requests.
Specifics for the use of DHL Freight Shipment Booking API
- The Shipment Booking (DHL Freight) API enables creating your transportation request for DHL Freight when transporting through DHL Freight's European groupage network.
- For the purposes of these Legal Terms, “you”/”your” or “registrant/user” means the (natural) person or entity holding a (transportation) contract with a DHL Freight entity.
- If you engage an external developer or other IT services provider to represent you and to develop Your Application according to the General Developer Portal Terms of Use and these special API terms & conditions (also referred to as “Legal Terms”), you are liable for the acts or omissions of such third party in connection with the usage of the Additional Service (DHL Freight) API and the API Services.
- By registering for the use of and/or using the Shipment Booking (DHL Freight) API, each registrant and/or user of the Shipment Booking (DHL Freight) API in addition to the General Developer Portal Terms of Use agree to these Legal Terms and all the terms included herein. Should the terms of the General Developer Portal Terms of Use and these Legal Terms conflict, these Legal Terms shall govern.
- These Legal Terms and the General Developer Portal Terms of Use govern your usage of Shipment Booking (DHL Freight) API including the API Service and, unless otherwise stated herein, do not replace and/or modify any other DHL Freight terms and conditions, DHL Freight transportation services agreements and/or any other agreements, contracts or SOWs with a specific DHL Freight entity 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 Shipment Booking (DHL Freight) API including the API Service these Legal Terms and the General Developer Portal Terms of Use shall have preference over the terms and conditions in an Agreement, unless any terms and conditions in an Agreement specifically address the use of the Shipment Booking (DHL Freight) API or the API Service by you, in which case the specific terms and conditions of the Agreement shall prevail with respect to Your use of the Shipment Booking (DHL Freight) API/the API Service.
- The API Productive Key for the Shipment Booking (DHL Freight) API is a private and individual key for you. it shall not be used by or for other external customers. You may not allow your developer or IT services provider to use your API Productive Key for potential other DHL Freight (transportation) customers.
- For the avoidance of doubt, when data has been sent or received outside of Freight’s business hours, the processing of data and/or execution of the (transportation) services will start according to the terms and conditions set out in the applicable Agreement or, absent thereof, as soon as reasonably practicable. Unless otherwise expressly agreed upon in writing (e.g. in the Agreement), the transmission of a set of data via the Shipment Booking (DHL Freight) API by you shall be deemed a proposal to enter into an individual (transportation or other) contract and has to be acknowledged/accepted by the receiving Freight entity before a contract with regards to e.g. the transport is effected. The parties expressly waive any rights to contest the validity of an individual (transportation or other) contract effected by the use of the Shipment Booking (DHL Freight) API in accordance with these API Legal Terms on the sole ground that it was effected via API. Freight may determine which of the offered data fields need to be filled by you, to use the Shipment Booking (DHL Freight) API properly. You are responsible for the correctness and completeness of the data provided. Freight reserve the right to transform, adapt and/or amend data provided by you to process such data accordingly. It is in your responsibility to review and check the booking confirmation received by Freight in order to make sure that the data provided by you (e.g. number of items) has been adopted correctly.
- Neither DHL Freight nor any other affiliate within DHL Group, is responsible for storing a record of any data (API-call or -request data or the actual contents of the data sets), that has been exchanged via the Shipment Booking (DHL Freight) API, unless expressly agreed upon in writing (e.g. in the Agreement).
- You shall use the services and/or data that you receive via the Shipment Booking (DHL Freight) API only for the legitimate business purposes, only in connection with DHL Freight's transportation and/or other services, and in compliance with all applicable laws and regulations, including but not limited to, laws regarding the use of personal data.
- Please note, that we provide free text boxes (e.g. for customer references) to improve the functionalities and user experience of the Shipment Booking (DHL Freight) API. We explicitly ask you to refrain from sending any personal or business critical data and/or information as free text. It is within your sole responsibility to ensure that the data or information you send does not infringe upon applicable law, esp. data protection law, and that you are entitled to use the respective data and/or information accordingly.
- You acknowledge that material and information you may acquire, including (but not limited to) transportation methods, booking information, financial or other accounting information and other procedures and processes relating to the Shipment Booking (DHL Freight) API and the API Service (“Materials”) are proprietary, confidential, and owned by DHL Freight. Other than described herein, you shall have no additional rights to the Materials.
- For the purposes of the use of the Shipment Booking (DHL Freight) API and the API Service, these Legal Terms and the General Developer Portal Terms of Use are governed by the law and jurisdiction defined in the Agreement. Should no law or jurisdiction be defined in the Agreement or otherwise, these Legal Terms shall be governed according to the law and jurisdiction of the principal place of business of the according DHL Freight entity/division providing the transportation services.