DHL eCommerce Solutions Americas
v 4.0.0
Division: DHL eCommerce Solutions

Best for:

  • Creating labels for domestic and international packages
  • Users with a DHL eCommerce Solutions Americas customer account
  • Only services within the United States and Canada
Region: United States, Canada
Used for: Shipping, Tracking
Overview

This site is a complete reference for DHL eCommerce Solutions Americas API (version 4), and also includes a free, ready-to-use Postman collection to get started quickly.

BY ACCESSING AND USING THE DHL ECOMMERCE AMERICAS API (THE "SITE"), YOU INDICATE YOUR ACKNOWLEDGEMENT AND ACCEPTANCE OF THESE LEGAL TERMS OF USE. IF YOU DO NOT AGREE WITH THESE LEGAL TERMS, YOU OR THE ENTITY YOU ARE AUTHORIZED TO REPRESENT (HEREINAFTER "YOU"/"YOUR") SHOULD NOT USE THE SITE. DHL ECOMMERCE AMERICAS MAY CHANGE, SUSPEND OR DISCONTINUE ANY ASPECT OF THE SITE AT ANY TIME, INCLUDING THE AVAILABILITY OF ANY FEATURE, DATABASE OR CONTENT. DHL ECOMMERCE MAY ALSO IMPOSE LIMITS ON CERTAIN FEATURES AND SERVICES AND/OR RESTRICT YOUR ACCESS TO PARTS OR ALL OF THE SITE WITHOUT NOTICE OR LIABILITY OF ANY KIND.

The DHL ECOMMERCE SOLUTIONS AMERICAS API is your one stop solution to get shipping products, calculating duty and tax, generating shipping labels, manifesting packages, requesting shipment pickup, tracking packages and generating return labels.

Overview image

The API can be used for:

  • Only DHLeC packages originating within United States and Canada
  • Domestic and international packages
  • All DHL eCommerce Solutions Americas shipping products

This documentation provides detailed information about the API structure and its use. You can also go directly to the following topics:

Also, information about each error code can be directly referenced by appending the error code to the following URL. For example:

https://api.dhlecs.com/docs/errors/400.0204003

The same error URLs are also returned in the APIs when there is an error response. This allows clients to quickly get detailed information on each type of error.

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 organization must have a customer account with DHL eCommerce Solutions Americas.

Example Use Cases

Simply Integrate in your existing website / solution

Easy integration into any eCommerce platform such as your Order Management System, Transportation Management System or an eCommerce website.

Merchants can use the API to get access to DHL Ecommerce Americas portfolio solution

Third Party Vendors (3PVs) and shipping aggregators can use the API to provide their customers with access to DHL ECommerce shipping solutions.

User Guide

Using this guide, you can learn how to:

Get Access

To use the DHL eCommerce Americas API, your organization requires to have an active customer account with DHL eCommerce.

I already have a DHL Express Account number, please contact your account manager to get your API credentials

If you are not a DHL eCommerce Americas customer, please visit our website to check our service offerings and how to became a customer.

Postman Collection

Postman is a collaboration platform for API development and testing. DHL eCommerce Solutions Americas' official Postman collection helps you download the complete API collection into your Postman work space and get started quickly on your integration.

You can download Postman here.

Click on "Run in Postman" button at the top of the page and select Postman for Windows if you're running a Windows PC. This will open Postman and download the complete collection under the name "DHL eCommerce Solutions Americas API".

This collection includes collection variables named clientId and clientSecret. Set these variable to values received from the on-boarding or implementations team so you can send API requests and get results in Postman. They may also provide you a different pickup number for testing, in which case you need to replace the 'pickup' collection variable.

See below for an illustration

collection password

The collection also contains beautiful illustrations of most API responses which allows to visualize the responses in a better way. This is built using the API Visualization feature in Postman.

Visualization image

Environments

Sandbox

The Sandbox environment is your test bed while you are exploring the APIs and for building and testing your integration. From an application standpoint, the Sandbox environment and the Production environment are like-for-like, which means you can expect them to work exactly the same way. However, there are a few key differences.

  • A label / manifest you created in the Sandbox environment won't be available in Production
  • List of pickups that your account has access to may vary between Sandbox and Production
  • List of API products that you have access to may vary between Sandbox and Production
  • Capacity of servers for processing Sandbox requests will be significantly lesser when compared to Production
  • Master data setup (Sold-To and Pick-up Account numbers, list of accessible distribution centers, content Category codes allowed) may be different between Sandbox and Production

While you can feel free to explore and test the APIs in the Sandbox environment, kindly work with your Client Success Manager / Implementation manager to ensure the master data setup has been completed before you decide to go live in Production.

To avoid any confusion, the Sandbox environment has it's own URL which is listed below.

There is no cost of using the Sandbox environment although requests can be throttled and/or blocked permanently if the system detects excessive or abusive usage patterns.

Following are the endpoints for the different environments.

Environment URL Remarks
Sandbox https://api-sandbox.dhlecs.com For customer exploration, integration and testing
Production https://api.dhlecs.com For production use only

