Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spojit.com/llms.txt

Use this file to discover all available pages before exploring further.

The DHL Express connector lets your workflows quote rates, create shipments and labels, track parcels, and manage pickups through the MyDHL API.
For the full API reference, see the DHL Express MyDHL API documentation.

Connection setup

1

Register on the DHL Developer Portal

Sign up at 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 Spojit

Go to Connections in Spojit, 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
Sandbox uses a separate base URL (/mydhlapi/test) and separate credentials. Production credentials will not work in sandbox and vice versa.

Tools

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:
{
  "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:
{
  "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

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:
{
  "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:
{
  "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"
    }
  ]
}
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:
{
  "trackingNumber": "1234567890"
}
Example response:
{
  "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" }]
        }
      ]
    }
  ]
}
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:
{
  "trackingNumber": "1234567890",
  "requestorName": "Jane Doe",
  "reason": "Customer cancelled order"
}
Example response:
{
  "status": "cancelled",
  "trackingNumber": "1234567890",
  "cancelPickupReason": "Customer cancelled order"
}

Pickups

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:
{
  "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:
{
  "dispatchConfirmationNumbers": ["DXB-001-12345"],
  "readyByTime": "13:00",
  "nextPickupDate": "2026-06-01"
}
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:
{
  "dispatchConfirmationNumber": "DXB-001-12345",
  "requestorName": "Jane Doe",
  "reason": "Schedule change"
}
Example response:
{
  "status": "cancelled",
  "dispatchConfirmationNumber": "DXB-001-12345"
}

Advanced

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:
{
  "method": "GET",
  "path": "/address-validate",
  "query": {
    "type": "delivery",
    "countryCode": "GB",
    "postalCode": "SW1A 1AA",
    "cityName": "London",
    "strictValidation": true
  }
}
Example response:
{
  "address": [
    {
      "countryCode": "GB",
      "postalCode": "SW1A 1AA",
      "cityName": "London",
      "serviceArea": { "code": "LHR", "description": "London - UK" }
    }
  ]
}