DHL Express MyDHL API

Designed for developers, the MyDHL API integrates DHL Express shipping directly into your website and internal software, such as warehouse or order management systems. This connection helps streamline your existing workflows to optimize operations and support business growth.

Visit the DHL Express customer account request page if you are not yet a DHL Express customer, or if you already have a DHL Express account log in to the DHL API Developer Portal to get started.

DHL Express - MyDHL API Integration Requirements

Shipping Requirements

All shipments require both weight and dimensions.

Connection Requirements:

You must have an active account with DHL Express - MyDHL API.

The following properties are required to connect your account.

Property

Type

Required?

Description

dhl_shipper_number

string

Green checkmark. Supported feature. Yes.

Your DHL Shipper Account Number

api_key

string

Green checkmark. Supported feature. Yes.

Your DHL account API key

api_secret

string

Green checkmark. Supported feature. Yes.

Your DHL account API secret

Optional Connection Elements

The following properties are optional to add in the request when you connect your account.

Property

Type

Required?

Description

dhl_duties_taxes_number

string

Optional

Your DHL Duties Taxes Account Number

dhl_location_finder_api_key

string

Optional

Your DHL Location Finder API Key

go_green_plus

boolean

Optional

Select this option to default GoGreen Plus on all orders. Applies to International deliveries only.

use_my_own_commercial_invoice

boolean

Optional

Print my own commercial invoice rather than the DHL invoice (not eligible for paperless trade).

provide_commercial_invoice_outside_of_auctane

boolean

Optional

* Provide my own commercial invoice electronically to DHL outside of Auctane.

shipper_business_party_role_type

string

Optional

* * Business party type of the shipper.

return_label_validity_period

string

Optional

* * * Return Label/QR Code Validity Period

Property Descriptions

  • * use_my_own_commercial_invoice. Using this property, you agree, "I will ensure my commercial invoice is provided electronically to DHL to support paperless trade shipping. I understand that shipments cannot be transported without the commercial invoice being provided to DHL electronically, and where necessary, printed and affixed to the package for non-paperless trade shipments."

  • ** shipper_business_party_role_type. This information is used for international shipping and placed on the commercial invoice for compliant customs clearance. Allowed values are: businessdirect_consumergovernmentotherprivatereseller.

  • * * * return_label_validity_period. Defines the duration that return shipment data information is stored in the carrier’s systems and the return label or/and QR Code remains active and can be used. Allowed values are: 3 months6 months12 months24 monthsPTPUPVPW.

Connect a DHL Express MyDHL API Account to ShipStation

To connect your DHL Express MyDHL API account to ShipStation:

  1. Click the Add Carrier button.

    AddCarrier.png
  2. Select DHL Express MyDHL API and click Connect.

    You can type 'DHL Express MyDHL API' into the search bar also,

    dhl_express_mydhl_api_tile.png
  3. Enter your DHL Express MyDHL API

    DHL Shipper Account Number,

    API Key, and

    API Secret into the corresponding required fields.

    Optional: You may also enter your string values for

    dhl_duties_taxes_number,

    dhl_location_finder_api_key,

    shipper_business_party_role_type,

    return_label_validity_period

    and the Boolean values for

    go_green_plus,

    use_my_own_commercial_invoice, and

    provide_commercial_invoice_outside_of_auctane, although they are not required.

  4. Click Connect.

Available Features for DHL Express - MyDHL API Integration

The ShipStation integration with DHL Express - MyDHL API supports the following standard features and services:

Additional Features for DHL Express MyDHL API

The ShipStation integration with DHL Express MyDHL API allows for the following additional features:

Feature

Description

Contains Dry Ice

You can send shipments that contain dry ice. advanced_options.DryIce

Saturday Delivery

Saturday Delivery available: advanced_options.saturday_delivery

Duties Taxes Paid

advanced_options.duties_taxes_paid

Bill Duties to Sender

advanced_options.bill_duties_to_sender

Paperless Invoice

advanced_options.paperless_invoice

Direct Signature

advanced_options.DirectSignature

Delivery to Neighbour

advanced_options.delivery_to_neighbour

Windsor Framework Details

advanced_options.windsor_framework_details.movement_indicator

300 DPI label

