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) orsandboxfor testing
Sandbox uses a separate base URL (
/mydhlapi/test) and separate credentials. Production credentials will not work in sandbox and vice versa.Tools
Rates
get-rates: Get shipping rates
get-rates: Get shipping rates
Retrieve available DHL Express products and rates between an origin and destination.Example request:Example response:
string
required
Origin postal/zip code.
string
required
Origin country code (ISO 3166-1 alpha-2, e.g.
US).string
Origin city name.
string
required
Destination postal/zip code.
string
required
Destination country code (ISO 3166-1 alpha-2).
string
Destination city name.
number
required
Package weight in kilograms.
number
Package length in centimetres.
number
Package width in centimetres.
number
Package height in centimetres.
string
required
Planned shipping date (
YYYY-MM-DD).boolean
required
Whether the shipment is customs-declarable.
string
default:"metric"
metric or imperial.Shipments
create-shipment: Create a shipment and label
create-shipment: Create a shipment and label
Submit a Example request:Example response:
ShipmentRequest to the MyDHL API. The payload argument is passed through unchanged as the request body.object
required
MyDHL API ShipmentRequest. Typically includes
plannedShippingDateAndTime, productCode, customerDetails (shipperDetails, receiverDetails), content (packages, isCustomsDeclarable, declaredValue, description), and accounts.track-shipment: Track a shipment by tracking number
track-shipment: Track a shipment by tracking number
Pickups
create-pickup: Schedule a pickup
create-pickup: Schedule a pickup
Submit a Example request:Example response:
PickupRequest to the MyDHL API. The payload is passed through unchanged.object
required
MyDHL API PickupRequest. Typically includes
plannedPickupDateAndTime, customerDetails (shipperDetails), shipmentDetails (packages, productCode), and accounts.Advanced
raw-api-request: Make an arbitrary MyDHL API request
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.Example request:Example response:
string
required
GET, POST, PATCH, or DELETE.string
required
API path (e.g.
/address-validate or /shipments/1234567890/proof-of-delivery).object
Optional query parameters object.
object
Request body for
POST/PATCH.