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

FieldTypeRequiredDescription
codestringyesStable code identifying the record.
namestringyesHuman-readable chart of accounts name.
account_typestringyesAccounting classification for the account, such as asset, liability, equity, revenue, or expense.
parent_codestring, optional--Code of the parent account when the chart of accounts uses a hierarchy.
cash_flow_categorystring, optional--Cash flow statement category used to classify movements for reporting.

Responses

StatusDescriptionBody
200Returns the created chart of accounts account or creation result.object
422The 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

NameInRequiredTypeDescription
codepathyesstringChart of accounts code identifying the account.

Request body

FieldTypeRequiredDescription
namestring, optional--Updated human-readable chart of accounts name.
account_typestring, optional--Accounting classification for the account, such as asset, liability, equity, revenue, or expense.
parent_codestring, optional--Code of the parent account when the chart of accounts uses a hierarchy.
is_activeboolean, optional--Whether the record or user is active.
cash_flow_categorystring, optional--Cash flow statement category used to classify movements for reporting.

Responses

StatusDescriptionBody
200Returns the updated chart of accounts account or update result.object
422The 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

NameInRequiredTypeDescription
as_ofquery--string, optionalCutoff date for the balance sheet; later postings are excluded.

Responses

StatusDescriptionBody
200Returns the requested balance sheet result.object
422The 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

NameInRequiredTypeDescription
include_inactivequery--booleanWhether to include inactive records in the result.

Responses

StatusDescriptionBody
200Returns the requested bank and card accounts.object
422The 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

FieldTypeRequiredDescription
bank_namestringyesName of the bank, card issuer, or financial institution.
account_numberstringyesBank or card account number or display identifier.
bank_typestringyesType of financial account, such as bank or card when supported.
currencystringyesCurrency code used for amounts in this record.
opening_balancenumber--Opening balance recorded for the bank or card account.
account_codestring, optional--Chart of accounts code associated with the transaction or bank account.

Responses

StatusDescriptionBody
200Returns the created bank or card account or creation result.object
422The 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

NameInRequiredTypeDescription
bank_idpathyesstringIdentifier of the bank or card account.

Responses

StatusDescriptionBody
200Returns the requested bank or card account result.object
422The 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

NameInRequiredTypeDescription
bank_idpathyesstringIdentifier of the bank or card account.

Request body

FieldTypeRequiredDescription
bank_namestring, optional--Name of the bank, card issuer, or financial institution.
account_numberstring, optional--Bank or card account number or display identifier.
bank_typestring, optional--Type of financial account, such as bank or card when supported.
currencystring, optional--Currency code used for amounts in this record.
is_activeboolean, optional--Whether the record or user is active.

Responses

StatusDescriptionBody
200Returns the updated bank or card account or update result.object
422The 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

NameInRequiredTypeDescription
date_fromquery--string, optionalStart date for the requested reporting or search period.
date_toquery--string, optionalEnd date for the requested reporting or search period.

Responses

StatusDescriptionBody
200Returns the requested cash flow statement result.object
422The 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

StatusDescriptionBody
200Returns 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

StatusDescriptionBody
200Returns 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

FieldTypeRequiredDescription
fiscal_year_endstringyesDate that closes the fiscal year being processed.

Responses

StatusDescriptionBody
200Returns the closing journal entry ID, year-end date, net income, number of entries posted and the new lock date.object
422The 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

NameInRequiredTypeDescription
date_fromquery--string, optionalStart date for the requested reporting or search period.
date_toquery--string, optionalEnd date for the requested reporting or search period.
qquery--string, optionalSearch text used to filter matching records.

Responses

StatusDescriptionBody
200Returns the requested item-expanded journal result.object
422The 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

NameInRequiredTypeDescription
date_fromquery--string, optionalStart date for the requested reporting or search period.
date_toquery--string, optionalEnd date for the requested reporting or search period.
include_linesquery--booleanWhether to include detailed ledger lines in the response.
contact_idquery--string, optionalIdentifier of the customer, supplier, or other CRM contact.

Responses

StatusDescriptionBody
200Returns the requested general ledger result.object
422The 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

FieldTypeRequiredDescription
recordsarray of AccImportRecordyesList of records included in the batch request.

Responses

StatusDescriptionBody
200Returns how many records were created, skipped or failed, with the reason for each failure.celerp_accounting__routes__BatchImportResult
422The 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

NameInRequiredTypeDescription
date_fromquery--string, optionalStart date for the requested reporting or search period.
date_toquery--string, optionalEnd date for the requested reporting or search period.
qquery--string, optionalSearch text used to filter matching records.

