API reference
Provider statements
Monthly statements a connected bank handed over as the PDF it printed, and what reading each one came to.
- GET
/v1/provider_statementsList the statements connected banks handed over - POST
/v1/provider_statements/fetchAsk the bank for a month's statement now - GET
/v1/provider_statements/{statement_id}Get a statement a bank handed over - GET
/v1/provider_statements/{statement_id}/fileLink to the PDF a bank handed over
Guides: Connect another bank, Close the month
List the statements connected banks handed over
GET/v1/provider_statements
client.providerStatements.list()
Statements connected banks handed over, the newest month first.
Parameters
| Name | Type | Description |
|---|---|---|
connection_idQuery | string or null | An id that starts with |
account_idQuery | string or null | An id that starts with |
statusQuery | string or null | Only those with this status. |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/provider_statements" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Ask the bank for a month's statement now
POST/v1/provider_statements/fetch
client.providerStatements.fetch()
Ask the bank for an account's statement for a month, now rather than after the next sync.
Answers what it came to at once. A statement already handed over is read
(or is on file); one not yet handed over is asked for, over the days it
can be posted on, and read as soon as it arrives, so poll get or the
list by account_id. Safe to repeat: a collection already running for
the login is not started twice, and the bank is asked at most once a day.
Request body
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X POST "https://api.ledgerit.ai/v1/provider_statements/fetch" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"account_id":"…","month":"2026-09-30"}'Get a statement a bank handed over
GET/v1/provider_statements/{statement_id}
client.providerStatements.get()
One statement a connected bank handed over, and what reading it came to.
Parameters
| Name | Type | Description |
|---|---|---|
statement_idPath · Required | string | An id that starts with |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/provider_statements/{statement_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Link to the PDF a bank handed over
GET/v1/provider_statements/{statement_id}/file
client.providerStatements.file()
A short-lived link to the PDF exactly as the bank sent it.
Parameters
| Name | Type | Description |
|---|---|---|
statement_idPath · Required | string | An id that starts with |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/provider_statements/{statement_id}/file" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
ProviderStatementPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of ProviderStatementOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
StatementFetchRequest
| Name | Type | Description |
|---|---|---|
account_idRequired | string | The bank or card account whose statement is wanted. |
monthRequired | string (date) | Any day of the month the statement is for; the close sends the month's last day. |
StatementFetchOut
| Name | Type | Description |
|---|---|---|
bank_statement_id | string or null | An id that starts with |
connection_idRequired | string | The bank login the statement comes from. |
institution | string or null | The bank the login reached, when it is not the provider itself. |
institution_logo_url | string or null | That bank's logo, served from LedgerIt's own bucket. |
monthRequired | string (date) | The first day of the month asked for. |
providerRequired | string | The integration of that login: |
provider_statement_id | string or null | An id that starts with |
refusal | string or null | Why it was refused; null unless |
statusRequired | string |
held, reading, requested, refused, before_books, not_shared, unsupported, not_ended |
ProviderStatementOut
| Name | Type | Description |
|---|---|---|
account_idRequired | string or null | An id that starts with |
bank_statement_idRequired | string or null | An id that starts with |
byte_sizeRequired | integer | The PDF's size in bytes. |
connection_idRequired | string or null | An id that starts with |
created_atRequired | string (date-time) | When the connection fetched it. |
idRequired | string | An id that starts with |
lines_not_in_feedRequired | integer or null | Lines on the statement that no transaction from the bank feed matched: movements the feed never reported. Null until it is read. |
period_monthRequired | string (date) | The first day of the month the statement is for. |
posted_onRequired | string (date) or null | The day the bank posted it, when the bank says. |
providerRequired | string | The integration that fetched it: |
read_atRequired | string (date-time) or null | |
refusalRequired | string or null | Why it was refused, in words a person can act on; null unless |
refusal_codeRequired | string or null | The refusal's code, such as |
sha256Required | string | The PDF's sha256, as the bank sent it. |
statusRequired | string |
|
StatementFileLink
| Name | Type | Description |
|---|---|---|
expires_inRequired | integer | Seconds until it stops working. |
urlRequired | string | A link to the file that stops working after a few minutes. |