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_costandnet_costare per-item shares and can carry long decimals. source_typemarks direction.outboundfor items sent to a recipient;rtsfor items returned to sender. Returned items also populatereason_for_non_deliveryanddate_return_to_sender.- Two date formats.
invoice_dateuses Royal Mail’sDD.MM.YYYYformat;date_item_deliveredanddate_return_to_senderuseYYYY-MM-DD. - Tracking numbers are S10 barcodes. Two letters, nine digits, and a
GBsuffix (e.g.,AB123456789GB). charge_descriptionin the API. In the invoice line items endpoint, each row’scharge_descriptionis built fromproduct_nameandclass_of_mail(withRTSappended 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.