1. Introduction
This document provides DHL customers with a clear guide for using the online API documentation, assisting you in efficiently utilizing DHL APIs to perform operations such as creating orders.
2. D-Connector System
The D-Connector is a key management platform where you can obtain the APP Key and App Secret required for authentication. Each customer's APP Key is unique; please keep it secure and confidential.
2.1 Access Path
The production environment URL for the D-Connector system is: https://dconnector.dhl.com/
2.2 D-connector Account Information
2.2.1 Test Account
Before applying for a production account, PI team<ecs.pi_support@dhl.com> will share the API credentials in the test environment, and you can use the following test account for integration and development:
Account for testing:
"pickupAccountId":"HKCYL001",
"soldToAccountId":"HKCYL001"
2.2.2 Production Account
After completing integration in the test environment, follow the process below to obtain a production account:
Application: Provide the email address to be used for registration to ecs.pi_support@dhl.com.
Processing: Account creation typically takes 1-2 business days. Please apply well in advance of your planned go-live date.
Activation & Maintenance: Once the account is created, the system will automatically send the account details. Per DHL IT security policy, users must log in to the D-Connector system at least once every 90 days to maintain account activity; the system will send a reminder email. To avoid order failures due to account lockout, please ensure timely login.
2.3 Viewing Authentication Credentials
After logging into D-Connector, navigate to Open API > Open API Info. This page displays your unique APP Key and APP Secret, which are essential credentials for calling all DHL APIs. Please store them securely.
The APP Key corresponds to the
client_idparameter in thetoken API.The APP Secret corresponds to the
client_secretparameter in thetoken API.Click Regenerate Secret to generate a new APP Secret (the APP Key remains unchanged).
3. API Documentation
3.1 API Documentation Downloading & API URL
API Documentation: https://strmysqlsbrprddconnector.blob.core.windows.net/publicresourcecontainer/SwaggerHub/customerV2.31.20260604.1.html
The Test and Production environments use different service addresses. Ensure you are using the correct Base URL for your environment. Customers must authenticate by calling the token API before you are authorized to call any other business endpoints.
token URL:
| Test environment URL | https://dconnector-test.dhl.com/api/dvt/open/api/v1/token |
|---|---|
| Production environment URL | https://dconnector.dhl.com/api/dvt/open/api/v1/token |
Order API Base URL:
| Test environment URL | https://dconnector-test.dhl.com/api/dvt/open/api/v1/****** |
|---|---|
| Production environment URL | https://dconnector.dhl.com/api/dvt/open/api/v1/****** |
Base URLs for Remaining Endpoints:
| Test environment URL | https://dconnector-test.dhl.com/api/open/api/v2/****** |
|---|---|
| Production environment URL | https://dconnector.dhl.com/api/open/api/v2/****** |
3.2 Viewing the API Structure
Using the Order API as an example:
Click on the API section (marked 1) to begin interactive editing.
View the API request example in the Example Value (marked 2).
Check the schema (marked 3) for field requirements (mandatory/optional), data types, and detailed descriptions.
3.3 Obtaining Authentication (Token)
Locate the
Token APIsection and click the expand button for the second API (marked 1).Click the "Try it out" button (marked 2) to enable editing.
In the parameters table, enter the APP Key (
client_id) and APP Secret (client_secret) obtained from D-Connector (marked 3).Click "Execute" (marked 4) to send the request and retrieve the token.
Copy the received token from the response body (marked 5).
6. From the "servers" dropdown list (marked as 6), select the desired request URL. For instance, when performing online tests, choose the test environment address: https://dconnector-test.dhl.com/api - DConnector TEST Environment.
7. After obtaining the token, click the "Authorize" button (marked as 7) . In the authorization dialog that appears, paste the retrieved token value into the designated field (If it's not a Swagger online test, typically in the format Bearer <your_token>) to complete global authentication.
3.4 Online Testing
Important Notice: Operations performed in the Production environment have real business consequences; proceed with extreme caution. All functional testing must be conducted in the Test environment.
Using the Order API as an example:
Click "Try it out" to begin editing.
2. In the "Edit Value" field, enter or modify test data according to the example format.
Note: The Swagger online editor does not support comments (// or /* */) within the request body. Including them will result in a request failure and error.
3. Click "Execute" to send the request.
4. Review the result in the "Server response" section.
————A 200 response indicates that the request was successful.
————If other codes are returned, it indicates that the request failed. Please refer to the returned message for corrections. If you have any questions about the returned message, please contact ecs.pi_support@dhl.com.