Skip to content

DHL Express - Validate Address

This module validates a shipping address using the DHL Express address validation service. It receives the country code, postal code, and optionally the city. It makes a GET request to the /address-validate endpoint with these parameters. It returns the found addresses and possible warnings. If valid addresses are found, it indicates “Valid address”; otherwise, “Address not found”.

ParameterTypeRequiredDescription
credentials_idcredentialsYesDHL Express credential (provider: dhl_express)
country_codetextYesCountry ISO code (default: ES)
postal_codetextYesPostal code to validate
city_nametextNoCity name

A dhl_express type credential is required with the following fields:

  • api_key: DHL Express API Key

Credentials are obtained from the DHL developer portal (https://developer.dhl.com/).

{
"success": true,
"addresses": [
{
"cityName": "Madrid",
"countryCode": "ES",
"postalCode": "28001"
}
],
"warnings": [],
"message": "Direccion valida"
}
{
"credentials_id": "mi_credencial_dhl",
"country_code": "ES",
"postal_code": "28001",
"city_name": "Madrid"
}
  • Useful for validating addresses before creating a shipment to avoid rejections
  • The city is optional but improves validation accuracy
  • The warnings field contains warnings about the provided address