Use the Sandbox as your test bed for experimenting with the API collection, for building your integration and testing your workflows. When you're ready, switch to production and you're ready to roll.

Rate Limits

To use the DHL eCommerce Solutions Americas API, you need to have an understanding of how we limit the number of requests that you can submit to one or more resources at a given point of time and over a period of time.This protects the web services from being overwhelmed with requests beyond their peak capacity and also protects against unwarranted distributed denial-of-service (DDoS) attacks on the system.

All of our APIs are rate-limited on two levels -

  • Number of requests you can submit in parallel for a single resource (Spike Arrest)
  • Number of requests you can submit over a period of time (1 day, 1 week etc.) for one or more resources (Quota Violation)

The first limit is to protect our resources against sudden traffic surges. This throttles the number of requests sent to the back end, protecting against performance lags and downtime.

The second limit is an outcome of a configuration on the number of request messages that a resource/group of resources allows over a period of time, which in our case is set to a per week basis. This can be different for each client, and is dependent on many factors. Kindly consult your Client Success / implementation manager if you have questions on what these limits are set to specific to your account.

What happens when your request is throttled?

You will receive a 429 error with an error response body that provides more information on if your request was denied due to a spike arrest or a quota violation. The detailed error codes between these two issues are also different.

If you're receiving this error and believe this is incorrect, please contact your implementations/account manager who will be able to verify your quota and increase it if necessary.

How to avoid throttling?

There are a few things you can do to avoid running into the issue of spike arrest or quota violations.

  • Know the limits for your account on both these dimensions
  • Spread out your requests so they are not submitted all at strike, rather spread out throughout the hour and day
  • Design your integration in a way where if your request is throttled, have a mechanism to queue them up and re-submit them later.
  • Take advantage of hours where there's usually less traffic, such as between 10 PM and 6 AM Eastern time.
Updates

Changes

The DHL eCommerce API v4 introduces a number of enhancements, fixes and new features aimed at improving the integration experience:

  • Improved availability, enabled by a behind-the-scenes technology refresh
  • Improved performance, with aggressive latency and throughput targets
  • New product finding and rating capabilities, for accurate up-front rate information
  • New estimated delivery date (EDD) functionality, for easier planning and decision-making
  • An updated end-of-day closeout and manifesting process, avoiding network timeouts and performance issues
  • Additional fields required by some countries in 2021 for cross-border shipments
  • Integration of the duty and tax calculator (DTC) as part of a unified API portfolio

Deprecation Schedule

Users of the DHL eCommerce v1, v2 and v3 APIs are encouraged to migrate as soon as possible. In particular, all international customers should migrate to v4 by January 2021 in order to remain compliant with upcoming cross-border regulatory requirements. Domestic customers on the older v1 API should also migrate by January 2021. Domestic-only customers on the v2 API should migrate by July 2021. All customers on the v3 API should migrate by May 28, 2021.

Deprecation Schedule

Error Codes

Error Code Nomenclature

The error code returned in the body of the error response is structured as follows:

Example: 400.0204002

400 - HTTP standard Error code. Also returned in the response header.

02 - refers to a specific service.

Following are the service specific codes.

  • 00 - Gateway-related errors AND errors returned by more than one API
  • 02 - Label
  • 03 - Tracking
  • 04 - Manifest
  • 06 - Product Finder
  • 09 - DTC
  • 10 - Transportation
  • 13 - Return Label

04 - indicates API version number. Currently, only 04 is in use. For generic errors, version number is 00 as this does not change between versions.

002 - refers to a serialized error number to make each error code unique. Refer below for the complete list of error codes.

Sample error response is shown here:

{
  "type": "https://api.dhlecs.com/errors/v4/400.0204001",
  "title": "Mandatory Query Parameter Missing",
  "invalidParams": [
    {
      "name": "format",
      "reason": "Label format is a required query parameter"
    }
  ]
}

invalidParams is an array that provides details on specific error fields and none, one or more errors can be returned. For generic errors, the invalidParams object will be omitted from the response. We recommend using the error type, error code and title to get help regarding the error.

Also, some error messages will not have the name element if the error is generic to the request rather than a specific element. However, the invalidParams object will be returned with just the reason in order to provide more detail on the error beyond what's described in the error title.

Information about each error code can be directly referenced by appending the error code to the URL. For example -

 https://api.dhlecs.com/docs/errors/400.0204003

The same error URLs are also returned in the API responses when there is an error. This allows clients to quickly get detailed information on each type of error.

Error Response

DHL eCommerce uses HTTP status codes for errors (e.g. 400, 401, 403). These error codes are explained in detail in the List of Error Codes section. Within each status code there are more specific error codes available in the body. All error responses use the following format:

M- Mandatory O- Optional C- Conditional N- Not Applicable

Node Data type Required Length Description Example Values
type string M 1:200 URL reference to the error. https://api.dhlecs.com/docs/errors/400.0204003
title string M 1:200 Title of the error. Static Validation Failed
invalidParams array O Array that contains details of invalid parameters in the request.
name string M 1:200 Name of the invalid parameter field. companyName
path string O 1:200 Path for the invalid parameter field. /package/consigneeAddress/companyName
reason string M 1:200 Reason why the field was invalid. Minimal allowed length of string is 1

