https://api.goshippo.com/v2/reporting. Pass Authorization: ShippoToken <API_TOKEN> on every request. See the Authentication guide for token setup.
All timestamps are integer UTC epoch seconds.
1. Discover a report type
A report type is a predefined report identified by a versioned key likeinvoice.v1. List the catalog:
- The
available_columnsfield lists the column names you can request. Submit each column’sname. Omitcolumnson create and you get the report’s default set. - The
data_availabilityfield tells you the window you can query. Whenstatusisready, your interval must fall inside thestartandendwindow, andupdatedshows when those bounds were last checked (UTC epoch seconds). Whenstatusispending, a create request returns404 data-unavailable.
GET /v2/reporting/reports/{report_type}.
2. Create a run
A run is one async execution of a report type over a time interval. Setinterval to {start, end} in epoch seconds.
endmust be strictly greater thanstart, or you get a422.- A run can span up to 92 days. Going past a report type’s limit returns
400 invalid-parameter.
201 Created with status: QUEUED. Keep the id; you need it to poll and download.
output_formatacceptscsv,csv_gzip(the default), orparquet.columnsis optional. If you include it, it can’t be empty.- Unknown body fields are rejected with
422.
Safe retries with
idempotency_key. This field is optional: a string of 1 to 128 characters that you choose. Send a new key, or none at all, and you get 201 Created with a brand-new run. Retry with the same key and the same request body, and you get the original run back as 200 OK instead of a duplicate. Reuse a key with a different body and you get a 409 with the idempotency-conflict type. Without a key, every create makes a new run, so set one whenever a retry might fire twice.3. Poll until the run finishes
Poll until the run reaches
SUCCEEDED or FAILED.
On failure, error.code is one of:
4. Download the file
OnSUCCEEDED, result.download takes one of two shapes:
{ "status": "available", "url": "...", "expires": <epoch_s> }means the file is ready. Send aGETrequest tourl; a ShippoAuthorizationheader is not required.{ "status": "unavailable" }means a signed URL is not currently available. Fetch the run again to obtain a new URL.
The URL is time-limited. Read its
expires field for the exact cutoff. Fetch the run again to obtain a new URL and expiry.List your runs
limit defaults to 50 and ranges from 1 to 500. List responses don’t include signed download URLs. GET a succeeded run by id to mint one.
Error reference
Reporting API4xx and 5xx responses use application/problem+json, except authentication failures, which use 401 application/json with a detail field. Match problem responses on the last path segment of type, not its full URL.
Next steps
Reporting API reference
Full endpoint, schema, and field reference for every Reporting API call.
Authentication
How to generate and use your Shippo API token.