- Parcel UK shipping and tracking
- Creating Domestic (UK) and International parcel shipments (UK pickup)
- Retrieving product and service information, which can be used to integrate and enrich your own IT fulfilment systems
The DHL Parcel UK API(s) are a set of tools and services that enable customers and partners to integrate directly with our latest products. These services allow you to:
|Create shipments and optionally return the labels
|Track your shipments as they transit our logistics network
|Retrieve product and service information, which can be used to integrate and enrich your own IT fulfilment systems
These APIs support the following types of parcel products
- Domestic (UK) and International delivery
- Domestic pick-up (UK)
- Returns (UK)
- Ability to generate ZPL, PNG, and PDF Labels, including return instructions
Created for developers
- A single API based on industry standards that developers know and understand
- Built with the fast-paced warehouse and time-sensitive e-commerce checkout in mind
- Dedicated API environment to test your solution
- Developer support from DHL API experts
Using the API
The API has been designed for use by developers. You will need basic knowledge of REST APIs, JSON, and HTTPS. Also, your organisation must to have an active customer account with DHL Parcel UK. If you need to learn more on how to get an account, please use this web form
Use Case Overview
Below you can find an overview of the different use cases and supporting APIs
|Use the Access Token API to get the Oauth 2.0 access token for accessing DHL Parcel UK API. Access token is valid for 1 hour.
Use the Product Capabilities API to get domestic and international DHL Parcel UK products available for your shipment.
Provide the origin, destination country and postcode with weight to get the suitable product list. You can further filter available products with optional parameters e.g. destination address type, length, width, height etc.
Use the Shipping Label API to create DHL Parcel UK shipments, you can optionally return labels and provide return (labels and instructions) and customs information.
It is recommended to first use the Reference Data API to retrieve valid product and service information. Passing invalid information will result in response errors when creating shipments.
|Use the Shipping Label API, at this stage labels can only be generated during the create shipment process.
|Use the Tracking API, this service retrieves tracking statuses for DHL Parcel Shipments
Use the Reference Data APIs to get DHL Parcel UK domestic and international services. Use the Service code from this API in shipping label API
The domestic UK service is combination of Product (Based on weight and dimensions) and service (Next day. Next day 9AM, Saturday).
Use the Reference Data APIs, This service offers all of the reference and product data that can be used to crate shipments.
In addition you can use this service to keep your local IT systems and service up to date and synchronised with DHL Parcel UK.
|PRODUCT COUNTRY FEATURE
Use the Reference Data APIs to get DHL Parcel UK offering in UK and internationally.
This gives reference for availability of particular DHL Parcel UK product in given country.
Use the Reference Data APIs to get US states codes.
This is useful for sending correct state codes in DHL Parcel UK shipping label API
Use the Reference Data API, when creating international shipments, it is important that valid country data be provided.
POST CODE VALIDATION
|Use the Reference Data API, when creating domestic shipments, it is important that valid postal code data be provided.
Use the Reference Data APIs to get the currency code and name
This is useful for sending correct currency codes in DHL Parcel UK shipping label API.
|UK PUBLIC HOLIDAY DATA
Use the Reference Data APIs to get the UK public holiday data.
Public holiday information is useful to check days on which collections and deliveries can be arranged by DHL Parcel UK
|UK POSTCODE DISTRICT DATA
Use the Reference Data APIs to get the UK Post code district data.
Post codes and postcode districts enables with accurate address enables on time deliveries.
Use postcode district API to validate postcode district in UK. Also get the service availability for delivery postcode district.
For onboarding, you need to follow this process guided by the DHL API team:
- Contact DHL to align use case and requirements. If you have an active account with DHL Parcel UK please contact your Sales person or Account Manager.
If you do not have an account please use this web form
- The DHL API team are unable to accept direct requests and will contact you directly once your case has been registered
- At this stage access to the sandbox API's will be provided - you can try and make requests directly from the reference docs section. Read the detailed documentation on how to use APIs.
Using the API
To get access to the API, you will receive a Client ID and a Client Password; please use the contact form to apply for these.
The API provides OAuth 2.0 Access Token with various authorization scopes.
The “Token” API call provides an OAuth 2.0 Bearer token with authorization scope, assigned to your client id. It grants you an access to use the APIs.
It is advisable to first use the Reference Data APIs to obtain valid product and shipping combinations. Invalid parcel combinations will not be allowed and will result in an error response. For example it will not be allowed to create an international shipment with a UK domestic service.
A sound understanding of the Reference Data APIs will accelerate onboarding.
The addressable API base URL/URI environments are:
The UAT environment can be used for testing and development freely. Only the production environment will trigger underlying processes such as billing and operational procedures.
Rate limits protect the DHL infrastructure from suspicious requests that exceed defined thresholds.
Should you exceed your rate limit you will receive a HTTP status code within the API response that will indicate this.
In addition to the rate limit a so called “spike arrest” protects our API Platform from potential outages caused by a very large volume of requests sent in a short time span (minutes or seconds). This will be indicated by a different HTTP status code.
Shipping Label API
This API offers various functionalities that all support you in managing your parcel shipments. You will find a detailed description on how to use these along with snippets in the reference section
- This API can generate labels as a base64 encoded string
- Labels are available for all covered products, i.e. DHL Parcel Connect, DHL Parcel Return Connect and DHL Parcel International, to understand how this works please visit the reference section
- Currently the following formats and resolutions are available:
|ZPL 203 dpi
(10 x 15cm)
|PNG 203 dpi
(10 x 15cm)
- When implementing DHL Parcel Return labels, it is recommended to additionally generate return instructions please visit the reference section to learn more
- To register for the use of DHL Parcel UK 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 Parcel UK 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.
- 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 DHL Parcel UK 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 DHL Parcel UK API.
- The Legal Terms govern Your use of and/or access to the DHL Parcel UK 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 DHL Parcel UK 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 DHL Parcel UK API by You, in which case the Agreement shall prevail.
- You grant DHL the right to use all data, documents, logos or other information transmitted by You to or within the DHL Parcel UK API (“Information”), for the purposes specified in the API Services. This includes the use of the Information for the purpose of processing and transporting shipments. You shall ensure that all Information which You transmit to DHL via the DHL Parcel UK API is complete, correct and accurate. You will be solely responsible for any damage or consequence that may arise from the use of false or incorrect or incomplete Information. You shall be solely responsible for, and shall indemnify DHL in full against, any claims, losses, damages or consequences that may arise from the use of or reliance on the Information.
- You are responsible for all activities conducted via the DHL Parcel UK API in accordance with all applicable laws, in particular competition, data protection and customs laws. You shall be responsible for the provision of the correct legal ground to process personal data in order for DHL to communicate with receivers and consignees of shipments. In particular, in countries where consent is required, You shall obtain the consent of any receiver for the receipt of any e-mail or SMS from DHL or any other data, documents or information in electronic form and in general, from any third party, for personal data owned by any third party and which You provided to DHL. On request of DHL, You shall provide DHL with evidence of such consent.
- The API Services are provided on an "as is" basis. DHL, to the fullest extent permitted by law, excludes all warranties, whether express, implied, statutory or otherwise, including but not limited to the implied warranties of merchantability, non-infringement of third parties rights and fitness for a particular purpose. DHL, its affiliates or agents make no representations or warranties about the accuracy, completeness, security or timeliness of the API Services. No information obtained via the DHL Parcel UK API shall create any warranty not expressly stated by DHL in the Legal Terms.
- You shall use the DHL Parcel UK API only for the legitimate contractual purposes and only in connection with Your DHL shipments.
- API Services
The following prerequisites and restrictions apply for the use of and access to the API Services, the data or the information provided via the DHL Parcel UK API.
When using the API Service “Shipment” this includes, amongst other things, the possibility to create and print shipping labels, to book shipment collections and access other value added services. Please be aware that the booking of the shipment within DHL Parcel UK API does not constitute the contract of carriage. The contract of carriage will only be concluded when the shipment is handed over or picked up and accepted by DHL.
The API Service “Label” provides You with the possibility to create and download labels for shipments. Please note that the creating and/or downloading of a label does not constitute the shipping contract. Such contract shall be governed separately.
- Data requested and received via the API Service “Tracking”, such as transport status, estimated delivery time, including the tracking number is hereinafter referred to as “Tracking Data”.
- Tracking Data is provided to You and/or the entity you are authorized to represent under the prerequisite, that You retrieved the according tracking number in compliance with the applicable law, especially in the field of data protection and competition law and that You use the Tracking Data solely for Your own or Your customers’ legitimate tracking purposes.
- You shall not combine Tracking Data with advertisement or present it in a way that it could be regarded as advertisement.
- Unless otherwise agreed, You shall delete the Tracking Data 180 after the last tracking event is completed. Last tracking event shall be defined as the actual delivery unless otherwise agreed.
- The use and submission of Tracking Data – including submission to any of Your subcontractors – shall always be in compliance with applicable laws and regulations, including – without limitation – data protection laws and competition/antitrust law.
- If You are neither the sender nor the recipient of DHL Parcel UK- or DP DHL Group-shipment/s, the Tracking Data refers to,
- You shall ensure, that you are authorized to act on behalf of the sender and/or the recipient;
- You shall make the sender aware of the necessity to inform the recipient transparently about the processing of his/her personal data according to applicable data protection laws;
- You shall inform the sender and/or recipient transparently that the use of Your Application may result in the disclosure of data being subject to postal secrecy and data protection laws to third parties (including You).
- Initial release
Added below new APIs for Access token, Product selection and Parcel Management reference APIs:
- Access Token
- Product Capabilities API
- Product country feature
- Public holiday
- UK postcode district
Updates to documentation and support for IOSS.
Updates to API reference documentation.
Updates to API reference documentation.
- Request Pickup
- Service Point Finder
- Trading Location
- Customs Declaration
Updated API Contract
Added What 3 Words parameter under consignee address. Added a new parameter customer ref 2 under shipment details and removed custom clearance reasons for export (returnedgoods and repairs) under customs invoice.
Label format options updated to include PNG-RAW and JPG-RAW
Drop off type called DEPOT for customers that exclusively drop their shipments at DHL Parcel UK depots
New International call examples Internatonal_Shipment_Account_Address_Pickup, International_Shipment_DHL_Depot_Drop_Off, International_Send_To_3rd_Party_Drop_Off.
Incoterms updated for international shipments in the Data Schema.