General Error Codes

400

A 400 error code is returned when the server cannot or will not process the request due to a client error.

400.0000001

Mandatory query parameter(s) missing or invalid query parameter(s) present

The server cannot or will not process the request due to a client error. In this case, one or more mandatory query parameter name(s) were missing from the request or invalid query parameter name(s) were present.

Used in: POST Label, GET Label, GET Tracking

400.0000002

Query parameter value could not be found or is invalid.

The server cannot or will not process the request due to a client error. In this case, a query parameter value requested was not found in the database.

Used in: GET Label API

400.0000003

Invalid request

The server cannot or will not process the request due to a client error. In this case, a deceptive request was detected hence the request was denied.

Used in: All APIs

400.0000004

Invalid grant type

Invalid Grant type error occurs when the grant type header is not sent in the Auth request or an invalid value has been provided. We use OAuthV2 Basic Authentication that expects a grant_type of client_credentials to authenticate the credentials and provide an access token.

Used in: Access Token API

400.0000999

Unknown exception - bad request

The server cannot or will not process the request due to a client error. Unknown exception due to a bad request occurs when a request could not be processed due to an unexpected error encountered in the API service due to bad data. Unfortunately, additional information cannot be provided about the error in the response itself. Kindly contact support with a snapshot of the error request along with the Correlation ID (if you received one in the response header) and we will be able to assist you.

Used in: Label, Manifest, Tracking, Transportation, Product Finder, DTC API

404

The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

Just so you know, in a worst case scenario, you might see a generic version of this error that our service is completely down that we are not even able to return a proper error message.

{
  "fault" : {
    "faultstring" : "Unable to identify proxy for host: ecs and url: \/auth\/v4\/accesstoken",
    "detail" : {
      "errorcode" : "messaging.adaptors.http.flow.ApplicationNotFound"
    }
  }
}

404.0000001

Undefined resource

For example, under shipping/v4, the valid resources are /label and /manifest. If the gateway receives a request for any other resources beyond what is recognized, an undefined resource error is returned. This is also true when the request contains URI parameters before and/or after the accepted the resource names.

For example, /shipping/v4/label/print or something equivalent will also return this error.

Used in:
Access token, Label, Manifest, Tracking, Transportation, Product Finder, DTC APIs

500

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

500.0000001

Internal gateway authorization error

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. Internal Gateway Authorization error occurs when there is authorization failure between the API gateway and the backend services. This is not a client-side error and is not due to invalid credentials, token or pickup number provided.

Used in:
Label, Manifest, Tracking, Transportation, Product Finder, DTC API

500.0000002

Internal gateway server error

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. Internal Gateway Server error occurs when an unknown error has occurred in the API gateway or in the backend service or both.

This may/may not be a client-side error and will require further investigation before the cause of the error can be ascertained. Kindly contact support and provide a snapshot of the request along with the Correlation ID (if available) to get assistance.

Used in:
Access token, Label, Manifest, Tracking, Transportation, Product Finder, DTC API

500.0000999

Unknown exception - API service

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. Unknown Exception in the API service when when we run into a unhandled generic exception in the API service.

While this is completely rare, this may/may not be a client-side error and will require further investigation before the cause of the error can be ascertained. Kindly contact support and provide a snapshot of the request along with the Correlation ID (if available) to get assistance.

Used in:
Label, Manifest, Tracking, Transportation, Product Finder, DTC API

Label API Error Codes

400

400.0204002

The supported label formats are ZPL and PNG

This error occurs when an unsupported label format value is requested. The supported label formats are ZPL and PNG.

  • ZPL labelData is provided with an encodeType of PLAIN.
  • PNG labelData is provided with an encodeType of BASE64.

400.0204002

Static Validation Failed

The server cannot or will not process the request due to a client error. A static validation error occurs when the request could not be validated successfully against the underlying schema. This can be due to missing mandatory fields, incorrect field types used, invalid JSON request body, invalid enum field values sent and more.

More information about which field(s) failed validation are provided in the invalidParams object in the error response. Refer to the latest service schema for the specifications.

400.0204003

Dynamic Validation Failed

The server cannot or will not process the request due to a client error. A dynamic validation error occurs when the request could not be validated successfully against requirements that are specific to the attributes of the request, such as the Ordered Product ID, Country, Postal Code, Weight, Customs Details and many more. This can be due to missing field values, values above or below a certain threshold, values not in specified format and other reasons.

More information about which field(s) failed validation are provided in the invalidParams object in the error response. There are thousands of dynamic validation rules for different combinations of the above parameters.

404.0404003 - Manifest not found

This error will be returned when the manifest requestId is invalid for the specified pickup.

Used in:
Get Manifest API

404.1004001 - Data Validation Failed

Pickup Shipment does not exist for the given shipment identifier.

Used in:
PICKUP API

500.0204001 - Unknown downstream error

Unknown downstream error occurs when there's an unexpected, unknown exception between the internal DHL systems, such as between the API services and the Domestic/International package processing systems.

