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.8.0 OpenAPI schema, 2 November 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 '{ ... }'

POST /accounting/accounts/import/batch

Import Chart of Accounts

Add accounts from a chart of accounts file. Existing codes are kept exactly as they are and listed as skipped, so running the same file again adds nothing. The whole chart is sent in one request so parents resolve across the file.

Request body

FieldTypeRequiredDescription
recordsarray of objectyesChart of accounts rows to import.
upsertboolean--Accepted so a client can state it. The import only adds accounts and never updates.

Responses

StatusDescriptionBody
200Returns how many accounts were created and skipped, the row errors, and the skipped codes.ChartImportResult
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/accounts/import/batch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /accounting/accounts/import/preview

Preview Chart of Accounts Import

Show what importing these chart of accounts rows would do now. Nothing is written. Each row is checked on its own, so one malformed row is reported instead of refusing the whole file. The import only adds accounts and never updates existing ones.

Request body

FieldTypeRequiredDescription
recordsarray of objectyesChart of accounts rows to import.
upsertboolean--Accepted so a client can state it. The import only adds accounts and never updates.

Responses

StatusDescriptionBody
200Returns how many accounts would be created and skipped, the row errors, and the skipped codes.ChartImportResult
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/accounts/import/preview \
  -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.
ratenumber, optional--Rate
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/bank-accounts/{bank_id}/reconciliations

List Bank Reconciliations

Every reconciliation of one bank account, newest statement date first.

Parameters

NameInRequiredTypeDescription
bank_idpathyesstringIdentifier of the bank or card account.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/accounting/bank-accounts/:bank_id/reconciliations \
  -H "Authorization: Bearer $TOKEN"

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.
reversal_datestring, optional--Reversal Date

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 '{ ... }'

GET /accounting/journal-entries/from-accountant

Journals From Accountant

The journal entries the accountant posted in these books, newest first.

Responses

StatusDescriptionBody
200Successful Responseobject

Example

curl -X GET http://localhost:8000/accounting/journal-entries/from-accountant \
  -H "Authorization: Bearer $TOKEN"

GET /accounting/journal-entries/{entity_id}/prefill

Prefill Journal

A new journal entry's fields copied from this one, dated on the first open day.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the journal entry from which to prefill a new entry.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/accounting/journal-entries/:entity_id/prefill \
  -H "Authorization: Bearer $TOKEN"

POST /accounting/journal-entries/{entity_id}/reverse

Reverse From Accountant

Reverse a journal entry the accountant posted, or undo that reversal.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the journal entry to reverse or whose reversal is to be undone.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/journal-entries/:entity_id/reverse \
  -H "Authorization: Bearer $TOKEN"

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/older-stock

List Older Stock

Return older stock placed automatically: a page each of its lots, placements, moves and corrections, a summary per inventory account, and the accounts the lots can be moved to. Each list pages from its own offset, with its total returned alongside.

Parameters

NameInRequiredTypeDescription
accountquery--string, optionalCode of the inventory account to show older stock for. Omit it to show every account.
qquery--string, optionalText to find in the SKU or name of a lot.
lots_offsetquery--integerNumber of lots to skip before the page starts.
placements_offsetquery--integerNumber of placements to skip before the page starts.
moves_offsetquery--integerNumber of moves to skip before the page starts.
corrections_offsetquery--integerNumber of corrections to skip before the page starts.
limitquery--integerNumber of rows in each page, from 1 to 500. The default is 50.

Responses

StatusDescriptionBody
200Returns the lots, placements, moves and corrections with their totals, the account summaries, and the move targets.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

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

POST /accounting/older-stock/corrections

Correct Older Stock Placements

Correct how placements treated their difference. `recognize` books what a placement left unresolved against retained earnings. `unresolve` takes what a placement recognized back off the books and leaves it unresolved. All the placements are corrected or none. A placement with nothing to move is skipped, so a correction sent twice books once.

Request body

FieldTypeRequiredDescription
placementsarray of string--Identifiers of the placements to correct.
kindstring--`recognize` to book the difference against retained earnings, or `unresolve` to leave it unresolved.

Responses

StatusDescriptionBody
200Returns the refreshed older stock view and the number of placements corrected.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/older-stock/corrections \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /accounting/older-stock/move

Move Older Stock

Move the selected older lots onto another inventory account, with their value, in one entry dated today. `key` identifies the move, so a request sent twice moves once and returns the first result. A lot already on the account is skipped. Nothing is moved when any lot cannot move, for example because an unshipped invoice holds it or the period is locked.

Request body

FieldTypeRequiredDescription
item_idsarray of string--Identifiers of the older lots to move.
codestring--Code of the inventory account to move the lots to.
keystring, optional--Client-supplied key identifying this move so the same request can be retried safely. Required, at most 64 characters.

Responses

StatusDescriptionBody
200Returns the refreshed older stock view and the `result`: the lots moved, their value, the account code and the move ID.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/older-stock/move \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /accounting/older-stock/move-all

Move All Matching Older Stock

Move every older lot that matches the `account` and `q` filters onto another inventory account as one move, across all pages. `selection` is the fingerprint of the lots the user confirmed. The request is refused when the matching lots have changed since.

Request body

FieldTypeRequiredDescription
accountstring, optional--Code of the inventory account to filter lots by.
qstring, optional--Text to find in the SKU or name of a lot.
selectionstring--Fingerprint of the matching lots the user confirmed, from the older stock view.
codestring--Code of the inventory account to move the lots to.
keystring, optional--Client-supplied key identifying this move so the same request can be retried safely. Required, at most 64 characters.

Responses

StatusDescriptionBody
200Returns the refreshed older stock view and the `result` of the move.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/older-stock/move-all \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /accounting/older-stock/moves/{move_id}/undo

