> ## Documentation Index
> Fetch the complete documentation index at: https://docs.condotta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DHL Express Connector (MyDHL API): Rates, Labels, Tracking

> Connect DHL Express to your workflows through the MyDHL API: quote rates, create shipments and labels, schedule pickups and track parcels, with no code.

The DHL Express connector lets your workflows quote rates, create shipments and labels, track parcels, and manage pickups through the [MyDHL API](https://developer.dhl.com/api-reference/dhl-express-mydhl-api).

> [!NOTE]
>
> For the full API reference, see the [DHL Express MyDHL API documentation](https://developer.dhl.com/api-reference/dhl-express-mydhl-api).

> [!NOTE]
>
> This connector requires a **connection** with valid credentials before it can be used in a workflow. See [Managing Connections](https://docs.condotta.ai/platform/connections.md) for setup instructions.

## Connection setup

**1. Register on the DHL Developer Portal**

Sign up at [developer.dhl.com](https://developer.dhl.com), create an app, and subscribe it to the MyDHL API. Copy the **API username** and **API password** issued for your app.

**2. Add the connection in Condotta**

Go to **Connections** in Condotta, click **Add Connection**, select **DHL Express**, and enter:

* **DHL API Username**: Your MyDHL API username
* **DHL API Password**: Your MyDHL API password
* **Environment**: `production` (default) or `sandbox` for testing

> [!NOTE]
>
> Sandbox uses a separate base URL (`/mydhlapi/test`) and separate credentials. Production credentials will not work in sandbox and vice versa.

## Tools

### Rates

> [accordion] get-rates: Get shipping rates
>
> Retrieve available DHL Express products and rates between an origin and destination.
>
> **originPostalCode** `string` *required*
>
> Origin postal/zip code.
>
> **originCountryCode** `string` *required*
>
> Origin country code (ISO 3166-1 alpha-2, e.g. `US`).
>
> **originCityName** `string`
>
> Origin city name.
>
> **destinationPostalCode** `string` *required*
>
> Destination postal/zip code.
>
> **destinationCountryCode** `string` *required*
>
> Destination country code (ISO 3166-1 alpha-2).
>
> **destinationCityName** `string`
>
> Destination city name.
>
> **weight** `number` *required*
>
> Package weight in kilograms.
>
> **length** `number`
>
> Package length in centimetres.
>
> **width** `number`
>
> Package width in centimetres.
>
> **height** `number`
>
> Package height in centimetres.
>
> **plannedShippingDate** `string` *required*
>
> Planned shipping date (`YYYY-MM-DD`).
>
> **isCustomsDeclarable** `boolean` *required*
>
> Whether the shipment is customs-declarable.
>
> **unitOfMeasurement** `string` (default: metric)
>
> `metric` or `imperial`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "originPostalCode": "10001",
>   "originCountryCode": "US",
>   "originCityName": "New York",
>   "destinationPostalCode": "SW1A 1AA",
>   "destinationCountryCode": "GB",
>   "destinationCityName": "London",
>   "weight": 2.5,
>   "length": 30,
>   "width": 20,
>   "height": 15,
>   "plannedShippingDate": "2026-06-01",
>   "isCustomsDeclarable": true,
>   "unitOfMeasurement": "metric"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "products": [
>     {
>       "productName": "EXPRESS WORLDWIDE",
>       "productCode": "P",
>       "localProductCode": "P",
>       "weight": {
>         "volumetric": 1.8,
>         "provided": 2.5,
>         "unitOfMeasurement": "metric"
>       },
>       "totalPrice": [
>         {
>           "currencyType": "BILLC",
>           "priceCurrency": "USD",
>           "price": 142.5
>         }
>       ],
>       "deliveryCapabilities": {
>         "deliveryTypeCode": "QDDC",
>         "estimatedDeliveryDateAndTime": "2026-06-03T12:00:00",
>         "totalTransitDays": "2"
>       }
>     }
>   ]
> }
> ```

### Shipments

> [accordion] create-shipment: Create a shipment and label
>
> Submit a `ShipmentRequest` to the MyDHL API. The `payload` argument is passed through unchanged as the request body.
>
> **payload** `object` *required*
>
> MyDHL API ShipmentRequest. Typically includes `plannedShippingDateAndTime`, `productCode`, `customerDetails` (`shipperDetails`, `receiverDetails`), `content` (`packages`, `isCustomsDeclarable`, `declaredValue`, `description`), and `accounts`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "payload": {
>     "plannedShippingDateAndTime": "2026-06-01T13:00:00 GMT+00:00",
>     "pickup": { "isRequested": false },
>     "productCode": "P",
>     "accounts": [{ "typeCode": "shipper", "number": "123456789" }],
>     "customerDetails": {
>       "shipperDetails": {
>         "postalAddress": {
>           "postalCode": "10001",
>           "cityName": "New York",
>           "countryCode": "US",
>           "addressLine1": "350 5th Ave"
>         },
>         "contactInformation": {
>           "phone": "+12125551212",
>           "companyName": "Acme Corp",
>           "fullName": "Jane Doe"
>         }
>       },
>       "receiverDetails": {
>         "postalAddress": {
>           "postalCode": "SW1A 1AA",
>           "cityName": "London",
>           "countryCode": "GB",
>           "addressLine1": "10 Downing Street"
>         },
>         "contactInformation": {
>           "phone": "+442079460000",
>           "companyName": "Receiver Ltd",
>           "fullName": "John Smith"
>         }
>       }
>     },
>     "content": {
>       "packages": [
>         {
>           "weight": 2.5,
>           "dimensions": { "length": 30, "width": 20, "height": 15 }
>         }
>       ],
>       "isCustomsDeclarable": true,
>       "declaredValue": 100,
>       "declaredValueCurrency": "USD",
>       "description": "Sample documents",
>       "incoterm": "DAP",
>       "unitOfMeasurement": "metric"
>     }
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "shipmentTrackingNumber": "1234567890",
>   "trackingUrl": "https://www.dhl.com/en/express/tracking.html?AWB=1234567890",
>   "packages": [
>     {
>       "referenceNumber": 1,
>       "trackingNumber": "JD0140048500001234"
>     }
>   ],
>   "documents": [
>     {
>       "imageFormat": "PDF",
>       "content": "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC...",
>       "typeCode": "label"
>     }
>   ]
> }
> ```

> [accordion] track-shipment: Track a shipment by tracking number
>
> **trackingNumber** `string` *required*
>
> DHL Express tracking / waybill number.
>
> **pieceTrackingNumber** `string`
>
> Optional individual piece tracking number.
>
> **levelOfDetail** `string` (default: all)
>
> `all`, `shipment`, or `piece`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "trackingNumber": "1234567890"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "shipments": [
>     {
>       "shipmentTrackingNumber": "1234567890",
>       "status": "delivered",
>       "shipmentTimestamp": "2026-06-01T13:25:00",
>       "productCode": "P",
>       "description": "EXPRESS WORLDWIDE",
>       "shipperDetails": {
>         "postalAddress": { "cityName": "New York", "countryCode": "US" }
>       },
>       "receiverDetails": {
>         "postalAddress": { "cityName": "London", "countryCode": "GB" }
>       },
>       "events": [
>         {
>           "date": "2026-06-03",
>           "time": "11:42:00",
>           "typeCode": "OK",
>           "description": "Delivered",
>           "serviceArea": [{ "code": "LHR", "description": "London - UK" }]
>         },
>         {
>           "date": "2026-06-01",
>           "time": "13:25:00",
>           "typeCode": "PU",
>           "description": "Shipment picked up",
>           "serviceArea": [{ "code": "JFK", "description": "New York - USA" }]
>         }
>       ]
>     }
>   ]
> }
> ```

> [accordion] cancel-shipment: Cancel a booked shipment's pickup
>
> **trackingNumber** `string` *required*
>
> DHL Express tracking / waybill number.
>
> **requestorName** `string` *required*
>
> Name of the person requesting cancellation.
>
> **reason** `string` *required*
>
> Reason for the cancellation.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "trackingNumber": "1234567890",
>   "requestorName": "Jane Doe",
>   "reason": "Customer cancelled order"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": "cancelled",
>   "trackingNumber": "1234567890",
>   "cancelPickupReason": "Customer cancelled order"
> }
> ```

### Pickups

> [accordion] create-pickup: Schedule a pickup
>
> Submit a `PickupRequest` to the MyDHL API. The `payload` is passed through unchanged.
>
> **payload** `object` *required*
>
> MyDHL API PickupRequest. Typically includes `plannedPickupDateAndTime`, `customerDetails` (`shipperDetails`), `shipmentDetails` (packages, productCode), and `accounts`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "payload": {
>     "plannedPickupDateAndTime": "2026-06-01T13:00:00 GMT+00:00",
>     "closeTime": "18:00",
>     "location": "reception",
>     "accounts": [{ "typeCode": "shipper", "number": "123456789" }],
>     "customerDetails": {
>       "shipperDetails": {
>         "postalAddress": {
>           "postalCode": "10001",
>           "cityName": "New York",
>           "countryCode": "US",
>           "addressLine1": "350 5th Ave"
>         },
>         "contactInformation": {
>           "phone": "+12125551212",
>           "companyName": "Acme Corp",
>           "fullName": "Jane Doe"
>         }
>       }
>     },
>     "shipmentDetails": [
>       {
>         "productCode": "P",
>         "isCustomsDeclarable": true,
>         "packages": [
>           { "weight": 2.5, "dimensions": { "length": 30, "width": 20, "height": 15 } }
>         ],
>         "unitOfMeasurement": "metric"
>       }
>     ]
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "dispatchConfirmationNumbers": ["DXB-001-12345"],
>   "readyByTime": "13:00",
>   "nextPickupDate": "2026-06-01"
> }
> ```

> [accordion] cancel-pickup: Cancel a scheduled pickup
>
> **dispatchConfirmationNumber** `string` *required*
>
> Dispatch confirmation number returned from `create-pickup`.
>
> **requestorName** `string` *required*
>
> Name of the person requesting cancellation.
>
> **reason** `string` *required*
>
> Reason for the cancellation.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "dispatchConfirmationNumber": "DXB-001-12345",
>   "requestorName": "Jane Doe",
>   "reason": "Schedule change"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": "cancelled",
>   "dispatchConfirmationNumber": "DXB-001-12345"
> }
> ```

### Advanced

> [accordion] raw-api-request: Make an arbitrary MyDHL API request
>
> Send a request to any MyDHL API endpoint not covered by the curated tools, for example address validation, products listing, label image retrieval, or paperless trade document upload.
>
> **method** `string` *required*
>
> `GET`, `POST`, `PATCH`, or `DELETE`.
>
> **path** `string` *required*
>
> API path (e.g. `/address-validate` or `/shipments/1234567890/proof-of-delivery`).
>
> **query** `object`
>
> Optional query parameters object.
>
> **body** `object`
>
> Request body for `POST`/`PATCH`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "method": "GET",
>   "path": "/address-validate",
>   "query": {
>     "type": "delivery",
>     "countryCode": "GB",
>     "postalCode": "SW1A 1AA",
>     "cityName": "London",
>     "strictValidation": true
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "address": [
>     {
>       "countryCode": "GB",
>       "postalCode": "SW1A 1AA",
>       "cityName": "London",
>       "serviceArea": { "code": "LHR", "description": "London - UK" }
>     }
>   ]
> }
> ```

> [card] [Try this free for 14 days](https://preview.condotta.ai/signup)
>
> Start a 14-day trial on Band 1. At day 14, choose your band, or stop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.