This may/may not be a client-side error and will require further investigation before the cause of the error can be ascertained. Kindly contact support and provide a snapshot of the request along with the Correlation ID (if available) to get assistance.

Used in:
Label API

500.0604001 - 500.0604025 - Internal Server Error

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable or relevant for the client. This can be due to a number of internal errors that are masked from the client hence there's a range of error codes possible from 001 to 025.

Used in:
Product Finder API

500.1304001 - 500.1304025 - Internal Server Error

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable or relevant for the client. This can be due to a number of internal errors that are masked from the client hence there's a range of error codes possible from 001 to 025.

Used in:
Return Label API

References

Product References

Domestic Products

Product ID Product Name(s) Notes
EXP DHL Parcel Expedited, DHL Parcel Plus Expedited
MAX DHL Parcel Expedited Max
GND DHL Parcel Ground, DHL Parcel Plus Ground
BEX DHL BPM Expedited No rates from API
BGN DHL BPM Ground No rates from API

International Products

Product ID Product Name Notes
PLT DHL Parcel International Direct
PLY DHL Parcel International Standard
PKY DHL Packet International
PIY DHL Parcel International Direct Priority CA to US only
PID DHL Parcel International Direct Standard CA to US only

Return Products

Product ID Product Name(s) Notes
RGN DHL SmartMail Parcel Return Ground No rates from API
RPL DHL SmartMail Parcel Return Plus No rates from API
RLT DHL SmartMail Parcel Return Light No rates from API

Regulations

International Regulations

PLT NON PLT
Consignee phone number Required for Japan, Israel, South Korea, & Mexico; recommended for other countries in case contact is needed Recommended for all countries in case contact is needed
Consignee email address Required for Japan; recommended for other countries in case contact is needed Recommended for all countries in case contact is needed
Consignee state Required for Canada, Australia and Israel Required for Canada, Australia and Israel
Consignee ID/ID type Not required Not required
Consignee taxID/taxID type Recommended for Israel & South Korea. If not provided, it will cause delays at customs as our delivery partner will attempt to contact the consignee via phone/email and hold the package until Tax ID is collected Recommended for Brazil and Indonesia. Failure to provide an ID number may result in a hold or rejection in customs
Shipper phone number Recommended for all countries in case contact is needed Recommended for all countries in case contact is needed
Shipper email address Recommended for all countries in case contact is needed Recommended for all countries in case contact is needed
Shipper taxID/taxID type Recommended depending on annual revenue and order value to UK, European Union, Australia, Germany & New Zealand Recommended depending on annual revenue and order value to UK, European Union, Australia, New Zealand, Germany, Switzerland & Norway
HS code Not required Strongly recommended for all EU countries; will be required and enforced by DHL eCS once the destination EU countries start enforcing the requirement (any time after July 1, 2021). For Ireland; 10-digit HS/TARIC code is strongly recommended to avoid customs clearance issues at destination
Duties paid May be true (DDP) or may be false (DDU) Must be false (DDU)

Updated October 8, 2021

Additional Information

Distribution Centers

Facility Code Location
USATL1 Forest Park, GA
USBOS1 Franklin, MA
USBWI1 Elkridge, MD
USCAK1 Stow, OH
USCVG1 Hebron, KY
USDEN1 Denver, CO
USDFW1 Grand Prairie, TX
USEWR1 Secaucus, NJ
USLAX1 Compton, CA
USMCO1 Orlando, FL
USMEM1 Memphis, TN
USORD1 Melrose Park, IL
USPHX1 Phoenix, AZ
USRDU1 Raleigh, NC
USSEA1 Auburn, WA
USSFO1 Union City, CA
USSLC1 Salt Lake City, UT
USSTL1 St. Louis, MO
USIAH1 Houston, TX
USISP1 Edgewood, NY
CNYYZ1 Mississauga, ON, CA
GBLHR1 Axis Park, Langley, GB

Service Endorsements

Service Endorsement Value
1 Address Service Requested
2 Forwarding Service Requested
3 Change Service Requested
4 Return Service Requested

Content Categories

The following represents the supported DG codes for use with our domestic products.

Category Code Description Max. Weight Valid Products
01 Lithium Metal / Alloy Batteries Contained in Equipment 11 lbs GND, EXP
02 Lithium Metal / Alloy Batteries Packed with Equipment 11 lbs GND
03 Lithium Metal / Alloy Batteries Stand-Alone 5 lbs GND
04 Lithium-ion or Lithium Polymer Batteries Contained in Equipment 11 lbs GND, EXP
05 Lithium-ion or Lithium Polymer Batteries with Equipment 11 lbs GND
06 Lithium-ion or Lithium Polymer Batteries Stand-Alone 5 lbs GND
08 Limited Quantity / ORM-D 25 lbs GND
09 Small Quantity Provision 25 lbs GND

The following represents the supported DG codes for use with our international products.

