DHL Express - Get Rates
Description
Section titled “Description”This module queries the available shipping rates in DHL Express for a specific route and package. It receives the origin and destination coordinates (country, city, postal code) along with the weight and optionally the package dimensions. It makes a GET request to the /rates endpoint of DHL Express and processes the response to extract the product name, code, price, currency, estimated delivery date, and transit days. It also automatically identifies the cheapest rate among the available options.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | DHL Express credential (provider: dhl_express) |
| origin_country | text | Yes | Origin country ISO code (default: ES) |
| origin_city | text | Yes | Origin city |
| origin_postal | text | Yes | Origin postal code |
| dest_country | text | Yes | Destination country ISO code |
| dest_city | text | Yes | Destination city |
| dest_postal | text | Yes | Destination postal code |
| weight | text | Yes | Package weight in kilograms |
| length | text | No | Package length in centimeters |
| width | text | No | Package width in centimeters |
| height | text | No | Package height in centimeters |
Credentials
Section titled “Credentials”A dhl_express type credential is required with the following fields:
- api_key: DHL Express API Key
- account_number: DHL Express account number
Credentials are obtained from the DHL developer portal (https://developer.dhl.com/).
Output
Section titled “Output”{ "success": true, "rates": [ { "product_name": "EXPRESS WORLDWIDE", "product_code": "P", "local_product_code": "P", "price": "45.50", "currency": "EUR", "delivery_date": "2026-03-25T23:59:00", "transit_days": 2 } ], "rates_count": 3, "cheapest": { "product_name": "EXPRESS WORLDWIDE", "product_code": "P", "price": "45.50", "currency": "EUR" }, "message": "3 tarifas DHL Express obtenidas"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi_credencial_dhl", "origin_country": "ES", "origin_city": "Madrid", "origin_postal": "28001", "dest_country": "DE", "dest_city": "Berlin", "dest_postal": "10115", "weight": "2.5"}API Used
Section titled “API Used”- Endpoint: GET
/rates - Base: DHL Express API (via helper
_dhlHelper) - Documentation: https://developer.dhl.com/api-reference/dhl-express-mydhl-api
- Customs declaration is automatically determined by comparing the origin and destination countries
- Dimensions are optional; if any dimension is provided, all are included with metric units
- The
cheapestfield returns the cheapest rate by comparing prices numerically - Weight units are always metric (kg)