POST
Match statement to entries
Organization space Accounting module For: Accountant · Permission: bank_statements.match Conditions
  • The accounting module must be active for the organization.
  • The caller must have been granted access to the book in the URL.
  • Only the organization’s own book is accepted; a company book or a client book is refused.
  • The statement must still be open; a reconciled statement is refused.
  • statement_line_ids and journal_line_ids are both required, with 1 to 1000 distinct ids each.
  • Every statement line must belong to this statement and every book line must be a line of the organization book on the money account’s accounting account.
  • A line that is already matched cannot be matched again.
  • The signed sum of the statement lines must equal the signed sum of the book lines (debit positive, credit negative).
  • Lines of a carry-forward restatement are not eligible.
What else happens
  • Creates one match record and links all the given statement lines and book lines to it, marking them as reconciled.
  • No journal entry is created; the match only marks lines as explained.
Part of Reconcile bank statements.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

bankStatement
string
required

Identifier of the book segment of the URL (the organization's book); see book.

bank_statement
string
required

Identifier of the open bank statement the match is made on (27-character KSUID string).

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, bank_statement_id, created_by, created_by_type, created_at.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: statementLines, journalLines, journalLines.account.

Body

application/json

Ids are not checked for existence here: the service answers the same error for any line outside the statement or its bank account, so nothing tells whether an id exists elsewhere.

statement_line_ids
string[]
required

Identifiers of the statement lines to match (27-character KSUID strings), 1 to 1000, no duplicates. They must belong to this statement and be unmatched.

Required array length: 1 - 1000 elements
journal_line_ids
string[]
required

Identifiers of the book (journal) lines on the money account's accounting account to match (27-character KSUID strings), 1 to 1000, no duplicates. They must be unmatched. Their signed sum must equal that of the statement lines.

Required array length: 1 - 1000 elements

Response

Resource (only with response=resource).

id

Identifier of the match (27-character KSUID string).

bank_statement_id

Statement the match belongs to (27-character KSUID string).

created_by

Identifier of the member profile or agent account who made the match, or null for no recorded actor.

created_by_type

Type of the actor who made the match.

created_at

Date and time the record was created (ISO 8601, UTC).

statement_lines
array

Statement lines linked by the match. Only returned when requested with ?include=statementLines.

journal_lines
array

Book (journal) lines linked by the match. Only returned when requested with ?include=journalLines, and only to callers with the permission journal_entries.retrieve.