advanced_options.label_300dpi

Label Branding

ShipStation supports Label Branding for this integration. You can enable it by following these steps:

  1. Upload Logo: Go to Settings > Store Setup, select the specific store, and open the Branding tab. Under General Branding Settings, upload a file to the Store Logo section.

  2. Enable Printing: Go to Settings > Printing Setup. In the label layout settings, locate the Label Branding section and check the box that reads, Print my store logos on my shipping labels.

The carrier can be used to create domestic shipping labels.

The carrier can be used to create international shipping labels.

ShipStation will submit international customs declarations electronically to the carrier.

The carrier can be used to create domestic return labels.

ShipStation will display estimated shipping rates for the carrier based on the connected account information and shipment details.

Shipment insurance, provided by the shipment's selected carrier, can be added to the shipment in ShipStation. This insurance would be in addition to any default coverage already provided by that carrier.

Shipping labels created for this carrier will include a tracking number that can be used to view the shipment status on the carrier's tracking website. Tracking may not be available for all shipping services.

ShipStation can close the day's shipments for the carrier and submit the manifest electronically. The End of Day process may be mandatory or optional, based on the carrier and your account with them. A printable file may or may not be available when submitted electronically - see End of Day (PDF).

ShipStation can close the day's shipments for the carrier and create a printable PDF of the manifest to provide to the carrier. The End of Day process may be mandatory or optional, based on the carrier and your account with them. The file may or may not be submitted electronically - see End of Day (Electronic).

ShipStation can print the store's logo on shipping labels created for this carrier. Label branding may not be available for all services supported by this carrier.

ShipStation can print information on the label as a label message (configure in Label Document Options). The carrier may or may not support all 3 label message fields and label messages may not be available for all services supported by this carrier.

This carrier can be used to create multi-package shipments, where multiple labels are created for a single shipment and the individual packages are linked together in a single shipment record with a master tracking number.

You can connect this carrier to ShipStation multiple times using different accounts and choose which account will be used to create each shipment.

Customs Declarations

DHL commercial invoices are available to download from the forms_download object in the label response.

  • Shipments to the UK need to have Freight Costs on the Commercial Invoice.

When you connect the carrier account to ShipStation API, you can select the option Use my own commercial invoice. The default integration behaviour is to apply Paperless Trade/Automated Digital Imaging (PLT/ADI) on all orders. By selecting this option, you can turn it off and use your own commercial invoice or a fully non-PLT flow.

Paperless Trade (PLT)

Paperless Trade (PLT) is the regulatory term used when a customs regime will accept either data or electronic images to perform the customs clearance. For PLT shipments, the shipper only needs to print the transport label. No customs paperwork needs to be printed and handed over to DHL.

Non-PLT countries require a physical hardcopy of the paperwork to be provided by the shipper and affixed to the package to ensure it was not altered or manipulated during transit. Wherever accepted, usage of the Paperless trade service is mandatory. There are a few scenarios where the shipment won’t be eligible for PLT, typically one of the following:

  • a) one of the countries in the origin/destination pair doesn’t support PLT, or

  • b) the declared value exceeds the maximum value allowed for one of the countries.

Automated Digital Imaging (ADI)