Responses

StatusDescriptionBody
200Returns the requested general journal result.object
422The 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

FieldTypeRequiredDescription
tsstringyesDate and time assigned to the journal entry.
memostring--Memo or narrative recorded with the accounting entry.
entriesarray of ManualJELineyesJournal entry lines containing the accounts and debit or credit amounts.
idempotency_tokenstringyesClient-supplied idempotency token identifying the manual journal operation.

Responses

StatusDescriptionBody
200Returns the created manual journal entry or creation result.object
422The 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

FieldTypeRequiredDescription
je_idsarray of stringyesIdentifiers of the journal entries to process.
reasonstring, optional--Human-readable reason for the lifecycle change, cancellation, void, or other operation.

Responses

StatusDescriptionBody
200Returns the outcome for each selected entry and counts of voided and refused entries.object
422The 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

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the requested Celerp record.

Request body

ManualJEVoidPayload, optional

Responses

StatusDescriptionBody
200Returns the voided entry and the ID of its reversing entry.object
422The 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

NameInRequiredTypeDescription
account_codepathyesstringChart of accounts code identifying the ledger account.
date_fromquery--string, optionalStart date for the requested reporting or search period.
date_toquery--string, optionalEnd date for the requested reporting or search period.
contact_idquery--string, optionalIdentifier of the customer, supplier, or other CRM contact.

Responses

StatusDescriptionBody
200Returns the requested account ledger result.object
422The 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

StatusDescriptionBody
200Returns 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

FieldTypeRequiredDescription
lock_datestring, optionalyesLatest accounting date that should be locked against normal posting changes.

Responses

StatusDescriptionBody
200Returns the updated accounting period lock or update result.object
422The 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

NameInRequiredTypeDescription
date_fromquery--string, optionalStart date for the requested reporting or search period.
date_toquery--string, optionalEnd date for the requested reporting or search period.

Responses

StatusDescriptionBody
200Returns the requested profit and loss statement result.object
422The 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

FieldTypeRequiredDescription
bank_account_idstringyesIdentifier of the related bank account record.
statement_datestringyesStatement ending date for the bank reconciliation.
statement_balancenumberyesEnding balance shown on the bank or card statement.

Responses

StatusDescriptionBody
200Returns the new reconciliation session.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Responses

StatusDescriptionBody
200Returns the requested bank reconciliation result.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Responses

StatusDescriptionBody
200Returns the result of the auto-match bank statement lines operation.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Request body

BulkConfirmPayload, optional

Responses

StatusDescriptionBody
200Returns the number of matches confirmed.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Responses

StatusDescriptionBody
200Returns the completed reconciliation session.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Responses

StatusDescriptionBody
200Returns how many statement lines were added and how many were skipped as duplicates.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Request body

FieldTypeRequiredDescription
file_idstringyesIdentifier of an uploaded file.
column_mapobject, optional--Mapping from source-file columns to the fields required for statement import.

Responses

StatusDescriptionBody
200Returns how many statement lines were added and how many were skipped as duplicates.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.
line_idpathyesstringIdentifier of the statement, document, or list line within the parent record.

Request body

FieldTypeRequiredDescription
statusstring, optional--New reconciliation status for the bank statement line.

Responses

StatusDescriptionBody
200Returns the updated bank statement line or update result.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.
line_idpathyesstringIdentifier of the statement, document, or list line within the parent record.

Responses

StatusDescriptionBody
200Returns the new attachment ID and file name.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.
line_idpathyesstringIdentifier of the statement, document, or list line within the parent record.
att_idpathyesstringIdentifier of the attachment.

Responses

StatusDescriptionBody
200Returns `removed: true` once the attachment is detached.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.
line_idpathyesstringIdentifier of the statement, document, or list line within the parent record.

Request body

FieldTypeRequiredDescription
account_codestringyesChart of accounts code associated with the transaction or bank account.
memostring--Memo or narrative recorded with the accounting entry.
amountnumber, optional--Monetary amount for the transaction or operation.
datestring, optional--Business or accounting date for the operation.
contactstring, optional--Contact information or reference associated with the transaction.

Responses

StatusDescriptionBody
200Returns the created journal entry from statement line or creation result.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.
line_idpathyesstringIdentifier of the statement, document, or list line within the parent record.

Request body

FieldTypeRequiredDescription
je_idstringyesIdentifier of the journal entry to match.
confidencestring--Confidence value associated with a proposed or selected reconciliation match.

