list()
Returns a paginated list of statements for a project.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | Yes | — | The project ID |
options.page | number | No | 1 | Page number |
options.perPage | number | No | 20 | Items per page (max: 100) |
Example
get()
Returns a single statement by ID.Signature
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID |
statementId | number | Yes | The statement ID |
Example
upload()
Uploads a statement PDF to a project. The file is stored and queued for processing.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | Yes | — | The project ID |
file | Buffer, Uint8Array, Blob, or string | Yes | — | The file to upload. Pass a file path as a string to read from disk. |
options.fileName | string | No | Inferred from path or upload.pdf | The file name |
options.fileType | string | No | application/pdf | MIME type |
options.onProgress | function | No | — | Upload progress callback |
Examples
Upload from file path:onProgress callback receives an object with bytesUploaded, bytesTotal, and percent fields.
Upload from Buffer:
download()
Returns a pre-signed download URL for a statement file.Signature
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID |
statementId | number | Yes | The statement ID |
Example
processes()
Returns the processing status for a statement, including staging and processing progress.Signature
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | The project ID |
statementId | number | Yes | The statement ID |