DHL Express - Validate Address
Description
Section titled “Description”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”.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | DHL Express credential (provider: dhl_express) |
| country_code | text | Yes | Country ISO code (default: ES) |
| postal_code | text | Yes | Postal code to validate |
| city_name | text | No | City name |
Credentials
Section titled “Credentials”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/).
Output
Section titled “Output”{ "success": true, "addresses": [ { "cityName": "Madrid", "countryCode": "ES", "postalCode": "28001" } ], "warnings": [], "message": "Direccion valida"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi_credencial_dhl", "country_code": "ES", "postal_code": "28001", "city_name": "Madrid"}API Used
Section titled “API Used”- Endpoint: GET
/address-validate - Base: DHL Express API (via helper
_dhlHelper) - Documentation: https://developer.dhl.com/api-reference/dhl-express-mydhl-api
- Useful for validating addresses before creating a shipment to avoid rejections
- The city is optional but improves validation accuracy
- The
warningsfield contains warnings about the provided address