Products Category Code Description Max. Weight Restrictions
PLY 01 Lithium Metal / Alloy Batteries Contained in Equipment 4.4 lbs Canada Only
PLT 01 Lithium Metal / Alloy Batteries Contained in Equipment 11 lbs Canada Only
PLT 02 Lithium Metal / Alloy Batteries Packed with Equipment 11 lbs Canada Only
PLT 03 Lithium Metal / Alloy Batteries Stand Alone 5 lbs Canada Only
PLY 04 Lithium-ion or Lithium Polymer Batteries Contained in Equipment 4.4 lbs Canada Only
PLT 04 Lithium-ion or Lithium Polymer Batteries Contained in Equipment 11 lbs Canada Only
PLT 05 Lithium-ion or Lithium Polymer Batteries Packed with Equipment 11 lbs Canada Only
PLT 06 Lithium-ion or Lithium Polymer Batteries Stand Alone 5 lbs Canada Only
PLT 40 Limited quantities 25 lbs Canada Only

Consignee ID Types

Identification Type Value
National ID Number 1
Military Number 2
Passport Number 3
Other 4

Tax ID Types

Tax ID Type Description Region / Country
0 Other / Unknown Any
1 GST / VAT Any
2 EORI EU
3 IOSS EU
5 PAN IN

Weight Units

Weight Unit Of Measure Description
LB pounds
OZ ounces
KG kilograms
G grams

DTC API supports unit of measures different from this list. Please refer to the specifications for details.

Dimension Units

Dimension Unit Of Measure Description
IN inches
CM centimeters

DTC API supports unit of measures different from this list. Please refer to the specifications for details.

Service

Service Description
omitted If the service attribute is omitted, a default value is used. The default value for domestic shipments is usually DELCON except in the case of Marketing Parcel where the default value is no service.
DELCON Most shipments originating and destined to the United States will default to DELCON. Delivery confirmation is free for domestic shipments except for Marketing Parcels which will incur additional surcharges.
SIGCON Signature confirmation is also available for certain domestic products at an additional cost. SIGCON is not supported for International Products. Please contact your Sales representative for more details.

User Agents

Technology partners who provide API integration services to multiple merchants are required to send their partner registration ID and software name in the User-Agent HTTP request header of all API requests.

Merchants who integrate directly with DHLeCS are not assigned a registration ID and do not need to send a custom User-Agent HTTP request header.

The registration ID is a 6-character alphanumeric value assigned by DHL eCommerce. The software name is chosen by the technology partner and can be any value, up to a length of 50 characters.

Within the User-Agent HTTP request header, the two elements should be separated by a single space character:

User-Agent: <REGISTRATION_ID> <SOFTWARE_NAME>

Example:

User-Agent: ABC123 ShipMaster Pro

If you have any questions about the technology partner identification scheme, please reach out to your solutions partner manager.

Country Specific Resources

Canadian Provinces

Province Province Code
ALBERTA AB
BRITISH COLUMBIA BC
MANITOBA MB
NEW BRUNSWICK NB
NEWFOUNDLNAD AND LABRADOR NL
NORTHWEST TERRITORIES NT
NOVA SCOTIA NS
NUNAVUT NU
ONTARIO ON
PRINCE EDWARD ISLAND PE
QUEBEC QC
SASKATCHEWAN SK
YUKON YT

Brazilian States

State State Code
ACRE AC
ALAGOAS AL
AMAZONAS AM
AMAPÁ AP
BAHIA BA
CEARÁ CE
DISTRITO FEDERAL DF
ESPÍRITO SANTO ES
GOIÁS GO
MARANHÃO MA
MINAS GERAIS MG
MATO GROSSO DO SUL MS
MATO GROSSO MT
PARÁ PA
PARAÍBA PB
PERNAMBUCO PE
PIAUÍ PI
PARANÁ PR
RIO DE JANEIRO RJ
RIO GRANDE DO NORTE RN
RONDÔNIA RO
RORAIMA RR
RIO GRANDE DO SUL RS
SANTA CATARINA SC
SERGIPE SE
SÃO PAULO SP
TOCANTINS TO

Duty & Tax Supported Countries & Currencies