Automated Digital Imaging (ADI) is a benefit for Non-PLT shipments to reduce physical paperwork printing. DHL automatically stores the commercial invoice and waybill doc images and makes them available to authorized DHL staff globally. Therefore, to be compliant for non-PLT shipments, the shipper simply needs to print a copy of the commercial invoice and affix it to the sleeve on the package.

  • Use my own commercial invoice is not selected (OFF)

    Enter your Company Name. Use your Acumatica Tenant Name in this field.

    When Use my own commercial invoice is not selected (off), ShipStation API sends to the myDHL API a special service code WY** with bypassPLTError** feature on. It works for the following services only:

    DHL Express Worldwide (nondoc) - P,

    DHL Express 09:00 (nondoc) - E,

    DHL Express 12:00 (nondoc) - Y,

    DHL Economy Select (nondoc) - H,

    DHL Express 10:30 (nondoc) - M, and

    DHL Medical Express (nondoc) - Q

    The WY special service code denotes the shipment as PLT, and the availability of the invoice data and DHL-generated invoice meets the data and image validation criteria for PLT. No need to print anything other than the transport label for the package.

    **bypassPLTError - The default behavior of the DHL API is to return an error if PLT is requested but not available. The bypassPLTError feature will process the shipment successfully, convert the shipment from PLT to ADI, and return a warning message to print the customs paperwork as opposed to returning an error.

  • Use my own commercial invoice is selected (ON)

    When Use my own commercial invoice is selected (ON), then neither the WY special service code nor the bypassPLTError feature is used. The shipper will be on fully manual/non-PLT, and will need to physically print the commercial invoice and give the paperwork to the carrier. For this scenario, ShipEngine will request the waybill document on all shipments from myDHL API as well as the commercial invoice doc. Waybill Docs are required to print and give to the carrier, along with a hard copy of the commercial invoice for shipments that aren’t processed as PLT or ADI.

    For merchants who want to control which particular international shipments they apply a PLT solution to, use another configuration. Select the Use my own commercial invoice option and set the shipment parameter advanced_options.paperless_invoice to true. With this setup, only the shipment with this advanced option selected will be sent with the WY special service code. The bypassPLTError feature would not be applied. If the PLT is not available for a particular shipment, then you will receive an error from the carrier's API.

    To avoid violating the arrangements with the carrier, it is important to remember that the configuration of the ShipEngine/ShipStation/DM/MPM or any other internal generic commercial invoice document is not allowed for this integration.

  • Find more information on pages 20-24 of the carrier’s Solution Provider Companion Guide.

Shipping from Great Britain to Northern Ireland

DHL Express MyDHL API will support the B2B movement types for shipping from Great Britain to Northern Ireland, in accordance with the Windsor Framework.

To comply with the Windsor Framework, the following changes are required for the Non-Document shipment creation process.

  • Change the DHL product code in the request from N to 3.

  • Flag the shipment as being dutiable in the request.

  • Provide Invoice Line-Item data.

  • For B2B shipments sent on the Green lane, a UKIMS number with registration type code IMS is required in the registrationNumbers section of the API request.

  • For B2B shipments sent on the Red lane (and preferred for the Green lane), you are required to use paperless trade (PLT) to provide a copy of the invoice.

  • No changes are required for Document shipments.

For more information, see Implementing a DHL Integrated Solution: Windsor Framework Requirements with My DHL API.

Scheduling Pickups

DHL Express MyDHL API supports scheduling pickups, as well as Pickup canceling, with no cancellation fees.

When scheduling pickups:

  • The date should not be a past date or a date more than 10 days in the future.

  • The time is the local time of the shipment based on the shipper's time zone.

Return Services

During carrier account setup, merchants can select the Return Label/QR Code Validity Period. This setting determines how long return shipment data is stored and how long labels or QR codes remain active for use.

The allowed validity periods are:

  • 3 months

  • 6 months

  • 12 months

  • 24 months

The carrier offers a Label-free shipping feature where the driver prints the label upon pickup via a QR code. However, the carrier advises against this for high-volume shipments, as they will not print labels for large quantities.

Returns are only available with the following services:

  • DHL Express Domestic - N

  • DHL Economy Select (nondoc) - H

  • DHL Express Worldwide (nondoc) - P

  • DHL Economy Select EU - W

  • DHL Express Worldwide EU - U

Dangerous Goods - DHL Express MyDHL API

To send Dangerous Goods (DG) shipments with DHL Express MyDHL API, customers must have approval on their DHL Account Numbers. Approval is given for specific ServiceCodes/ContentIds (Contract sign off).

If merchants send DG shipments without having approval/contract, then those shipments will be stopped in the DHL facility.

See the ShipStation API Dangerous Goods page to learn which dangerous goods objects and properties you should use, about properties required by various carriers to indicate you are shipping dangerous goods (DG), and how to remain in compliance with the carrier's dangerous goods shipping requirements.

Create a Dangerous Goods Shipment

To create a DG shipment, the following DHL-specific values are required in the request: [DangerousGoods.ServiceCode] and [DangerousGoods.ContentId].

  • DHL customers will likely need to have logic to 'calculate' ContentId/ServiceCode - similar to the one available in ShipStation API.

  • Some specific use cases will also require a UN Number, Special Provision (CustomDescription), or DryIceNetWeight (DryIce).