Undo Older Stock Move

Put the lots of one move back on the accounts they came from, with their value, in one entry dated today. A move can be undone once, and only while every lot is still where the move put it, no unshipped invoice holds it, and the period is open.

Parameters

NameInRequiredTypeDescription
move_idpathyesstringIdentifier of the older stock move to undo.

Responses

StatusDescriptionBody
200Returns the refreshed older stock view.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/older-stock/moves/:move_id/undo \
  -H "Authorization: Bearer $TOKEN"

POST /accounting/older-stock/retry

Retry Older Stock Placement

Try again to place the older stock that is still waiting for an account, after a failure.

Responses

StatusDescriptionBody
200Returns the refreshed older stock view and the number of lots placed.object

Example

curl -X POST http://localhost:8000/accounting/older-stock/retry \
  -H "Authorization: Bearer $TOKEN"

GET /accounting/opening-tie-out

Get Opening Balance Tie-Out

Compare the documents imported as already in the opening balances with what the ledger holds on the opening balance date. It is read only: a difference is shown, never corrected. With no opening balance date set there is nothing to compare, so `checks` is empty.

Responses

StatusDescriptionBody
200Returns the opening balance date, the base currency, and each check with its ledger amount, expected amount, difference and documents.object

Example

curl -X GET http://localhost:8000/accounting/opening-tie-out \
  -H "Authorization: Bearer $TOKEN"

POST /accounting/peer/added/{item_id}

Settle Peer Added

Keep an account sync added, archive it, or remove it while it is unused; each closes its notice. Remove also drops the link, so a later record adds it again.

Parameters

NameInRequiredTypeDescription
item_idpathyesstringIdentifier of the added-account synchronization item to settle.

Request body

FieldTypeRequiredDescription
actionstringyesAction

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/peer/added/:item_id \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /accounting/peer/holds

Peer Holds

Records a connected company sent that wait for one of their accounts to be fixed, and the accounts sync added here, newest first; each added account says whether it can still be removed, or why it can only be archived.

Responses

StatusDescriptionBody
200Successful Responseobject

Example

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

POST /accounting/peer/holds/{item_id}/fix

Fix Peer Hold

Use another account for a held record's account, add it under a free code, or unarchive the account it posts to; the record posts on the next sync, and until then it shows as fixed (a sync that holds it again replaces its fix).

Parameters

NameInRequiredTypeDescription
item_idpathyesstringIdentifier of the held accounting synchronization item to resolve.

Request body

FieldTypeRequiredDescription
actionstringyesAction
accountstring, optional--Account
codestring, optional--Code

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/peer/holds/:item_id/fix \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /accounting/peer/journals

Peer Journal Feed

This company's own journal entries, for the client its key belongs to; a connected company's key only.

Parameters

NameInRequiredTypeDescription
afterquery--stringOptional cursor identifying the point after which journal entries should be returned.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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

POST /accounting/peer/journals

Peer Journal Receive

A client's journal entries and its answers to this company's; a connected company's key only.

Request body

FieldTypeRequiredDescription
recordsarray of PeerJournalRecordyesRecords

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/peer/journals \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /accounting/peer/lock

Peer Lock

This company's lock date, for the client its key belongs to.

Responses

StatusDescriptionBody
200Successful Responseobject

Example

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

GET /accounting/peer/review

Peer Review

Each client whose accounts wait for this company's review, with the accounts.

Responses

StatusDescriptionBody
200Successful Responseobject

Example

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

POST /accounting/peer/review

Answer Peer Review

Link or add a client's reviewed accounts; ``finish`` ends the review.

Request body

FieldTypeRequiredDescription
source_company_idstringyesSource Company Id
finishboolean--Finish
answersarray of PeerReviewAnswer--Answers

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/peer/review \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

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"

GET /accounting/posting-accounts

List Posting Accounts

Return each posting role's account and whether it can take new postings, with the older stock candidates for each inventory account.

Responses

StatusDescriptionBody
200Returns the posting roles and the older stock candidates.object

Example

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

PUT /accounting/posting-accounts/{role}

Set Posting Account

Point a role at another account for new postings. Balances already posted stay where they are; the earlier account stays with the role for them. Fixing Purchased inventory or Retained earnings places older stock that waited on it at once, and the notice of missing posting accounts follows what is still missing.

Parameters

NameInRequiredTypeDescription
rolepathyesstringAccounting role the account is posted for.

Request body

FieldTypeRequiredDescription
codestringyesCode

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X PUT http://localhost:8000/accounting/posting-accounts/:role \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

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.
ratenumber, optional--Rate

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.
ratenumber, optional--Rate

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 '{ ... }'

POST /accounting/reconciliation/{session_id}/reopen

Put a completed reconciliation back in progress

Reopen a completed reconciliation so its matches can be changed. Its matches stay as they are and no journal entry is written; the reopening is recorded as an event. Reopening one that is already in progress changes nothing.

Parameters

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the reconciliation session.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/reopen \
  -H "Authorization: Bearer $TOKEN"

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"

POST /accounting/reconciliation/{session_id}/unmatch

Undo matching book entries that no statement line holds

The undo of ``match_reconciliation``. An entry a statement line holds is let go of by undoing that line, so the line and the session never disagree.

Parameters

NameInRequiredTypeDescription
session_idpathyesstringIdentifier of the bank reconciliation session.

Request body

FieldTypeRequiredDescription
je_idsarray of stringyesIdentifiers of the journal entries to process.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/accounting/reconciliation/:session_id/unmatch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

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, optional--Chart of accounts code associated with the transaction or bank account.
memostring--Memo or narrative recorded with the accounting entry.
ratenumber, optional--Rate

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.
ratenumber, optional--Rate
to_amountnumber, optional--To Amount

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"