Reference · Tools

DHL

Track shipments using the DHL Unified Tracking API

Action Utility v1

The DHL node queries the DHL Unified Tracking API to fetch real-time shipment status, tracking events, and delivery details for one or more tracking numbers. Use it to build automated post-purchase notifications, logistics dashboards, or exception alerts when a shipment stalls. Each tracked shipment is emitted as its own output item, so downstream nodes process shipments individually.

Node type
Action
Parameters
5
Outputs
Output, Error
Credentials
DHL API

DHL

Track DHL shipments by tracking number

Overview

DHL is a global logistics company providing shipping and tracking services. This tool queries the DHL Unified Tracking API to retrieve tracking details for shipments by their tracking number. It returns shipment status, origin/destination, tracking events, and delivery details. Optionally accepts a recipient postal code for more detailed information.

Category: Utility
Tool Name: dhl
Version: 1

Appearance: Icon: lucide-Truck | Color: #FFCC00

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires DHL API credentials. See the Credentials Guide for setup instructions.

Operations

OperationValueDescription
Get Tracking DetailsgetThe operation to perform.

Parameters

ParameterTypeRequiredDefaultDescription
Tracking NumberstringYesThe DHL tracking number of the shipment to look up. Supports expressions like {{ $json.trackingNumber }}.
OptionscollectionNo{}Additional options for the tracking request.
— Recipient’s Postal CodestringNoDHL will return more detailed information on the shipment when you provide the recipient’s postal code. It acts as a verification step. Supports expressions.
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

Each shipment the API returns becomes its own output item: the shipment object is merged into the incoming item JSON at the top level, so the upstream fields stay addressable alongside the tracking data. Binary data is forwarded. One input item can therefore produce several output items when a tracking number resolves to more than one shipment.

Merged shipment data covers the shipment’s status, origin and destination, and its tracking events, along with the delivery details DHL exposes for that shipment. Supplying the recipient’s postal code makes DHL return a more detailed record.

When the tracking number matches nothing, one item is emitted carrying the original JSON plus:

{
  "_trackingNumber": "1234567890",
  "_shipments": []
}

Check _shipments before treating a result as a real shipment — an empty array is the “not found” signal, not an error.

Usage Examples

  • Get tracking details for a DHL shipment
  • Check the delivery status of a DHL package
  • Look up DHL tracking events for a parcel

Example Configuration

Track a single package by a tracking number carried on the item:

{
  "type": "dhl",
  "parameters": {
    "operation": "get",
    "trackingNumber": "{{ $json.trackingNumber }}"
  }
}

Ask for the detailed record by verifying with the recipient’s postal code:

{
  "type": "dhl",
  "parameters": {
    "operation": "get",
    "trackingNumber": "{{ $json.trackingNumber }}",
    "options": {
      "recipientPostalCode": "{{ $json.shipTo.postalCode }}"
    }
  }
}

Track a batch of numbers with a higher concurrency:

{
  "type": "dhl",
  "parameters": {
    "operation": "get",
    "trackingNumber": "{{ $json.awb }}",
    "maxConcurrency": 20
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Track DHL shipments by tracking number using the DHL Unified Tracking API.

Important Notes

  • Parameter structure. options is a collection — its fields nest under the options key. Do not place recipientPostalCode at the top level of the parameters object.
  • Required fields. trackingNumber is required for every tracking request.
  • One operation. get is the only operation available; the tool always reads tracking data and never writes to DHL.
  • Fan-out. Because each shipment leaves as its own item, downstream nodes see one item per shipment rather than one per input item.

Frequently asked questions

What credentials do I need to use this node?

You need a DHL API credential (credential type: dhlApi) configured in BusyBot. This connects to the DHL Unified Tracking API, so you'll need a DHL developer account and API key from DHL's developer portal before you can authenticate.

Can this node create shipments or book pickups?

No. The DHL node has a single operation — get — which only reads tracking data. It cannot write to DHL, create shipments, schedule pickups, or modify any records. If you need write operations, you would have to use an HTTP Request node against the DHL API directly.

Where does the recipientPostalCode field go in the parameters?

It nests inside the options collection, not at the top level of the parameters object. Setting it at the top level will have no effect. In the node editor, expand the Options section and enter the postal code there. This field is optional but can unlock more detailed tracking information from the API.

If I pass in three tracking numbers, how many items does the next node receive?

Three — one per shipment, not one per input item. The DHL node fans out so that each shipment becomes its own item in the workflow. This means any downstream node processes shipments individually, which is useful when you want to branch logic based on each shipment's status independently.

What happens when a tracking request fails?

Failed requests are routed to the Error output rather than the main Output. This lets you handle lookup failures — such as an invalid tracking number or an API error — separately from successful responses, without stopping the rest of your workflow.

Build with the DHL node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need DHL API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.