DHL Express REST API Enhancements
Overview
Effective April 10, 2025, we’re doing key enhancements to your DHL Express REST API integration. These updates are designed to improve your shipping and returns experience with better API reliability, expanded features, and seamless operation.
Key details
- The new REST API features improved shipment data, automatic paperless invoices, and new DHL box types.
- Labels will reflect paperless processing (PLT), and rate results are now included in Labels API responses.
- This update impacts all existing AfterShip Shipping and Returns customers using a MyDHL Express carrier account, as well as all new customers.
- AfterShip Shipping and AfterShip Returns services will continue without downtime.
- All enhancements will be made on the backend, so no action is required from the customer.
Key API Enhancements
Require action from your end
These enhancements require you to take some actions to ensure your shipping and returns services remain compatible with the updated API.
API enhancement | Details | Before | After | Action required |
---|---|---|---|---|
New set of | Legacy | The following values were used. | New values will be used. | Customers using DHL-provided boxes should update their |
Rates API response | | | | Customers relying on this field should update parsing logic. |
Handling | | | | No action needed, but customers should expect this updated response format. |
Require no action from your end
These enhancements don't require any changes or actions from you. The API will continue to work as it did before, but the changes are either internal or will be handled automatically by the API itself. You will greatly benefit from the improvements without needing to modify your integration.
API enhancement | Details | Before | After | Action required |
---|---|---|---|---|
Include | DHL shipments will now always include additional shipment data for future improvements. | Not included in shipment requests. | Now includes | No |
Auto-apply | Paperless invoices will be enabled by default. Non-paperless-eligible shipments will still succeed with |
|
|
|
1. Domestic & EU to EU shipments |
|
| No impact on customer-facing API behavior or label output even though we make changes to our raw request to DHL. | No |
2. International shipments |
|
|
|
|
Case 1: Non-qualified shipments created with paperless_invoice |
| Label creation fails with error: | Label creation will now succeed without error. | No |
Case 2: Qualified shipments not created with paperless_invoice |
| Label shows ADI (Advance Data Included) | Label will show PLT (Paperless Trade) instead of non-PLT. | No |
Case 3: Qualified Shipments created with paperless_invoice |
|
| No impact. These shipments always succeeded as PLT. | No |
Case 4: Non-qualified shipments not created with paperless_invoice |
|
| No impact. These shipments will continue as non-PLT. | No |
Always get DHL commercial invoice | DHL-generated commercial invoices will always be used when requested. | API response varied and DHL commercial invoice was not always provided. | API response remains unchanged, but now will always retrieve the DHL commercial invoice. | No |
Show ** "Original Export Tracking ID" **on Returns commercial invoice | Returns invoices will display the original outbound tracking number if available. | | | No |
Trim | Extra spaces will be trimmed to prevent label failures. | Label creation fails if descriptions contain leading or trailing spaces. | Label creation will succeed after trimming spaces. | No |
Add Dangerous goods | | No | | No |
Apply | | | | No action needed, but providing |
Include rate results in Labels API response | Rate results will be returned in the Labels API response. | The response always displayed | The Labels API response will now include | No |
Trim address lines in Rates API request | Address fields exceeding 45 characters will be trimmed to prevent rate calculation failures. | Rate calculation fails if street1, street2, or street3 exceeds 45 characters. | Only the first 45 characters will be used to prevent failure. | No |
Rates API Response date format update | Date format now includes the organization’s time zone. | | | No |
Refer to DHL Express Troubleshooting Tips if you need more help on DHL Express.
Updated on: 07/04/2025