REST API
Accounting API
Celerp accounting REST API for the chart of accounts, journal entries, general ledger, bank reconciliation, financial statements, transfers, and fiscal period controls.
Generated from the Celerp 2.5.0 OpenAPI schema, 21 September 2026.
POST /accounting/accounts
Create Chart of Accounts Account
Create a chart of accounts account from the supplied request data.
Request body
| Field | Type | Required | Description |
|---|
code | string | yes | Stable code identifying the record. |
name | string | yes | Human-readable chart of accounts name. |
account_type | string | yes | Accounting classification for the account, such as asset, liability, equity, revenue, or expense. |
parent_code | string, optional | -- | Code of the parent account when the chart of accounts uses a hierarchy. |
cash_flow_category | string, optional | -- | Cash flow statement category used to classify movements for reporting. |
Responses
| Status | Description | Body |
|---|
200 | Returns the created chart of accounts account or creation result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/accounts \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
PATCH /accounting/accounts/{code}
Update Chart of Accounts Account
Update chart of accounts account with the supplied fields.
Parameters
| Name | In | Required | Type | Description |
|---|
code | path | yes | string | Chart of accounts code identifying the account. |
Request body
| Field | Type | Required | Description |
|---|
name | string, optional | -- | Updated human-readable chart of accounts name. |
account_type | string, optional | -- | Accounting classification for the account, such as asset, liability, equity, revenue, or expense. |
parent_code | string, optional | -- | Code of the parent account when the chart of accounts uses a hierarchy. |
is_active | boolean, optional | -- | Whether the record or user is active. |
cash_flow_category | string, optional | -- | Cash flow statement category used to classify movements for reporting. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated chart of accounts account or update result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/accounting/accounts/:code \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/balance-sheet
Get Balance Sheet
Return the company's balance sheet as of the requested date using posted accounting entries.
Parameters
| Name | In | Required | Type | Description |
|---|
as_of | query | -- | string, optional | Cutoff date for the balance sheet; later postings are excluded. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested balance sheet result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/balance-sheet \
-H "Authorization: Bearer $TOKEN"
GET /accounting/bank-accounts
List Bank and Card Accounts
Return bank and card accounts matching the documented filters and pagination options.
Parameters
| Name | In | Required | Type | Description |
|---|
include_inactive | query | -- | boolean | Whether to include inactive records in the result. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested bank and card accounts. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/bank-accounts \
-H "Authorization: Bearer $TOKEN"
POST /accounting/bank-accounts
Create Bank or Card Account
Create a bank or card account from the supplied request data.
Request body
| Field | Type | Required | Description |
|---|
bank_name | string | yes | Name of the bank, card issuer, or financial institution. |
account_number | string | yes | Bank or card account number or display identifier. |
bank_type | string | yes | Type of financial account, such as bank or card when supported. |
currency | string | yes | Currency code used for amounts in this record. |
opening_balance | number | -- | Opening balance recorded for the bank or card account. |
account_code | string, optional | -- | Chart of accounts code associated with the transaction or bank account. |
Responses
| Status | Description | Body |
|---|
200 | Returns the created bank or card account or creation result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/bank-accounts \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/bank-accounts/{bank_id}
Get Bank or Card Account
Return bank or card account.
Parameters
| Name | In | Required | Type | Description |
|---|
bank_id | path | yes | string | Identifier of the bank or card account. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested bank or card account result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/bank-accounts/:bank_id \
-H "Authorization: Bearer $TOKEN"
PATCH /accounting/bank-accounts/{bank_id}
Update Bank or Card Account
Update bank or card account with the supplied fields.
Parameters
| Name | In | Required | Type | Description |
|---|
bank_id | path | yes | string | Identifier of the bank or card account. |
Request body
| Field | Type | Required | Description |
|---|
bank_name | string, optional | -- | Name of the bank, card issuer, or financial institution. |
account_number | string, optional | -- | Bank or card account number or display identifier. |
bank_type | string, optional | -- | Type of financial account, such as bank or card when supported. |
currency | string, optional | -- | Currency code used for amounts in this record. |
is_active | boolean, optional | -- | Whether the record or user is active. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated bank or card account or update result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/accounting/bank-accounts/:bank_id \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/cash-flow
Get Cash Flow Statement
Return the company's cash flow statement for the requested period, including direct and indirect cash-flow views derived from posted accounting entries.
Parameters
| Name | In | Required | Type | Description |
|---|
date_from | query | -- | string, optional | Start date for the requested reporting or search period. |
date_to | query | -- | string, optional | End date for the requested reporting or search period. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested cash flow statement result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/cash-flow \
-H "Authorization: Bearer $TOKEN"
GET /accounting/chart
Get Chart of Accounts
Return the full chart of accounts ordered by account code.
Responses
| Status | Description | Body |
|---|
200 | Returns the requested chart of accounts result. | object |
Example
curl -X GET http://localhost:8000/accounting/chart \
-H "Authorization: Bearer $TOKEN"
POST /accounting/chart/seed
Seed Default Chart of Accounts
Add any missing accounts from Celerp's default chart of accounts without replacing existing accounts.
Responses
| Status | Description | Body |
|---|
200 | Returns the account codes that were added and the ones that already existed. | object |
Example
curl -X POST http://localhost:8000/accounting/chart/seed \
-H "Authorization: Bearer $TOKEN"
POST /accounting/close-year
Close Fiscal Year
Close the selected fiscal year by clearing revenue and expense balances and transferring net income to retained earnings.
Request body
| Field | Type | Required | Description |
|---|
fiscal_year_end | string | yes | Date that closes the fiscal year being processed. |
Responses
| Status | Description | Body |
|---|
200 | Returns the closing journal entry ID, year-end date, net income, number of entries posted and the new lock date. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/close-year \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/extended-journal
Get Item-Expanded Journal
Return the general journal with item-level detail added where journal postings can be reliably tied to document lines.
Parameters
| Name | In | Required | Type | Description |
|---|
date_from | query | -- | string, optional | Start date for the requested reporting or search period. |
date_to | query | -- | string, optional | End date for the requested reporting or search period. |
q | query | -- | string, optional | Search text used to filter matching records. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested item-expanded journal result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/extended-journal \
-H "Authorization: Bearer $TOKEN"
GET /accounting/general-ledger
Get General Ledger
Return opening balance, period debits and credits, and closing balance for each account. Optionally narrow the report to a single contact and include ledger lines.
Parameters
| Name | In | Required | Type | Description |
|---|
date_from | query | -- | string, optional | Start date for the requested reporting or search period. |
date_to | query | -- | string, optional | End date for the requested reporting or search period. |
include_lines | query | -- | boolean | Whether to include detailed ledger lines in the response. |
contact_id | query | -- | string, optional | Identifier of the customer, supplier, or other CRM contact. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested general ledger result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/general-ledger \
-H "Authorization: Bearer $TOKEN"
POST /accounting/import/batch
Batch Import Accounting Records
Import multiple accounting records in one request.
Request body
| Field | Type | Required | Description |
|---|
records | array of AccImportRecord | yes | List of records included in the batch request. |
Responses
| Status | Description | Body |
|---|
200 | Returns how many records were created, skipped or failed, with the reason for each failure. | celerp_accounting__routes__BatchImportResult |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/import/batch \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/journal
Get General Journal
Return posted and voided journal entries with their lines, source-document references, and foreign-currency information. Date and search filters narrow the returned journal and its totals.
Parameters
| Name | In | Required | Type | Description |
|---|
date_from | query | -- | string, optional | Start date for the requested reporting or search period. |
date_to | query | -- | string, optional | End date for the requested reporting or search period. |
q | query | -- | string, optional | Search text used to filter matching records. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested general journal result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/journal \
-H "Authorization: Bearer $TOKEN"
POST /accounting/journal-entries
Create Manual Journal Entry
Create and post a balanced manual journal entry after validating the referenced accounts and accounting period.
Request body
| Field | Type | Required | Description |
|---|
ts | string | yes | Date and time assigned to the journal entry. |
memo | string | -- | Memo or narrative recorded with the accounting entry. |
entries | array of ManualJELine | yes | Journal entry lines containing the accounts and debit or credit amounts. |
idempotency_token | string | yes | Client-supplied idempotency token identifying the manual journal operation. |
Responses
| Status | Description | Body |
|---|
200 | Returns the created manual journal entry or creation result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/journal-entries \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
POST /accounting/journal-entries/bulk-void
Bulk Void Manual Journal Entries
Void multiple eligible manual journal entries.
Request body
| Field | Type | Required | Description |
|---|
je_ids | array of string | yes | Identifiers of the journal entries to process. |
reason | string, optional | -- | Human-readable reason for the lifecycle change, cancellation, void, or other operation. |
Responses
| Status | Description | Body |
|---|
200 | Returns the outcome for each selected entry and counts of voided and refused entries. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/journal-entries/bulk-void \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
POST /accounting/journal-entries/{entity_id}/void
Void Manual Journal Entry
Void an eligible manual journal entry while retaining it in the accounting audit trail.
Parameters
| Name | In | Required | Type | Description |
|---|
entity_id | path | yes | string | Identifier of the requested Celerp record. |
Request body
ManualJEVoidPayload, optional
Responses
| Status | Description | Body |
|---|
200 | Returns the voided entry and the ID of its reversing entry. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/journal-entries/:entity_id/void \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/ledger/{account_code}
Get Account Ledger
Return the account ledger with opening balance, posted lines, running balance, closing balance, and source-document references. Optionally filter the ledger to one customer or supplier.
Parameters
| Name | In | Required | Type | Description |
|---|
account_code | path | yes | string | Chart of accounts code identifying the ledger account. |
date_from | query | -- | string, optional | Start date for the requested reporting or search period. |
date_to | query | -- | string, optional | End date for the requested reporting or search period. |
contact_id | query | -- | string, optional | Identifier of the customer, supplier, or other CRM contact. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested account ledger result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/ledger/:account_code \
-H "Authorization: Bearer $TOKEN"
GET /accounting/period-lock
Get Accounting Period Lock
Return the current accounting period lock date.
Responses
| Status | Description | Body |
|---|
200 | Returns the requested accounting period lock result. | object |
Example
curl -X GET http://localhost:8000/accounting/period-lock \
-H "Authorization: Bearer $TOKEN"
POST /accounting/period-lock
Set Accounting Period Lock
Set the accounting period lock date used to prevent normal posting changes in closed periods.
Request body
| Field | Type | Required | Description |
|---|
lock_date | string, optional | yes | Latest accounting date that should be locked against normal posting changes. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated accounting period lock or update result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/period-lock \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/pnl
Get Profit and Loss Statement
Return the profit and loss statement for the requested period, including revenue, cost of goods sold, expenses, and resulting profit.
Parameters
| Name | In | Required | Type | Description |
|---|
date_from | query | -- | string, optional | Start date for the requested reporting or search period. |
date_to | query | -- | string, optional | End date for the requested reporting or search period. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested profit and loss statement result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/pnl \
-H "Authorization: Bearer $TOKEN"
POST /accounting/reconciliation/start
Start Bank Reconciliation
Start a bank or card reconciliation for the selected account, statement date, and ending statement balance.
Request body
| Field | Type | Required | Description |
|---|
bank_account_id | string | yes | Identifier of the related bank account record. |
statement_date | string | yes | Statement ending date for the bank reconciliation. |
statement_balance | number | yes | Ending balance shown on the bank or card statement. |
Responses
| Status | Description | Body |
|---|
200 | Returns the new reconciliation session. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/start \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/reconciliation/{session_id}
Get Bank Reconciliation
Return the selected bank reconciliation session and its current reconciliation state.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested bank reconciliation result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/reconciliation/:session_id \
-H "Authorization: Bearer $TOKEN"
POST /accounting/reconciliation/{session_id}/auto-match
Auto-Match Bank Statement Lines
Compare unmatched statement lines with eligible book entries.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Responses
| Status | Description | Body |
|---|
200 | Returns the result of the auto-match bank statement lines operation. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/auto-match \
-H "Authorization: Bearer $TOKEN"
POST /accounting/reconciliation/{session_id}/bulk-confirm
Confirm Suggested Reconciliation Matches
Confirm all currently suggested reconciliation matches.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Request body
BulkConfirmPayload, optional
Responses
| Status | Description | Body |
|---|
200 | Returns the number of matches confirmed. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/bulk-confirm \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
POST /accounting/reconciliation/{session_id}/complete
Complete Bank Reconciliation
Complete the reconciliation after the remaining difference reaches zero.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Responses
| Status | Description | Body |
|---|
200 | Returns the completed reconciliation session. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/complete \
-H "Authorization: Bearer $TOKEN"
POST /accounting/reconciliation/{session_id}/import-csv
Import Bank Statement CSV
Upload a bank statement CSV and add its lines to the reconciliation. Lines already imported are skipped.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Responses
| Status | Description | Body |
|---|
200 | Returns how many statement lines were added and how many were skipped as duplicates. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/import-csv \
-H "Authorization: Bearer $TOKEN"
POST /accounting/reconciliation/{session_id}/import-file
Import Bank Statement File
Import a supported CSV or XLSX bank statement file into the reconciliation using the supplied file and column mapping.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Request body
| Field | Type | Required | Description |
|---|
file_id | string | yes | Identifier of an uploaded file. |
column_map | object, optional | -- | Mapping from source-file columns to the fields required for statement import. |
Responses
| Status | Description | Body |
|---|
200 | Returns how many statement lines were added and how many were skipped as duplicates. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/import-file \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
PATCH /accounting/reconciliation/{session_id}/lines/{line_id}
Update Bank Statement Line
Update the selected bank statement line's reconciliation status, such as marking a line that requires no book entry.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
line_id | path | yes | string | Identifier of the statement, document, or list line within the parent record. |
Request body
| Field | Type | Required | Description |
|---|
status | string, optional | -- | New reconciliation status for the bank statement line. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated bank statement line or update result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/accounting/reconciliation/:session_id/lines/:line_id \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
POST /accounting/reconciliation/{session_id}/lines/{line_id}/attach
Attach File to Bank Statement Line
Attach a supporting file to the selected bank statement line.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
line_id | path | yes | string | Identifier of the statement, document, or list line within the parent record. |
Responses
| Status | Description | Body |
|---|
200 | Returns the new attachment ID and file name. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/lines/:line_id/attach \
-H "Authorization: Bearer $TOKEN"
DELETE /accounting/reconciliation/{session_id}/lines/{line_id}/attach/{att_id}
Remove Bank Statement Line Attachment
Remove the selected attachment from the bank statement line.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
line_id | path | yes | string | Identifier of the statement, document, or list line within the parent record. |
att_id | path | yes | string | Identifier of the attachment. |
Responses
| Status | Description | Body |
|---|
200 | Returns `removed: true` once the attachment is detached. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X DELETE http://localhost:8000/accounting/reconciliation/:session_id/lines/:line_id/attach/:att_id \
-H "Authorization: Bearer $TOKEN"
POST /accounting/reconciliation/{session_id}/lines/{line_id}/create
Create Journal Entry from Statement Line
Create a journal entry from a bank statement line and match the new entry to that line.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
line_id | path | yes | string | Identifier of the statement, document, or list line within the parent record. |
Request body
| Field | Type | Required | Description |
|---|
account_code | string | yes | Chart of accounts code associated with the transaction or bank account. |
memo | string | -- | Memo or narrative recorded with the accounting entry. |
amount | number, optional | -- | Monetary amount for the transaction or operation. |
date | string, optional | -- | Business or accounting date for the operation. |
contact | string, optional | -- | Contact information or reference associated with the transaction. |
Responses
| Status | Description | Body |
|---|
200 | Returns the created journal entry from statement line or creation result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/lines/:line_id/create \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
POST /accounting/reconciliation/{session_id}/lines/{line_id}/match
Match Statement Line to Journal Entry
Match the selected bank statement line to an existing journal entry.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
line_id | path | yes | string | Identifier of the statement, document, or list line within the parent record. |
Request body
| Field | Type | Required | Description |
|---|
je_id | string | yes | Identifier of the journal entry to match. |
confidence | string | -- | Confidence value associated with a proposed or selected reconciliation match. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated statement line. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/lines/:line_id/match \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
POST /accounting/reconciliation/{session_id}/lines/{line_id}/split
Split Bank Statement Line
Split one bank statement line across multiple accounting entries or accounts.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
line_id | path | yes | string | Identifier of the statement, document, or list line within the parent record. |
Request body
| Field | Type | Required | Description |
|---|
splits | array of object | yes | List of account allocations used to split the statement line. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated statement line. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/lines/:line_id/split \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
POST /accounting/reconciliation/{session_id}/lines/{line_id}/unmatch
Unmatch Bank Statement Line
Remove the current book-entry match from the selected statement line.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
line_id | path | yes | string | Identifier of the statement, document, or list line within the parent record. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated statement line. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/lines/:line_id/unmatch \
-H "Authorization: Bearer $TOKEN"
POST /accounting/reconciliation/{session_id}/match
Match Reconciliation Entries
Match the selected journal entries within the reconciliation.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Request body
| Field | Type | Required | Description |
|---|
je_ids | array of string | yes | Identifiers of the journal entries to process. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated reconciliation session. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/match \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/reconciliation/{session_id}/statement-lines
List Bank Statement Lines
Return the bank statement lines imported into the selected reconciliation session.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested bank statement lines. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/reconciliation/:session_id/statement-lines \
-H "Authorization: Bearer $TOKEN"
GET /accounting/reconciliation/{session_id}/workbench
Get Reconciliation Workbench
Return unresolved statement lines, unreconciled book entries, and the remaining reconciliation difference.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested reconciliation workbench result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/reconciliation/:session_id/workbench \
-H "Authorization: Bearer $TOKEN"
POST /accounting/reconciliation/{session_id}/write-off
Write Off Reconciliation Difference
Create a small adjustment journal entry to clear an eligible remaining reconciliation difference.
Parameters
| Name | In | Required | Type | Description |
|---|
session_id | path | yes | string | Identifier of the bank reconciliation session. |
Request body
| Field | Type | Required | Description |
|---|
account_code | string | -- | Chart of accounts code associated with the transaction or bank account. |
memo | string | -- | Memo or narrative recorded with the accounting entry. |
Responses
| Status | Description | Body |
|---|
200 | Returns the adjustment journal entry ID and the amount written off. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/write-off \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/rules
List Reconciliation Rules
Return bank reconciliation rules, optionally filtered to a specific bank or card account.
Parameters
| Name | In | Required | Type | Description |
|---|
bank_account_id | query | -- | string, optional | Identifier of the bank or card account. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested reconciliation rules. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/rules \
-H "Authorization: Bearer $TOKEN"
POST /accounting/rules
Create Reconciliation Rule
Create a bank reconciliation rule that matches statement data and proposes the configured accounting treatment.
Request body
| Field | Type | Required | Description |
|---|
bank_account_id | string | yes | Identifier of the bank or card account this reconciliation rule applies to. |
match_field | string | -- | Bank statement field evaluated by the reconciliation rule. |
match_pattern | string | yes | Text or pattern the selected statement field must match. |
match_type | string | -- | Matching method used to evaluate the rule pattern. |
target_account_code | string | yes | Chart of accounts code assigned when the reconciliation rule matches. |
default_memo | string, optional | -- | Default journal memo to use when the reconciliation rule supplies one. |
default_tax | string, optional | -- | Default tax treatment to apply when the reconciliation rule supplies one. |
Responses
| Status | Description | Body |
|---|
200 | Returns the created reconciliation rule or creation result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/rules \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
PATCH /accounting/rules/{rule_id}
Update Reconciliation Rule
Update the selected bank reconciliation rule.
Parameters
| Name | In | Required | Type | Description |
|---|
rule_id | path | yes | string | Identifier of the bank reconciliation rule. |
Request body
| Field | Type | Required | Description |
|---|
match_field | string, optional | -- | Bank statement field evaluated by the reconciliation rule. |
match_pattern | string, optional | -- | Text or pattern the selected statement field must match. |
match_type | string, optional | -- | Matching method used to evaluate the rule pattern. |
target_account_code | string, optional | -- | Chart of accounts code assigned when the reconciliation rule matches. |
default_memo | string, optional | -- | Default journal memo to use when the reconciliation rule supplies one. |
default_tax | string, optional | -- | Default tax treatment to apply when the reconciliation rule supplies one. |
is_active | boolean, optional | -- | Whether the record or user is active. |
Responses
| Status | Description | Body |
|---|
200 | Returns the updated reconciliation rule or update result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X PATCH http://localhost:8000/accounting/rules/:rule_id \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
DELETE /accounting/rules/{rule_id}
Delete Reconciliation Rule
Delete the selected bank reconciliation rule.
Parameters
| Name | In | Required | Type | Description |
|---|
rule_id | path | yes | string | Identifier of the bank reconciliation rule. |
Responses
| Status | Description | Body |
|---|
200 | Returns `deleted: true` once the rule is removed. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X DELETE http://localhost:8000/accounting/rules/:rule_id \
-H "Authorization: Bearer $TOKEN"
POST /accounting/transfers
Create Bank Transfer
Record a transfer between two bank or card accounts.
Request body
| Field | Type | Required | Description |
|---|
from_bank_id | string | yes | Identifier of the source bank or card account. |
to_bank_id | string | yes | Identifier of the destination bank or card account. |
amount | number | yes | Monetary amount for the transaction or operation. |
date | string | yes | Business or accounting date for the operation. |
description | string | -- | Human-readable description of the bank transfer. |
reference | string | -- | External or human-readable reference for the transaction. |
Responses
| Status | Description | Body |
|---|
200 | Returns the created bank transfer or creation result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X POST http://localhost:8000/accounting/transfers \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'
GET /accounting/trial-balance
Get Trial Balance
Return one trial-balance row per account with debit and credit totals for the requested period.
Parameters
| Name | In | Required | Type | Description |
|---|
date_from | query | -- | string, optional | Start date for the requested reporting or search period. |
date_to | query | -- | string, optional | End date for the requested reporting or search period. |
Responses
| Status | Description | Body |
|---|
200 | Returns the requested trial balance result. | object |
422 | The request failed validation. The response lists each invalid field and why. | HTTPValidationError |
Example
curl -X GET http://localhost:8000/accounting/trial-balance \
-H "Authorization: Bearer $TOKEN"