POST
Add a bank statement
Organization space Accounting module For: Accountant · Permission: bank_statements.create 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.
  • money_account_id must be a bank-type money account of the organization that is already linked to an accounting account and is active.
  • end_date must not be before start_date.
  • The end date must fall inside a fiscal year of the organization book; otherwise no statement is created.
  • Optional lines (at most 500) must each fall between start_date and end_date, with a positive integer amount.
  • Opening and closing balances are required integers; they are not checked against the lines at creation, only when the statement is closed.
What else happens
  • Creates the statement in status open, with the currency taken from the fiscal year that contains end_date, and creates the sent lines unmatched.
  • created_by / created_by_type record the acting member profile or agent account. No journal entry is created.
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

book
string
required

Identifier of the book. Only the organization's own book is accepted.

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, money_account_id, label, start_date, end_date, opening_balance, closing_balance, currency_code, currency_exponent, status, reconciled_at, reconciled_by, reconciled_by_type, 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: lines.

Body

application/json
money_account_id
string
required

Bank money account of the organization the statement is for (27-character KSUID string). It must be a bank-type account that is active and linked to an accounting account.

label
string
required

Label of the statement, up to 255 characters.

Maximum string length: 255
start_date
string<date>
required

First day covered by the statement (ISO 8601 date).

end_date
string<date>
required

Last day covered by the statement. Must not be before start_date and must fall in a fiscal year of the organization book; the statement currency comes from that year.

opening_balance
integer
required

Balance of the money account at the start of the statement, an integer in minor units of the fiscal-year currency (may be negative).

closing_balance
integer
required

Balance of the money account at the end of the statement, an integer in minor units (may be negative). Closing the statement requires opening_balance plus the signed lines to equal it.

lines
object[] | null

Optional statement lines created with the statement, at most 500. Each must fall between start_date and end_date.

Maximum array length: 500

Response

Resource (only with response=resource).

id

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

money_account_id

Bank money account of the organization the statement belongs to (27-character KSUID string).

label

Label given to the statement.

start_date

First day covered by the statement (ISO 8601 date).

end_date

Last day covered by the statement (ISO 8601 date).

opening_balance
integer

Bank balance at the start of the statement, an integer in minor units (divide by 10 to the power currency_exponent). Positive when funds are at the bank.

closing_balance
integer

Bank balance at the end of the statement, an integer in minor units. Positive when funds are at the bank.

currency_code

Currency of the statement (ISO 4217 code), taken from the fiscal year containing its end date.

currency_exponent
integer

Number of decimal places of the currency (0 for XOF). An amount in minor units divided by 10 to this power gives the amount in the currency.

status

open while lines can be added and matched; reconciled once closed.

reconciled_at

Date and time the statement was closed (ISO 8601); null while open.

reconciled_by

Identifier of the member profile or agent account who closed it; null while open.

reconciled_by_type

Type of the actor who closed it; null while open.

created_by

Identifier of the member profile or agent account who created the statement; null when no actor was recorded.

created_by_type

Type of the actor who created the statement.

created_at

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

lines
array

Statement lines. Only returned when requested with ?include=lines.