Skip to main content

Overview

Royal Mail is unique among the carriers: it provides invoice data and tracking data as separate feeds, so there is no single raw invoice file to download. Trackstar joins the two together and serves a combined line-item file. Each row is one tracked item (one barcode) with its share of the invoice charges. Because the file is assembled by Trackstar, its columns use Trackstar’s normalized naming — lowercase with underscores — rather than Royal Mail’s report column names. The file has 16 columns with a single header row.

Shape notes

  • One row per tracked item. A Royal Mail sales order can cover many items. The invoice charges for a sales order are divided evenly across the tracked items matched to it, so gross_cost and net_cost are per-item shares and can carry long decimals.
  • source_type marks direction. outbound for items sent to a recipient; rts for items returned to sender. Returned items also populate reason_for_non_delivery and date_return_to_sender.
  • Two date formats. invoice_date uses Royal Mail’s DD.MM.YYYY format; date_item_delivered and date_return_to_sender use YYYY-MM-DD.
  • Tracking numbers are S10 barcodes. Two letters, nine digits, and a GB suffix (e.g., AB123456789GB).
  • charge_description in the API. In the invoice line items endpoint, each row’s charge_description is built from product_name and class_of_mail (with RTS appended for returns).

Sample rows

Curated subset of columns for readability. The downloadable CSV has all 16 columns.

Download

Download full sample CSV (1 header row + 25 data rows, 16 columns)
All sample data is synthetic. Account numbers, invoice numbers, tracking numbers, and names are fabricated and do not correspond to any real shipments or customers.

Fields

Each row is one tracked item. All 16 columns appear in every row, in this order.

Account and invoice

Product and item

Costs and delivery