Skip to main content

Overview

USPS delivers invoice data as EPS transaction detail reports, with one row per charge (label purchase, refund, scan form, etc.). Each row becomes one line item in the Trackstar API. Unlike UPS or FedEx, a row is not tied to one shipment: a single EPS transaction can cover many packages, and a package can appear in several transactions.

Files you’ll receive

Trackstar requests the EPS transaction detail report from the USPS reporting portal and serves it unchanged through the Files endpoint.
  • One CSV per date range. Each report covers up to 7 days. Its file name starts with TRANSACTIONDETAILS-{CRID}-{start date}-{end date}, with dates as YYYY-MM-DD, and its file_type is csv. A daily sync usually produces one report.
  • Reports overlap by a day. USPS reports cover whole days, and each daily report starts on the date the previous one ended. Charges from that shared day appear in both files. The two copies are identical except for ACH Withdrawal Amount (see below). Line items are not duplicated, because both copies produce the same line-item id. If you process the raw files yourself, de-duplicate on Package Identification Code (PIC) plus EPS Transaction ID.

Shape notes

  • One row per charge. A label purchase is one row; a later refund or adjustment on the same package is a separate row with its own EPS Transaction ID.
  • Rows don’t map 1:1 to shipments. One EPS transaction can cover many packages, so many rows can share an EPS Transaction ID. The same PIC can appear on several rows, one per transaction that charged it. Account-level rows have no PIC at all.
  • Transaction types vary. Common values include Label Purchase, Label Refund, SCAN Form Used, Carrier Pickup, and Shipping Services File. The Transaction Type column becomes the charge_description in the Trackstar-normalized output.
  • Dates are space-separated. Transaction Date/Time uses YYYY-MM-DD HH:MM:SS format.
  • Identifiers are wrapped in single quotes. USPS sends PIC, EFN, and customer reference numbers wrapped in single quotes, for example '9234690377819201924530'. Trackstar keeps the quotes as sent, so tracking_number and the line-item id include them. Strip them if you need the bare number.
  • ACH Withdrawal Amount is a report total. Every row carries the same value: the report’s total ACH withdrawal, not that row’s amount. Use Transaction Amount or Postage for the row’s own charge.
  • Tracking numbers are IMpb barcodes. The Package Identification Code (PIC) column holds the 20–22 digit USPS IMpb barcode (inside the quotes), which Trackstar maps to tracking_number.
  • Pass-through fields. Trackstar reads 6 columns (Package Identification Code (PIC), EPS Account #, EPS Transaction ID, Postage, Transaction Date/Time, Transaction Type). The remaining 15 columns pass through in the raw field.

Sample rows

The full CSV is shown here because USPS has only 21 columns. The downloadable CSV contains additional rows.

Download

Download full sample CSV (1 header row + 25 data rows, 21 columns)
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 ✓ are parsed into the Trackstar invoice_line_items schema; the rest are preserved in the raw field.

Mapping to invoice line items