TRUED APIReferenceGuides

Pagination and keeping in sync

Every list endpoint returns one page at a time.

{
  "data": [ { "id": "inv_7Qa2" }, { "id": "inv_8Rb3" } ],
  "has_more": true,
  "next_cursor": "eyJ2IjoxLCJ..."
}

Reading every page

curl "https://api.trued.io/v1/invoices?period=2026-09&limit=100" \
  -H "Authorization: Bearer $TRUED_API_KEY"

curl "https://api.trued.io/v1/invoices?period=2026-09&limit=100&cursor=eyJ2IjoxLCJ..." \
  -H "Authorization: Bearer $TRUED_API_KEY"

Lists are ordered by when each row last changed, oldest first. /v1/events is ordered by when each event happened, oldest first.

Filters

Parameter Where Meaning
period invoices, time entries, charges A billing period: 2026-09 (monthly), 2026-W18 (weekly), 2026-BW09 (every two weeks)
client_id invoices, time entries, charges, payments One client
contractor_id invoices, time entries, charges One contractor
updated_since every list except events Only rows that changed at or after this time (ISO 8601)
created_since events Only events at or after this time

An unknown parameter is refused with 400, so a typo never silently returns everything.

Keeping a copy in sync

The usual pattern for a dashboard or a data warehouse:

  1. First load: read each list in full and store the rows by id.
  2. Every few minutes or hours: read each list with updated_since set to the time of your last successful sync, minus a small margin (one minute is plenty). Replace stored rows that come back by id.
  3. Save the start time of each successful sync as the next updated_since.

Two things to know:

Once a month is closed (period_closed is true on its invoices), its figures are final and you can stop re-reading it.