Ledger Changes
How the books changed since a moment: every journal entry whose lines were written to the ledger after since, from any source (an invoice, a bill, a payment, a bank line, a manual entry), oldest first, each with all of its lines. Requires ledger_changes:read (or the broad reports scope).
The ledger only grows. Editing a posted document reverses its old entry and posts a new one, and voiding it posts a reversal, so these entries are every change to the books; a reversal names the entry it undoes in reversal_of_id. A backdated entry appears when it was recorded (recorded_at) and carries the date it is dated (date), so an entry dated in March and recorded today tells you March changed. Changes that write no entry, such as a draft invoice or a new contact, are not changes to the books and don't appear here.
Polling
Start with since, then pass each page's next_cursor as cursor until has_more is false. The cursor is a position in the ledger, so a page never skips an entry. An entry whose lines straddle two pages comes on both: keep entries by their id, replacing a stored copy.
For your next poll, start again with since a few minutes before the latest recorded_at you saw. An entry is stamped just before it is saved, so a long write, such as an import, can become visible slightly after the time it carries; leaving room picks it up.
Currencies
A line's debit_cents and credit_cents are always in the company's home_currency: they are what the books add up. original_currency and original_amount_cents are the line as it was written, so a euro invoice's receivable line reads EUR there. One entry can hold both: a home-currency bank account paying a euro bill writes a EUR payables line and a home-currency bank line.
What a re-read picks up
Amounts only ever change by new entries, so the feed has every change to what the books add up. A few details change on lines already written, without a new entry: tracking categories or a contact filled in later, two contacts merged (the lines keep the old contact's id), a corrected memo, and an older entry becoming reversed (its reversal does appear, naming it). Re-read in full now and then; nightly is plenty.
Entries are deleted only when a company's books are rebuilt: it starts over from QuickBooks or Xero, or wipes or abandons a migration. Re-sync in full after that.
The Ledger Change Object
| Field | Type | Description |
|---|---|---|
| id | uuid | Journal entry UUID |
| object | journal_entry | Always 'journal_entry' |
| entry_number | string | null | Journal number (e.g., JE-0042); null on an entry a document posted |
| date | date | The date the entry is dated (the books day it lands on) |
| recorded_at | date-time | When its lines were written to the ledger, the time `since` compares |
| entry_type | primary | supplemental | cogs | closing | primary: a document's or a person's entry, and a reversal of one (reversal_of_id names what it reverses: an edit or a void). supplemental: a further entry on the same document, dated on its own (recognition, revaluation). cogs: an inventory sale's cost of goods. closing: the fiscal year's closing entry, which reports leave out |
| source_type | Invoice | Bill | Expense | SalesReceipt | CustomerCharge | Payment | BillPayment | Check | CreditMemo | VendorCredit | RefundReceipt | Deposit | AccountTransfer | PayrollRun | BankTransaction | other | null | The record it came from. BankTransaction: a bank line categorized straight to an account. other: one of Imprest's own sources (an import, a connection, a depreciation run). Null on a manual or imported journal entry |
| source_id | uuid | null | That record's id; null for other |
| memo | string | null | Memo |
| adjusting | boolean | Whether the entry is marked as an adjusting entry |
| status | string | posted, or reversed: posted, then reversed by reversed_by_id (as it stands now; an entry reversed later does not reappear, its reversal does) |
| currency | string | The currency a manual entry was written in; a document's entry is in the home currency here and each line's original_currency says what it holds |
| home_currency | string | The company's home currency; debit_cents and credit_cents are in it |
| exchange_rate | string | null | Home currency per unit of currency, as a decimal string (foreign-currency entries) |
| total_cents | integer | Sum of the debits, in the home currency's cents |
| reversal_of_id | uuid | null | The entry this one reverses |
| reversed_by_id | uuid | null | The entry that reversed this one |
| lines | object[] | Every line the entry wrote |
| created_at | date-time | When the journal entry was created |
| updated_at | date-time | When the journal entry was last updated |
Endpoints
/api/v1/ledger_changesList changes to the books
Every journal entry whose lines were written to the ledger after `since`, from any source, in the order they were written, each with all of its lines. Amounts only ever change by new entries: an edit to a posted document reverses its old entry and posts a new one, and a void is a reversal. A backdated entry appears when it was recorded, with the date it is dated. Walk the pages with `cursor` until has_more is false. For your next poll, start again with `since` a few minutes before the latest recorded_at you saw, and keep entries by id, replacing a stored copy: an entry is stamped just before it commits, so a long write can become visible slightly after the time it carries. Re-read in full now and then (nightly is plenty) to pick up what changes in place without a new entry: dimension tags or a contact filled in later, contacts merged (lines keep the old contact id), a corrected memo, an older entry becoming reversed. Also re-sync in full after entries are deleted: a company that starts over from QuickBooks or Xero, or wipes or abandons a migration, has those books rebuilt.
Scopes: ledger_changes:read or reports·operationId: listLedgerChanges
Path & Query Parameters
| Parameter | Type | Description |
|---|---|---|
| since | date-time | ISO 8601 timestamp with a zone; entries recorded after it (e.g. 2026-11-22T20:30:00Z; URL-encode a + offset). Required unless cursor is sent |
| until | date-time | ISO 8601 timestamp with a zone; entries recorded at or before it |
| cursor | string | next_cursor from the previous page; it carries the window, so send it alone |
| page_size | integer | Entries per page (default 50, max 200) |
curl https://imprest.ai/api/v1/ledger_changes \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"{
"ledger_changes": [
{
"id": "00bd2a8d-78b3-40f2-a28f-47fc33f13a6f",
"object": "journal_entry",
"entry_number": null,
"date": "2020-03-01",
"memo": "ledger feed test",
"adjusting": false,
"status": "posted",
"currency": "USD",
"home_currency": "USD",
"exchange_rate": null,
"total_cents": 450,
"reversal_of_id": null,
"reversed_by_id": null,
"lines": [
{
"account_id": "def75944-088d-5417-88b3-d3d68486b302",
"debit_cents": 0,
"credit_cents": 450,
"original_currency": "USD",
"original_amount_cents": -450,
"description": null,
"contact_id": null,
"customer_id": null,
"entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
"dimension_values": {}
},
{
"account_id": "d178ce30-efb5-5ce1-9a87-f27b3423ab30",
"debit_cents": 450,
"credit_cents": 0,
"original_currency": "USD",
"original_amount_cents": 450,
"description": null,
"contact_id": null,
"customer_id": null,
"entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
"dimension_values": {}
}
],
"created_at": "2020-03-01T12:01:00Z",
"updated_at": "2020-03-01T12:01:00Z",
"recorded_at": "2020-03-01T12:01:00Z",
"entry_type": "primary",
"source_type": "BankTransaction",
"source_id": "4018637f-a5b8-5002-90bf-4ec780e9be5a"
},
{
"id": "9b64c1f7-7862-46d9-9b55-3a822adc8905",
"object": "journal_entry",
"entry_number": null,
"date": "2020-03-01",
"memo": "ledger feed test",
"adjusting": false,
"status": "posted",
"currency": "USD",
"home_currency": "USD",
"exchange_rate": null,
"total_cents": 900,
"reversal_of_id": null,
"reversed_by_id": null,
"lines": [
{
"account_id": "d178ce30-efb5-5ce1-9a87-f27b3423ab30",
"debit_cents": 900,
"credit_cents": 0,
"original_currency": "USD",
"original_amount_cents": 900,
"description": null,
"contact_id": null,
"customer_id": null,
"entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
"dimension_values": {}
},
{
"account_id": "def75944-088d-5417-88b3-d3d68486b302",
"debit_cents": 0,
"credit_cents": 900,
"original_currency": "USD",
"original_amount_cents": -900,
"description": null,
"contact_id": null,
"customer_id": null,
"entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
"dimension_values": {}
}
],
"created_at": "2020-03-01T12:02:00Z",
"updated_at": "2020-03-01T12:02:00Z",
"recorded_at": "2020-03-01T12:02:00Z",
"entry_type": "primary",
"source_type": "other",
"source_id": null
}
],
"next_cursor": null,
"has_more": false
}Response fields
| Parameter | Type | Description |
|---|---|---|
| ledger_changesrequired | object[] | The entries, in the order their lines were written |
| idrequired | uuid | Journal entry UUID |
| objectrequired | journal_entry | Always 'journal_entry' |
| entry_numberrequired | string | null | Journal number (e.g., JE-0042); null on an entry a document posted |
| daterequired | date | The date the entry is dated (the books day it lands on) |
| recorded_atrequired | date-time | When its lines were written to the ledger, the time `since` compares |
| entry_typerequired | primary | supplemental | cogs | closing | primary: a document's or a person's entry, and a reversal of one (reversal_of_id names what it reverses: an edit or a void). supplemental: a further entry on the same document, dated on its own (recognition, revaluation). cogs: an inventory sale's cost of goods. closing: the fiscal year's closing entry, which reports leave out |
| source_typerequired | Invoice | Bill | Expense | SalesReceipt | CustomerCharge | Payment | BillPayment | Check | CreditMemo | VendorCredit | RefundReceipt | Deposit | AccountTransfer | PayrollRun | BankTransaction | other | null | The record it came from. BankTransaction: a bank line categorized straight to an account. other: one of Imprest's own sources (an import, a connection, a depreciation run). Null on a manual or imported journal entry |
| source_idrequired | uuid | null | That record's id; null for other |
| memorequired | string | null | Memo |
| adjustingrequired | boolean | Whether the entry is marked as an adjusting entry |
| statusrequired | string | posted, or reversed: posted, then reversed by reversed_by_id (as it stands now; an entry reversed later does not reappear, its reversal does) |
| currencyrequired | string | The currency a manual entry was written in; a document's entry is in the home currency here and each line's original_currency says what it holds |
| home_currencyrequired | string | The company's home currency; debit_cents and credit_cents are in it |
| exchange_raterequired | string | null | Home currency per unit of currency, as a decimal string (foreign-currency entries) |
| total_centsrequired | integer | Sum of the debits, in the home currency's cents |
| reversal_of_idrequired | uuid | null | The entry this one reverses |
| reversed_by_idrequired | uuid | null | The entry that reversed this one |
| linesrequired | object[] | Every line the entry wrote |
| account_idrequired | uuid | Chart account UUID (GET /accounts) |
| debit_centsrequired | integer | Debit in the home currency's cents (0 on a credit line) |
| credit_centsrequired | integer | Credit in the home currency's cents (0 on a debit line) |
| original_currencyrequired | string | ISO currency the line was written in (debit_cents and credit_cents are always the home currency) |
| original_amount_centsrequired | integer | null | The line's amount in original_currency: positive for a debit, negative for a credit |
| descriptionrequired | string | null | Line description |
| contact_idrequired | uuid | null | Contact (party) UUID, if the line names one |
| customer_idrequired | uuid | null | Customer the line counts toward in profit and loss by customer |
| entity_idrequired | uuid | null | Entity UUID the line posts to |
| dimension_valuesrequired | object | Dimension tagging (dimension_id => value_id) |
| created_atrequired | date-time | When the journal entry was created |
| updated_atrequired | date-time | When the journal entry was last updated |
| next_cursorrequired | string | null | Pass as cursor for the next page; null on the last |
| has_morerequired | boolean | Whether another page follows |
Errors
401No valid access token (invalid_token).403The token or the person behind it can't do this: insufficient_scope names the scope the token lacks; forbidden means the person's role doesn't allow it.422since missing or not a timestamp with a zone, until not one or before since, a cursor sent with since or until, or a cursor that isn't one this endpoint gave (invalid_filter)
Every error uses the same envelope: error, message and error_code.