POST
Match lines together (client account)
Client space Accounting module For: Accountant · Permission: letterings.create Conditions
  • The book is the one selected for the request: the {book} segment in the organization space, or the client account’s own books in the client space.
  • The accounting module must be included in the plan of the organization.
  • The book must be set up for accounting (it must have at least one journal).
  • accounting_account_id is required and must be an account of this book.
  • line_ids is required: 2 to 1000 distinct line identifiers, each of a journal line of this book, otherwise validation fails.
  • The account must be postable and its code must start with 4 (third-party accounts).
  • Every line must belong to the chosen account; a line of another account, or a carry-forward restatement line, is refused.
  • No line may already be matched.
  • The total of the debit lines must equal the total of the credit lines.
What else happens
  • Creates one match with the next code of the account (AAA, AAB, … AAZ, ABA, … ZZZ, then AAAA) and stamps it with the current time and the acting member or agent account.
  • Marks every chosen journal line as matched, so the lines leave the open items and the aged balance.
Part of Match open items.

Authorizations

Authorization
string
header
required

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

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, accounting_account_id, code, lettered_at, created_by, created_by_type, lines_count, total_debit, total_credit, 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: .

Response

Resource (only with response=resource).

id

Identifier of the match, a 27-character KSUID.

accounting_account_id

Identifier of the third-party account whose lines are matched.

code

Match code, unique per account: AAA, AAB, ... ZZZ, then AAAA. Lines sharing a code are settled against each other.

lettered_at

Moment the match was made, ISO 8601.

created_by

Identifier of the member or agent account that made the match; null when none could be resolved.

created_by_type

Kind of actor in created_by (member or agent account); null when none could be resolved.

lines_count
integer

Number of journal lines in the match.

total_debit
integer

Sum of the debit lines of the match, in minor units (divide by 10 to the power currency_exponent).

total_credit
integer

Sum of the credit lines of the match, in minor units. Equals total_debit.

created_at

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