EasyPost is integrated with the DHL eCommerce Solutions API and is certified by DHL to provide the following services via their platform:
- Live rating - retrieve rates specific to your DHL account in real-time.
- Label Creation - create a shipping label for your package.
- Manifesting - send DHL your shipment data electronically and receive a driver manifest summary. (Please also see our Important Note About DHL Asynchronous Manifesting)
- Tracking - track your shipment through the DHL network.
- Returns - create a return label for your package.
DHL now supports "Live Rating" in the newest version of their API. This means that whenever you create a shipment via EasyPost, EasyPost makes a request to DHL to get rates for your shipment. These rates will be supplied by DHL and will be specific to your DHL account. Because rating is controlled by DHL, if you find that any rates are incorrect, you will want to reach out to your DHL account rep to ask that they update the rates in their database for your account.
Available Service Levels:
Additional DHL ECS Services
There are certain services that DHL ECS will not return rates for on a rating call with EasyPost, but you can still obtain them through the API by using the one-call shipment buy within EasyPost. Those additional service names are listed below.
Additional domestic services
Additional international services
What is a one-call shipment buy and how do I use it?
A one-call shipment buy is just like creating a shipment, only this time you will specify the carrier_account and service that you wish to buy in the creation call. When you do this we will immediately purchase the service you specified and return a label to you. Please note using this method means you will not see the cost of the rate within EasyPost (because we skip rating altogether). As such, the selected_rate.rate will show up as a dummy rate of 1 cent, even though you'll be charged the correct price from the carrier. Here is an example of a cURL request that uses the one-call buy method:
curl -X POST https://api.easypost.com/v2/shipments \ -u <ApiKey_Keep_The_Colon>: \ -d 'shipment[to_address][name]=Dr. Steve Brule' \ -d 'shipment[to_address][street1]=123 Fake St' \ -d 'shipment[to_address][city]=Redondo Beach' \ -d 'shipment[to_address][state]=CA' \ -d 'shipment[to_address][zip]=90277' \ -d 'shipment[to_address][country]=US' \ -d 'shipment[to_address][phone]=1234567890' \ -d 'shipment[to_address][email]=email@example.com' \ -d 'shipment[from_address][name]=EasyPost' \ -d 'shipment[from_address][street1]=123 Fake St' \ -d 'shipment[from_address][street2]=5th Floor' \ -d 'shipment[from_address][city]=San Francisco' \ -d 'shipment[from_address][state]=CA' \ -d 'shipment[from_address][zip]=94104' \ -d 'shipment[from_address][country]=US' \ -d 'shipment[from_address][phone]=1234567890' \ -d 'shipment[from_address][email]=firstname.lastname@example.org' \ -d 'shipment[parcel][length]=20.2' \ -d 'shipment[parcel][width]=10.9' \ -d 'shipment[parcel][height]=5' \ -d 'shipment[parcel][weight]=65.9' \ -d 'shipment[carrier_accounts]=ca_yourDhlEcsCarrierAccountID' \ <--- Adding the carrier account you wish to us -d 'shipment[service]=DHLPacketIPA' <--- Adding the service name to buy from DHL ECS
DHL supports PNG and ZPL formatted labels via this integration. In addition to printing a DHL shipping label with the regular address and tracking number data, EasyPost supports a custom text field which will allow users to print a custom reference string on the label. This can be accomplished by using the print_custom_1 option as documented in the options section of our API documentation.
Manifesting (see also ScanForms)
There are two reasons why you should manifest your DHL shipments:
- It triggers sending your shipment data to DHL electronically, which is a DHL requirement.
- It produces a "Driver Manifest Shipment Summary", which you are required to supply your DHL driver upon pickup.
This is what the Driver Manifest Shipment Summary document looks like (though you may have more than one shipment):
Important Note About DHL Asynchronous Manifesting
DHL manifesting is asynchronous and can take several minutes to fully complete and receive a manifest document. Because of this, you will not immediately receive a driver manifest summary upon manifesting your batch of shipments, but it will become available after a few minutes. Here is some suggested work-flow to help with handling this asynchronous manifesting:
1. Create a batch with a list of shipments (optionally add shipments to the batch throughout the day).
2a. Wait X number of seconds (usually 1-3 seconds depending on batch size) for the batch creation job to finish
2b. Wait for a batch.updated webhook event which will show that the batch.state is "created". (Note: attempting step 3 will result in errors if it is performed while the batch.state is still in "creating" status.
3. Manifest (scan_form) batch.
4a. Wait X number of minutes (can take up to 5 minutes) and fetch the scan_form to confirm it is completed
4b. Using webhooks, wait for the scan_form.updated event and obtain the URL to your manifest document at that time.
DHL eCommerce tracking will work similarly to other carrier integration. It is important to note that DHL sometimes hands packages off to USPS for last-mile delivery in the United States, so tracking for final delivery is dependent on DHL receiving the updates from USPS and then providing that information on to EasyPost.
When creating a return label with DHL eCommerce Solutions, note that this integration will appear to return 1 cent rates on the rating call. This is because DHL eCommerce Solutions will bypass the rating call for return labels. However, this call allows the user to see the available services for their return label, from which they can select their preferred return service. After the purchase and use of the return label, DHL eCommerce Solutions will bill you for your return label via their own respective billing system for the appropriate postage fees for your label.
Article is closed for comments.