Skip to main content

Overview

DHL eCommerce delivers invoices as positional CSVs. Each file contains one HDR row (invoice metadata) followed by many DTL rows, one per shipment. A single DTL row may carry values in multiple charge columns; each non-zero charge becomes a separate line item in the Trackstar API.

Files you’ll receive

  • CSV only. Trackstar doesn’t receive a PDF or any other file for DHL eCommerce invoices.
  • Some older files appear twice. A small number of invoice files first synced before September 2026 are listed twice in the Files API, under the same file name. The copies are identical, and line items are not duplicated.

Shape notes

  • No header row. The raw CSV has no column names, and the downloadable sample is headerless too, matching the real file. DTL rows always have 79 columns in the fixed order documented in Fields below (the index column is the 0-based position). The inline example further down adds column names purely for readability.
  • Line type markers. Each row starts with either HDR (invoice-level) or DTL (shipment-level). Only DTL rows become line items.
  • The HDR row is shorter. It has 16 columns: index 1 is the invoice date, index 2 the invoice number, and index 11 the invoice total.
  • Multiple charges per shipment. A shipment can populate Charge*, ZFuel*, special-handling surcharges, and taxes simultaneously. Each non-zero charge column becomes one line item.
  • Totals reconciliation. The sum of all DTL charges should equal the total at index 11 of the HDR row. Trackstar checks this: if the charges miss the total by more than 0.01, Trackstar creates no line items from that file. The raw file is still available from the Files API.
  • Some lines have no pickup date. Tax and adjustment lines aren’t tied to a pickup, so PUDATE* can be blank. Trackstar uses the invoice date from the HDR row for those lines.
  • Asterisked column names. Most column names end in * as delivered by DHL; preserved as-is.

Sample rows

Curated subset of columns (with names added for readability). The downloadable CSV is the raw DHL eCom format: no header row, a 16-column HDR row, and 79-column DTL rows.

Download

Download full sample CSV (1 HDR row with 16 columns + 20 DTL rows with 79 columns, no header row)
All sample data is synthetic. Tracking numbers, account numbers, addresses, and reference fields are fabricated and do not correspond to any real shipments or customers.

Fields

Columns marked Charge become line items when non-zero (41 columns in total).

Row marker

The rest of this section describes DTL rows. On the HDR row, index 1 carries the invoice date, index 2 the invoice number, and index 11 the invoice total.

Shipment identification

Receiver address

Service and weight

Base charge and customer references

Special service charges (ZZWS)

Surcharges (ZSC)

Returns and taxes (ZRM)

Fuel and pickup charges

Dimensional weight

Reserved

Mapping to invoice line items

Each non-zero charge column on a DTL row becomes one line item.