Country Code World Atlas Country Name Currency Code
AD Andorra EUR
AE United Arab Emirates AED
AF Afghanistan AFN
AG Antigua and Barbuda XCD
AI Anguilla XCD
AL Albania ALL
AM Armenia AMD
AO Angola AOA
AR Argentina ARS
AS American Samoa USD
AT Austria EUR
AU Australia AUD
AW Aruba AWG
AX Aland Islands EUR
AZ Azerbaijan AZN
BA Bosnia and Herzegovina BAM
BB Barbados BBD
BD Bangladesh BDT
BE Belgium EUR
BF Burkina Faso XOF
BG Bulgaria BGN
BH Bahrain BHD
BI Burundi BIF
BJ Benin XOF
BL Saint Barthélemy EUR
BM Bermuda BMD
BN Brunei Darussalam BND
BO Bolivia BOB
BQ Caribbean Netherlands USD
BR Brazil BRL
BS Bahamas BSD
BT Bhutan BTN
BW Botswana BWP
BY Belarus BYN
BZ Belize BZD
CA Canada CAD
CD Democratic Republic of the Congo CDF
CF Central African Republic XAF
CG Congo XAF
CH Switzerland CHF
CI Cote d'Ivoire XOF
CK Cook Islands NZD
CL Chile CLF
CM Cameroon XAF
CN China CNY
CO Colombia COP
CR Costa Rica CRC
CV Cape Verde CVE
CW Curacao ANG
CY Cyprus EUR
CZ Czech Republic CZK
DE Germany EUR
DJ Djibouti DJF
DK Denmark DKK
DM Dominica XCD
DO Dominican Republic DOP
DZ Algeria DZD
EC Ecuador USD
EE Estonia EUR
EG Egypt EGP
ER Eritrea ERN
ES Spain EUR
ET Ethiopia ETB
FI Finland EUR
FJ Fiji FJD
FO Faroe Islands DKK
FR France EUR
GA Gabon XAF
GB United Kingdom GBP
GD Grenada XCD
GE Georgia GEL
GF French Guiana EUR
GG Guernsey GBP
GH Ghana GHS
GI Gibraltar GIP
GL Greenland DKK
GM Gambia GMD
GP Guadeloupe EUR
GQ Equatorial Guinea XAF
GR Greece EUR
GT Guatemala GTQ
GU Guam USD
GW Guinea-Bissau XOF
GY Guyana GYD
HK Hong Kong HKD
HN Honduras HNL
HR Croatia HRK
HT Haiti HTG
HU Hungary HUF
IC Canary Islands EUR
ID Indonesia IDR
IE Ireland EUR
IL Israel ILS
IM Isle of Man GBP
IN India INR
IQ Iraq IQD
IS Iceland ISK
IT Italy EUR
JE Jersey GBP
JM Jamaica JMD
JO Jordan JOD
JP Japan JPY
KE Kenya KES
KG Kyrgyzstan KGS
KH Cambodia KHR
KI Kiribati AUD
KM Comoros KMF
KN Saint Kitts and Nevis XCD
KR Korea, Republic of KRW
KV Kosovo EUR
KW Kuwait KWD
KY Cayman Islands KYD
KZ Kazakhstan KZT
LA Lao People's Democratic Republic LAK
LB Lebanon LBP
LC Saint Lucia XCD
LI Liechtenstein CHF
LK Sri Lanka LKR
LR Liberia LRD
LS Lesotho LSL
LT Lithuania EUR
LU Luxembourg EUR
LV Latvia EUR
LY Libyan Arab Jamahiriya LYD
MA Morocco MAD
MC Monaco EUR
MD Moldova MDL
ME Montenegro EUR
MF Saint Martin (French part) EUR
MG Madagascar MGA
MK Macedonia,the Former Yugoslav Republic of MKD
ML Mali XOF
MM Myanmar MMK
MN Mongolia MNT
MO Macao MOP
MQ Martinique EUR
MS Montserrat XCD
MT Malta EUR
MR Mauritania MRU
MU Mauritius MUR
MV Maldives MVR
MW Malawi MWK
MX Mexico MXN
MY Malaysia MYR
MZ Mozambique MZN
NA Namibia NAD
NC New Caledonia XPF
NE Niger XOF
NG Nigeria NGN
NI Nicaragua NIO
NL Netherlands EUR
NO Norway NOK
NP Nepal NPR
NR Nauru AUD
NZ New Zealand NZD
OM Oman OMR
PA Panama PAB
PE Peru PEN
PF French Polynesia XPF
PG Papua New Guinea PGK
PH Philippines PHP
PK Pakistan PKR
PL Poland PLN
PM Saint Pierre and Miquelon EUR
PR Puerto Rico USD
PS Palestine ILS
PT Portugal EUR
PW Palau USD
PY Paraguay PYG
QA Qatar QAR
RE Reunion EUR
RO Romania RON
RS Serbia RSD
RU Russian Federation RUB
RW Rwanda RWF
SA Saudi Arabia SAR
SB Solomon Islands SBD
SC Seychelles SCR
SE Sweden SEK
SG Singapore SGD
SI Slovenia EUR
SK Slovakia EUR
SL Sierra Leone SLL
SM San Marino EUR
SN Senegal XOF
SR Suriname SRD
SS South Sudan SSP
ST Sao Tome and Principe STN
SV El Salvador USD
SZ Swaziland SZL
TC Turks and Caicos Islands USD
TD Chad XAF
TF The French Southern and Antarctic Lands EUR
TG Togo XOF
TH Thailand THB
TJ Tajikistan TJS
TL Timor-Leste USD
TM Turkmenistan TMT
TN Tunisia TND
TO Tonga TOP
TR Turkey TRY
TT Trinidad and Tobago TTD
TW Taiwan TWD
TZ United Republic of Tanzania TZS
UA Ukraine UAH
UG Uganda UGX
US United States USD
UY Uruguay UYU
UZ Uzbekistan UZS
VC Saint Vincent and the Grenadines XCD
VE Venezuela VEF
VG British Virgin Islands USD
VI US Virgin Islands USD
VN Viet Nam VND
VU Vanuatu VUV
WF Wallis and Futuna XPF
YT Mayotte EUR
ZA South Africa ZAR
ZM Zambia ZMW
ZW Zimbabwe ZWL

