Documents
/v1/documentsList documents
The vault's documents: bank statements, latest period first, then uploads without a period, newest first.
Parameters
limit integer · query | Page size, 1–200. |
cursor string | null · query | The next_cursor of the previous page. |
doc_type string | null · query | Only documents of this kind: other, statement, tax. |
X-Organization-Id string | null · header |
Returns 200 · DocumentList
data | |
has_more boolean · required | |
next_cursor string | null · required |
curl -X GET "https://api.lumaledger.app/v1/documents" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"/v1/documentsUpload a document
Upload a file to the vault as multipart/form-data.
Parameters
Idempotency-Key string | null · header | Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours. |
X-Organization-Id string | null · header |
Body · multipart/form-data
doc_type string | What it is: other, statement, tax. Pattern: ^(other|statement|tax)$. Default: "other". |
file file · required | A PDF, PNG, JPEG, WebP or HEIC file, at most 15 MB. Its content type must match its bytes. |
name string | null | What to call it. Defaults to the file's name. |
tax_year integer | null | The tax year a tax document is for. |
Returns 201 · Document
account_id integer | null · required | The account a statement is for (see accounts.get). |
created_at datetime · required | |
doc_type string · required | One of other, statement, tax. |
id integer · required | |
institution_name string | null · required | The bank a statement came from. |
mime_type string · required | |
name string · required | |
period_end date | null · required | A statement's last day. |
period_start date | null · required | A statement's first day. |
size_bytes integer · required | |
source string · required | plaid (a statement pulled from the bank) or upload. |
tax_year integer | null · required |
curl -X POST "https://api.lumaledger.app/v1/documents" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-F "file=@path/to/file"Try it isn't available for file uploads — use the curl example above.
/v1/documents/{document_id}Delete a document
Delete a document and its file. A statement pulled from a bank comes
back with the next documents.sync_statements while the bank still
offers it.
Parameters
document_id integer · path · required | |
X-Organization-Id string | null · header |
Returns 204 with no body.
curl -X DELETE "https://api.lumaledger.app/v1/documents/{document_id}" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"/v1/documents/{document_id}Get a document
One document's details. Its file is documents.download.
Parameters
document_id integer · path · required | |
X-Organization-Id string | null · header |
Returns 200 · Document
account_id integer | null · required | The account a statement is for (see accounts.get). |
created_at datetime · required | |
doc_type string · required | One of other, statement, tax. |
id integer · required | |
institution_name string | null · required | The bank a statement came from. |
mime_type string · required | |
name string · required | |
period_end date | null · required | A statement's last day. |
period_start date | null · required | A statement's first day. |
size_bytes integer · required | |
source string · required | plaid (a statement pulled from the bank) or upload. |
tax_year integer | null · required |
curl -X GET "https://api.lumaledger.app/v1/documents/{document_id}" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"/v1/documents/{document_id}/downloadDownload a document
A short-lived URL for the document's file, named so a browser saves it under the document's name.
Parameters
document_id integer · path · required | |
X-Organization-Id string | null · header |
Returns 200 · Download
expires_at datetime | null · required | When a signed url stops working. Null for a data: URL. |
url string · required | A signed HTTPS URL for the file, or a data: URL carrying the file itself when it is stored inline. Needs no credential. |
curl -X GET "https://api.lumaledger.app/v1/documents/{document_id}/download" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"/v1/documents/statements/syncPull new bank statements
Pull any new statements from every linked bank into the vault. A bank
that does not offer statements reports an error without failing the
rest, and statements already stored are skipped, so calling it again is
harmless. Premium only: on the free plan this is a 402
premium_required.
Parameters
X-Organization-Id string | null · header |
Returns 200 · StatementSync
downloaded integer · required | New statements stored, across every bank. |
items | One per linked bank. |
curl -X POST "https://api.lumaledger.app/v1/documents/statements/sync" \
-H "Authorization: Bearer $LUMALEDGER_TOKEN"Objects
Document
A file in the vault.
Fields
account_id integer | null · required | The account a statement is for (see accounts.get). |
created_at datetime · required | |
doc_type string · required | One of other, statement, tax. |
id integer · required | |
institution_name string | null · required | The bank a statement came from. |
mime_type string · required | |
name string · required | |
period_end date | null · required | A statement's last day. |
period_start date | null · required | A statement's first day. |
size_bytes integer · required | |
source string · required | plaid (a statement pulled from the bank) or upload. |
tax_year integer | null · required |
DocumentList
A page of documents, latest statement period first; undated ones last.
Fields
data | |
has_more boolean · required | |
next_cursor string | null · required |
Download
Where to fetch a file. Fetch it promptly: the URL stops working at
expires_at, and asking again gives a fresh one.
Fields
expires_at datetime | null · required | When a signed url stops working. Null for a data: URL. |
url string · required | A signed HTTPS URL for the file, or a data: URL carrying the file itself when it is stored inline. Needs no credential. |
StatementSync
Fields
downloaded integer · required | New statements stored, across every bank. |
items | One per linked bank. |
StatementSyncItem
Fields
downloaded integer | null · required | New statements stored from this bank. |
error string | null · required | Why this bank's statements could not be pulled. |
institution string · required | |
outside_window integer | null · required | Statements older than the pull reaches back. |
skipped integer | null · required | Statements already in the vault. |