Responses

StatusDescriptionBody
200Returns the updated statement line.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.
line_idpathyesstringIdentifier of the statement, document, or list line within the parent record.

Request body

FieldTypeRequiredDescription
splitsarray of objectyesList of account allocations used to split the statement line.

Responses

StatusDescriptionBody
200Returns the updated statement line.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.
line_idpathyesstringIdentifier of the statement, document, or list line within the parent record.

Responses

StatusDescriptionBody
200Returns the updated statement line.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Request body

FieldTypeRequiredDescription
je_idsarray of stringyesIdentifiers of the journal entries to process.

Responses

StatusDescriptionBody
200Returns the updated reconciliation session.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Responses

StatusDescriptionBody
200Returns the requested bank statement lines.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Responses

StatusDescriptionBody
200Returns the requested reconciliation workbench result.object
422The 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

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Request body

FieldTypeRequiredDescription
account_codestring--Chart of accounts code associated with the transaction or bank account.
memostring--Memo or narrative recorded with the accounting entry.

Responses

StatusDescriptionBody
200Returns the adjustment journal entry ID and the amount written off.object
422The 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

NameInRequiredTypeDescription
bank_account_idquery--string, optionalIdentifier of the bank or card account.

Responses

StatusDescriptionBody
200Returns the requested reconciliation rules.object
422The 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

FieldTypeRequiredDescription
bank_account_idstringyesIdentifier of the bank or card account this reconciliation rule applies to.
match_fieldstring--Bank statement field evaluated by the reconciliation rule.
match_patternstringyesText or pattern the selected statement field must match.
match_typestring--Matching method used to evaluate the rule pattern.
target_account_codestringyesChart of accounts code assigned when the reconciliation rule matches.
default_memostring, optional--Default journal memo to use when the reconciliation rule supplies one.
default_taxstring, optional--Default tax treatment to apply when the reconciliation rule supplies one.

Responses

StatusDescriptionBody
200Returns the created reconciliation rule or creation result.object
422The 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

NameInRequiredTypeDescription
rule_idpathyesstringIdentifier of the bank reconciliation rule.

Request body

FieldTypeRequiredDescription
match_fieldstring, optional--Bank statement field evaluated by the reconciliation rule.
match_patternstring, optional--Text or pattern the selected statement field must match.
match_typestring, optional--Matching method used to evaluate the rule pattern.
target_account_codestring, optional--Chart of accounts code assigned when the reconciliation rule matches.
default_memostring, optional--Default journal memo to use when the reconciliation rule supplies one.
default_taxstring, optional--Default tax treatment to apply when the reconciliation rule supplies one.
is_activeboolean, optional--Whether the record or user is active.

Responses

StatusDescriptionBody
200Returns the updated reconciliation rule or update result.object
422The 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

NameInRequiredTypeDescription
rule_idpathyesstringIdentifier of the bank reconciliation rule.

Responses

StatusDescriptionBody
200Returns `deleted: true` once the rule is removed.object
422The 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"

GET /accounting/soa/{contact_id}

Get Customer or Supplier Statement of Account

Return a statement of account for one customer or supplier, including opening balance, dated activity, running balance, and closing balance in the company's base currency.

Parameters

NameInRequiredTypeDescription
contact_idpathyesstringIdentifier of the customer, supplier, or other CRM contact.
date_fromquery--string, optionalStart date for the requested reporting or search period.
date_toquery--string, optionalEnd date for the requested reporting or search period.

Responses

StatusDescriptionBody
200Returns the requested customer or supplier statement of account result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X GET http://localhost:8000/accounting/soa/:contact_id \
  -H "Authorization: Bearer $TOKEN"

POST /accounting/transfers

Create Bank Transfer

Record a transfer between two bank or card accounts.

Request body

FieldTypeRequiredDescription
from_bank_idstringyesIdentifier of the source bank or card account.
to_bank_idstringyesIdentifier of the destination bank or card account.
amountnumberyesMonetary amount for the transaction or operation.
datestringyesBusiness or accounting date for the operation.
descriptionstring--Human-readable description of the bank transfer.
referencestring--External or human-readable reference for the transaction.

Responses

StatusDescriptionBody
200Returns the created bank transfer or creation result.object
422The 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

NameInRequiredTypeDescription
date_fromquery--string, optionalStart date for the requested reporting or search period.
date_toquery--string, optionalEnd date for the requested reporting or search period.

Responses

StatusDescriptionBody
200Returns the requested trial balance result.object
422The 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"