International Destinations Not Serviced

Product Country Postal Code Comments
All American Samoa, Guam, Marshall Islands, Micronesia, Northern Mariana Islands, Palau, Puerto Rico, U.S. Minor Outlying Islands, U.S. Virgin Islands All These destinations are an overseas territory of the United States. As such, shipments are designated as a Domestic shipment rather than International. Please use DHL eCommerce Solutions Domestic services for these locations. Goods received by DHL eCommerce Solutions International services will be returned to the customer.
All Crimea Region, Somalia, Yemen All Temporary blocks are currently in place. DHL eCommerce Solutions cannot organize safe transportation due to ongoing conflicts within the region. Goods received by DHL eCommerce Solutions International services will be returned to the customer.
All Cuba, Iran, North Korea, Sudan, Syria All Due to U.S. Government trade embargos, DHL eCommerce Solutions does not currently provide service to these countries. Goods received by DHL eCommerce Solutions International services will be returned to the customer.
PLT,PKY,PKT Estonia 96001-96245, 96300-96327
PLT France 971XX-976XX, 984XX-988XX
PLT Spain 07XXX, 35XXX, 38XXX, 51XXX, 52XXX

Updated October 8, 2021

Glossary

Identifiers

packageId

Customer-provided package ID, also known as the CCN (customer confirmation number) or the GM number.

Example: GM60511234500000001

dhlPackageId

DHL-generated package ID. This value is generated differently for domestic and international packages (domestic: mail identifier; international: TMUID).

Example: 3387191106122423

trackingId

Last-mile carrier package ID. For international shipments, this ID is only available after the package has been shipped. For domestic shipments, this ID contains the full USPS IMpb number and is always available. If the package is overlabeled for any reason, this field contains the latest carrier package ID.

Example: 420071149361269903500011492028

deliveryConfirmationNumber

For domestic shipments, this is the USPS tracking number, which is part of the IMpb number and is also sometimes referred to as the PIC (package identification code). If the package is overlabeled for any reason, this field contains the latest USPS tracking number. For international shipments, this field contains the last-mile carrier package ID (same value as the trackingId field) and is only available after the package has been shipped.

Example: 9361269903500011492028

overlabeledDspNumber

For domestic shipments which have been overlabeled, this is the original USPS tracking number. The USPS tracking number is part of the IMpb number and is also sometimes referred to as the PIC (package identification code). For international shipments and non-overlabeled domestic shipments, this field is unused.

Example: 9261269903500013618305

intelligentMailBarcode

For domestic flats shipments, this is the USPS IMb number. If the package is overlabeled for any reason, this field contains the latest IMb number. For international shipments and non-flats domestic shipments, this field is unused.

Example: 0031043534391627906195625053434

overlabeledIntelligentMailBarcode

For domestic flats shipments which have been overlabeled, this is the original USPS IMb number. For international shipments and non-overlabeled / non-flats domestic shipments, this field is unused.

Example: 0031043534391640211895625057522

manifestId

Unique identifier for each manifest created in the DHL system. This is returned in the Get Manifest API where each manifest will have the manifestId as the unique reference. This will also be barcoded and printed on the Driver Summary Manifest (DSM).

Example: 532903701308165834461

requestId

Unique identifier for each manifest request that was submitted to the DHL system. This is used to download and print the manifests later using the Get Manifest API. A single requestId can result in multiple manifestId when there's more than one manifest being generated for the request.

Example: bae87627-3566-4670-b8d2-fe90bfed75a9

Conventions

Package

The smallest unit in shipping is an Article / Piece / Item / Package / Parcel. These words are often used interchangeably. For the purposes of this API documentation, we use the term Package everywhere.

Shipment

The next higher unit is called a Shipment. This means one or more Packages going to the same destination (end consumer). A group of Packages is called a Shipment.

All of our shipping products support only 1 package per shipment hence we use the term Package and Shipment sometimes interchageably.

Manifest

Also called a BOL / Bill of Lading / Consignment note / handover document / DSM / closeout document / DMF, a Manifest is a set of packages grouped by some common characteristic, such as those bound to the same distribution center after pickup, same shipping product, shipping class (domestic or international) etc. For example, all Domestic packages bound to a single distribution center will go into a first manifest, X-border packages bound to a single distribution center will go into a second manifest, Domestic packages bound to another distribution center will go into a third manifest etc. Sometimes, a new manifest can be created also because of technical limitations on maximum number of packages that can be successfully processed in a single manifest request.

Order

When one or more Manifests are picked up from the same origin (pickup location), it's called an Order. An Order can contain Domestic and X-border packages and can go to one or more Distribution facilities. It is simply a pickup load.

Container

A Container is a physical unit to carry a group of Packages, Manifests or Orders. A Container should contain at least one Package. A Container can contain less than 1 manifest, 1 manifest or more than 1 manifest. A Container can contain less than 1 Order or 1 order.

De minimis