For specific Request elements, see the DHL Express Dangerous Goods.pdf.

Notes about Dangerous Goods Shipments

The customer is responsible for the correct packaging of the shipment, including additional labels, stickers, and documents (as required by the Dangerous Goods regulations).

ShipStation API-implemented logic to calculate ContentID/ServiceCode is based on the DangerousGoods data provided in the request. Logic covers the vast majority of potential use cases. However, we are not able to calculate some ContentIds.

Any regulation changes (ADR/IATA) might trigger changes on the DHL side and consequently. ShipStation API logic to find/calculate ContentId/ServiceCode. In that case, additional Analyst/DEV work might be required to accommodate the new regulations.

DHL Express MyDHL API Integration Notes

  • The ShipStation integration with DHL Express MyDHL API does not support third-party billing.

  • Label Branding: This feature is available in ShipStation's integration with DHL Express MyDHL API.

  • Void Labels: DHL Express MyDHL API does not support voiding labels.

    There is no method to void a label on the carrier side. The internal voiding method is implemented. As per the carrier, the merchant can void the label at any time if it is not used.

    DHL Express bills a merchant for the label at the completion check-point (not at the 1st scan, not at label generation). There should be no consequences from the carrier for not using the label generated by their system.

  • Manifests: DHL Express MyDHL API does not require manifesting your shipments.

  • Multi-Package Labels: DHL Express MyDHL API supports creating multi-package shipments for all available services, except for the label-free shipping feature.

Troubleshooting Tips for the DHL Express MyDHL API Integration

Here are some common issues, potential causes, and troubleshooting tips.

Issue

How to Troubleshoot or Resolve

Warning message at label creation to print the customs paperwork

bypassPLTError - The default behavior of DHL’s API is to return an error if PLT is requested but not available. The bypassPLTError feature will process the shipment successfully, convert the shipment from PLT to ADI, and return a warning message to print the customs paperwork instead of returning an error. bypassPLTError=true is used as a default setup in the integration.

"warnings": "7988: Please note on printing the hardcopy of all the shipment paperwork and affix it to the package."

Automated Digital Imaging, or ADI, is a benefit for Non-PLT shipments to reduce physical paperwork printing. DHL automatically stores the commercial invoice and waybill doc images and makes them available to authorized DHL staff globally. Therefore, to be compliant for non-PLT shipments, the shipper simply needs to print a copy of the commercial invoice and affix it to the package sleeve.

The carrier can be used to create domestic shipping labels.

The carrier can be used to create international shipping labels.

ShipStation will submit international customs declarations electronically to the carrier.

The carrier can be used to create domestic return labels.

ShipStation will display estimated shipping rates for the carrier based on the connected account information and shipment details.

Shipment insurance, provided by the shipment's selected carrier, can be added to the shipment in ShipStation. This insurance would be in addition to any default coverage already provided by that carrier.

Shipping labels created for this carrier will include a tracking number that can be used to view the shipment status on the carrier's tracking website. Tracking may not be available for all shipping services.

ShipStation can close the day's shipments for the carrier and submit the manifest electronically. The End of Day process may be mandatory or optional, based on the carrier and your account with them. A printable file may or may not be available when submitted electronically - see End of Day (PDF).

ShipStation can close the day's shipments for the carrier and create a printable PDF of the manifest to provide to the carrier. The End of Day process may be mandatory or optional, based on the carrier and your account with them. The file may or may not be submitted electronically - see End of Day (Electronic).

ShipStation can print the store's logo on shipping labels created for this carrier. Label branding may not be available for all services supported by this carrier.

ShipStation can print information on the label as a label message (configure in Label Document Options). The carrier may or may not support all 3 label message fields and label messages may not be available for all services supported by this carrier.

This carrier can be used to create multi-package shipments, where multiple labels are created for a single shipment and the individual packages are linked together in a single shipment record with a master tracking number.

You can connect this carrier to ShipStation multiple times using different accounts and choose which account will be used to create each shipment.

Can’t find what you’re looking for?

Contact our technical support team.
Contact us
Was this article helpful?
0 out of 0 found this helpful