PUT
Edit a bank statement
Organization space Accounting module For: Accountant · Permission: bank_statements.update 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.
  • The statement must have no match; undo its matches first.
  • Only the fields sent change; start_date must stay on or before end_date.
  • When the dates change, every existing line must still fall inside the new dates.
  • Changing end_date re-reads the currency from the fiscal year containing the new end date, and that date must fall inside a fiscal year.
What else happens
  • The currency code and exponent of the statement follow the fiscal year of the new end date when end_date changes. Nothing else is changed.
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 bank statement to edit (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, 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
label
string | null

New label, up to 255 characters; left unchanged when omitted.

Maximum string length: 255
start_date
string<date>

New first day covered (ISO 8601 date); left unchanged when omitted. Existing lines must stay inside the dates.

end_date
string<date>

New last day covered (ISO 8601 date); left unchanged when omitted. Must fall in a fiscal year; the statement currency is re-read from it.

opening_balance
integer

New opening balance, an integer in minor units; left unchanged when omitted.

closing_balance
integer

New closing balance, an integer in minor units; left unchanged when omitted.

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.