Best for:
To get a price quote for a planned Road Freight shipment with DHL Freight.
Precondition:
- For existing DHL Freight business customers with a valid contract.
- For domestic and international palletized road freight transport orders (> 35 kg) across Europe.
- Customer must already have an eID (user/password)
Price Quote API allows you to get a price quote for your shipment to be booked.
It will provide you with the freight amount and additional services based on your contract with DHL Freight for the respective products.
In addition to the OAuth credentials you also need an eID that consists of a username and password.
The eID can be requested at DHL Freight. After validation and approval your eID will be setup for your relevant account number(s) and Freight transportation products.
Your Price Quote request must contain:
- eID (username / password)
- Shipment details containing
- transportation product code (e.g. ECI)
- payer code / delivery term (e.g. DAP)
- total weight, volume, loading meter and pieces details
- parties and account number
- party type:
Consignor/Sender and Consignee/Receiver are mandatory.
Pickup and Delivery are required only if they are different from Consignor or Consignee - account number (id), only required for the freight payer party, based on payerCode.
- party address containing country code, postal code and city name.
- party type:
- additional services that you require
- Optionally you can provide an "own surcharge" as percentage or amount to be added to the total amount calculated.
This may be needed when you want to offer your retrieved quote to your customer with a mark up.
The Price Quote response contains the rating details, split into freight amount and additional services that apply. For the freight amount, also the calculation basis (e.g. chargeable weight in kg) is returned. Example response for local Dutch language and English translation.
[
{
"description": "VRACHTKOSTEN",
"descriptionEng": "Volumetric weight",
"id": "ChargedWeight",
"sortOrder": -2,
"unit": "kg",
"value": "1400.00"
},
{
"description": "VRACHTKOSTEN",
"descriptionEng": "Freight cost",
"id": "FreightCost",
"sortOrder": -1,
"unit": "EUR",
"value": "340.53"
},
{
"description": "CASH BIJ LEVERING (COD)",
"descriptionEng": "COD FEE",
"id": "406",
"sortOrder": 0,
"unit": "EUR",
"value": "0.00"
},
{
"description": "DIESEL TOESLAG",
"descriptionEng": "FUEL SURCHARGE",
"id": "FuelSurcharge",
"sortOrder": 10,
"unit": "EUR",
"value": "37.46"
},
{
"description": "VOORAANMELDING LEVERING",
"descriptionEng": "PRE ADVICE DELIVERY",
"id": "preAdvice",
"sortOrder": 20,
"unit": "EUR",
"value": "3.33"
},
{
"description": "INSURANCE",
"descriptionEng": "INSURANCE",
"id": "insurance",
"sortOrder": 20,
"unit": "EUR",
"value": "18.00"
},
{
"description": "Total",
"descriptionEng": "Total price",
"id": "TotalPrice",
"sortOrder": 100,
"unit": "EUR",
"value": "399.32"
}
]
For additional information, please contact api4freight@dhl.com
Get Access
For getting access to DHL Freight APIs, please login the portal as developer and request access for the Freight APIs by clicking at the top right corner of the screen as "Get Access". Then fill out the DHL Freight Customer Onboarding Form and select which Freight APIs you need. After initial evaluation and business approval you will be informed via your developer email and you can find your SANDBOX APP with requested APIs under your user profile under My Apps.
Authentication
Every call to the API requires a specific key called as Bearer Token which is valid 30 minutes. This key needs to be either passed through a query string parameter or specified in the request header.
The DHL Freight APIs require a two step authentication where you first need to get access to the API itself (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 Freight API, click the name of the relevant Freight 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, set username with your API Key and set Password with your API Secret to obtain a Bearer Token via DHL Freight APIs.
You do not need to request access directly to the DHL Group Authentication API, as Bearer Token mechanism is included in all DHL Freight APIs.
Above link to the DHL Group Authentication API is only for documentation and developer instructions.
Important:
You also need a so called eID (user/password) that can be obtained from your DHL Freight support team.
Environments
The addressable API base URL/URI environments are:
Environment | Description |
https://api-sandbox.dhl.com/freight/info/pricequote/v1 | Sandbox environment |
https://api.dhl.com/freight/info/pricequote/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 |
---|---|---|
Standard | - | 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 Additional Service API
- The PriceQuote Service (DHL Freight) API enables to validate which DHL Freight additional services can be combined to each product and how they can be combined with each other.
- 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 PriceQuote Service (DHL Freight) API and the API Services.
- By registering for the use of and/or using the PriceQuote Service (DHL Freight) API, each registrant and/or user of the PriceQuote Service (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 PriceQuote Service (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 PriceQuote Service (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 PriceQuote Service (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 PriceQuote Service (DHL Freight) API/the API Service.
- The API Productive Key and eID (user/password) for the PriceQuote Service (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.
- 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 PriceQuote Service (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 PriceQuote Service (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.
- 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 PriceQuote Service (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 PriceQuote Service (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.
1.2
- Sprint 2025/R01 Release