Get started
The DHL carrier account connection process validates your credentials and ensures your account is properly configured to retrieve rates and generate shipping labels. When you connect your DHL account, Zonos performs a test rating call to verify the connection is working correctly before storing your credentials.
To register with DHL Express or set up through your Zonos Dashboard, follow the steps in this guide.
How DHL carrier account connection works
Connecting your DHL carrier account:
- Validates that you've provided the correct credential types for DHL
- Makes a live rating call to the DHL API to confirm the credentials are valid
- Stores your connected account in Zonos for future shipment rating and label creation
- Returns the connected account details, including your DHL account information and rate type
Once connected, your DHL carrier account can be used to get real-time shipping rates based on your negotiated rates (if applicable) and create DHL shipping labels.
Connect your DHL account
Use the carrierAccountConnect mutation to connect your DHL carrier account with your credentials.
Mutation
Use this mutation to connect your DHL carrier account and validate your credentials.
MUTATION
GraphQL
mutation CarrierAccountConnect($input: CarrierAccountConnectInput!) {
carrierAccountConnect(input: $input) {
errors
carrierAccount {
credentialProvider
id
integrationType
organization
rateType
carrier {
id
code
name
}
credentials {
type
value
}
}
}
}
Variables
The mutation requires the DHL carrier code, rate type, and your DHL account credentials.
VARIABLES
json
{
"input": {
"carrierCode": "DHL",
"rateType": "NEGOTIATED",
"credentials": [
{
"type": "API_KEY",
"value": "actual_api_key_value"
},
{
"type": "API_PASSWORD",
"value": "actual_api_password_value"
},
{
"type": "ACCOUNT_NUMBER",
"value": "actual_account_number_value"
}
]
}
}
DHL requires the following credential types:
API_KEY- Your DHL API keyAPI_PASSWORD- Your DHL API passwordACCOUNT_NUMBER- Your DHL account number
You can find these credentials in your DHL account portal or by contacting your DHL account representative.
Response examples
Successful connection
When credentials are valid and DHL returns rates successfully:
RESPONSE
json
{
"data": {
"carrierAccountConnect": {
"errors": [],
"carrierAccount": {
"credentialProvider": "ORGANIZATION",
"id": "carrier_account_123",
"integrationType": "REST",
"organization": "organization_id",
"rateType": "NEGOTIATED",
"carrier": {
"id": "carrier_123",
"code": "dhl",
"name": "DHL"
},
"credentials": [
{
"type": "API_KEY",
"value": "actual_api_key_value"
},
{
"type": "API_PASSWORD",
"value": "actual_api_password_value"
},
{
"type": "ACCOUNT_NUMBER",
"value": "actual_account_number_value"
}
]
}
}
}
}
Error: Unsupported credential type
If you provide a credential type that DHL doesn't support:
ERROR
json
{
"data": {
"carrierAccountConnect": {
"errors": ["Credential type SITE_ID is not supported by carrier DHL"],
"carrierAccount": null
}
}
}
Error: Invalid credentials
If the credentials are valid types but don't authenticate successfully with DHL:
ERROR
json
{
"data": {
"carrierAccountConnect": {
"errors": ["Failed to get rating from DHL API"],
"carrierAccount": null
}
}
}
What happens after connection
Once your DHL carrier account is successfully connected:
- The account is stored in your organization and linked to your credentials
- You can retrieve DHL shipping rates using your negotiated rates (when applicable)
- You can create DHL shipping labels through the Zonos API
- The carrier account can be used across multiple shipments without reconnecting
Next steps
After connecting your DHL carrier account:
- Create a shipment - Generate shipping labels using your connected DHL carrier account
- Calculate landed cost - Get accurate duty and tax calculations for international shipments
- View supported carriers - See all carriers and service levels available through Zonos
Connect DHL Carrier Account
Securely connect your DHL carrier account to access negotiated shipping rates and create labels directly through Zonos.