A customs duty de minimis value (or VAT de minimis value) is the minimum threshold which an imported good's value most exceed in order to incur customs (or VAT) charges

Other

  • AMP - Advanced Mail Processing
  • ESM - Electronic Shipment Manifest
  • DSM - Driver Summary Manifest
  • DMF - Domestic Manifest File
  • RSF - Return Shipment File
  • STC - Service Type Code
  • API - Application Programming Interface
  • EOD - End Of Day
  • Connect - X-border shipment processing system
  • NewOps - Domestic Shipment processing system
  • IMpb - Intelligent Mail package barcode
  • SSF - USPS Shipping Services File
  • BOL - Bill Of Lading
  • DELCON - Delivery Confirmation Number
  • FTP / SFTP - Secure File Transfer Protocol
Legal Terms

SPECIFICS FOR THE USE OF DHL ECOMMERCE AMERICAS API

To register for the use of and/or access to DHL eCommerce Solutions' Americas API and the underlying API Services (label, manifest, tracking) - hereinafter referred to as DHL eCommerce Solutions Americas API - you and/or the entity you are authorized to represent (hereinafter "You"/"Your") need to have an account with and/or have entered into a Customer Services Agreement with Global Mail, Inc. dba DHL eCommerce Solutions. 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 access to and/or usage of the DHL eCommerce Solutions Americas API.

These Legal Terms and the General Developer Portal Terms of Use govern your usage of and/or access to the DHL eCommerce Solutions Americas API including the API Services and, unless otherwise stated herein, do not replace and/or modify any other DHL eCommerce Solutions terms and conditions of Carriage, Customer Services Agreements and/or any other agreements, contracts or SOWs with DHL eCommerce Solutions 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 eCommerce Solutions Americas API 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/access to the DHL eCommerce Solutions Americas API by You, in which case the specific terms and conditions of the Agreement shall prevail with respect to Your use of/access to the DHL eCommerce Solutions Americas API.

You shall use the services and/or data that You receive via the DHL eCommerce Solutions Americas API only for the legitimate contractual purposes and only in connection with DHL eCommerce Solutions' carriage services. DHL eCommerce may revise and update these Legal Terms at any time. Your continued usage of the Site after any changes to these Legal Terms will mean You accept those changes.

The following prerequisites and/or restrictions apply for the usage of data or information received via the DHL eCommerce Solutions Americas API:

Product Finder

DHL eCommerce Americas Product Finder API enables clients to determine which DHL shipping products are suitable for a given shipping request including estimated rates and estimated delivery dates (EDD). The rates returned are account-specific along with a list of applicable surcharges (if any). The DHL Product Finder API covers most DHL eCommerce Americas shipping products, both Domestic and International.

At this time, dimensions and dimensional weight are not considered when estimating rates.

PLEASE NOTE: The rates and delivery dates provided by the Product Finder are estimates only and may not reflect the actual billed rates or delivery times. The accuracy of the rate information depends on a number of factors, including the accuracy of Your input.

Label

The API Service "label" provides You with the possibility to create and download labels for singular shipments. Please note that the creating and/or downloading of a label does not constitute the contract of carriage. Such contract will be concluded once the labeled package is handed over or picked up and accordingly accepted by DHL eCommerce Solutions.

Manifest

The API Service "manifest" provides You with the possibility to select single items/packages for manifest (via package ID), to generate a Driver's Summary Manifest (DSM) as a pdf-file and download/print the DSM when required in order to facilitate handover of the DSM to the driver at the time of pickup.

It is in Your sole responsibility to select the correct (number of) packages for manifest and to check whether all relevant packages have been included to the manifest.

Tracking

Data requested and received via the DHL eCommerce Solutions Americas API, such as transport status, estimated delivery date, is hereinafter referred to as "Tracking Data".

Tracking Data is Confidential Information in the meaning of section "Communication" of the General Developer Portal Terms of Use. Other than set forth below You must not reveal and/or provide third parties with the Tracking Data and/or analyze, modify such data in any form and/or derive data/information especially for competitive purposes from it without DHL eCommerce Solutions' prior written consent.

You may only submit Tracking Data provided to You via the DHL eCommerce Solutions Americas API to the recipient of the packages and no other person. Such submission shall always be in compliance with applicable laws and regulations, including without limitation data protection laws and competition/antitrust law. Without limiting any of the foregoing, You shall ensure that the data shall not be combined with an advertisement or presented in a way that it could be regarded as advertisement.

If You are neither the Shipper nor the recipient of packages the Tracking Data refers to, the following applies additionally. You represent and warrant that:

  • You are duly authorized to act on behalf of the Shipper;
  • You shall make the Shipper aware of the restrictions set out in these Legal Terms and the General Developer Portal Terms of Use;
  • You shall make the Shipper aware of the necessity to inform the recipient about the processing of his/her personal data according to applicable data protection laws.

Unless otherwise agreed, You shall delete the Tracking Data (including the transport history) 90 days after the delivery is completed. DHL eCommerce Solutions shall not be required to provide Tracking Data to You that is older than 90 days from the delivery date.

4.0.0
17.Feb.2020
  • Initial Release