Bank Transaction Statements

A bank transaction statement records how a bank transaction should be understood — its category (purchase/sale, loan, advance salary, etc.), the related business partner, an optional supporting voucher, and a free-text comment. Statements are typically created by a user to explain or substantiate a transaction that could not be matched automatically, providing the context the accounting process needs.

Bank transaction statements are nested under a bank transaction. The id in the path is the ID of the bank transaction.

Endpoints

Method Endpoint Description
GET /bank-transactions/{id}/statements List the statements attached to a bank transaction
POST /bank-transactions/{id}/statements Create a statement on a bank transaction

Authentication

All requests require a valid Authorization: Bearer token. The authenticated user must have access to the client account that owns the bank transaction; otherwise the request is rejected with 403 Forbidden.


List Bank Transaction Statements

GET /api/v2/bank-transactions/{id}/statements

Returns the statements attached to the given bank transaction as a JSON array.

Query Parameters

Parameter Type Required Description
with string No Comma-separated list of relations to include. Supported: bank_transaction, business_partner, voucher

Example Request

curl "https://api.snapbooks.com/v2/bank-transactions/123/statements?with=business_partner" \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Bank Transaction Statement

POST /api/v2/bank-transactions/{id}/statements

Creates a statement on the bank transaction. The bank_transaction_id and client_account_id are taken from the transaction in the path, and created_by_id is set to the authenticated user — any values for these fields in the request body are ignored.

Creating a statement also resolves any open accounting questions on the transaction that ask for a file to be attached or a statement to be provided: those questions are automatically closed.

Request Body

Field Type Required Description
category string No The category of the transaction. See Categories
business_partner_id integer No ID of the related business partner. Must belong to the transaction’s client account
voucher_id integer No ID of a voucher (uploaded file) that supports the transaction. Must belong to the transaction’s client account
comment string No Free-text comment

Reference Ownership

business_partner_id and voucher_id are checked against the bank transaction’s client account before the statement is stored. An id that does not exist is rejected the same way as one owned by another client account, so the response cannot be used to probe for existing ids.

Categories

category is stored as sent, up to 50 characters. The API does not check it against a list, and a longer value is not caught as a validation error: the request fails with 500 common.internal_error. The Snapbooks mobile app sends these values:

Value Description
PURCHASE_SALES Purchase or sale
DUPLICATE_PAYMENT Duplicate payment
ADVANCE_SALARY_PAYMENT Advance salary payment
LOAN_REPAYMENT Loan repayment
LOAN_GIVEN Loan given
LOAN_RECEIVED Loan received
LOAN_REPAYMENT_INTEREST_FEES Interest and fees on a loan
SECURITY_DEPOSIT Security deposit

Example Request

curl -X POST "https://api.snapbooks.com/v2/bank-transactions/123/statements" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "PURCHASE_SALES",
    "business_partner_id": 56,
    "voucher_id": 4567,
    "comment": "Office supplies from Romashka Ltd"
  }'

Example Response (201 Created)

{
  "id": 7001,
  "created_at": "2026-06-02T10:15:00Z",
  "created_by_id": 7,
  "client_account_id": 7,
  "bank_transaction_id": 123,
  "category": "PURCHASE_SALES",
  "business_partner_id": 56,
  "voucher_id": 4567,
  "comment": "Office supplies from Romashka Ltd"
}

Attributes

Attribute Type Description
id integer The unique ID of the statement (read-only)
created_at datetime When the statement was created (read-only)
created_by_id integer ID of the user that created the statement (read-only)
client_account_id integer ID of the client account the statement belongs to
bank_transaction_id integer ID of the bank transaction the statement is attached to
category string Category of the transaction. See Categories
business_partner_id integer ID of the related business partner
voucher_id integer ID of a supporting voucher (uploaded file)
comment string Free-text comment

Relations

Relation Type Description
bank_transaction Bank Transaction The bank transaction the statement is attached to
business_partner Business Partner The related business partner
voucher Voucher The supporting voucher

Relations are opt-in. Request them through with, e.g. ?with=business_partner,voucher.

Error Responses

Code HTTP Status Description
common.validation_error 400 An empty or malformed JSON body on POST, or a business_partner_id or voucher_id that does not belong to this client account
common.serialization_error 400 Valid JSON with a value that cannot be converted, for example a non-integer id
banking.client_account_access_denied 403 Bank transaction belongs to a client account the user cannot access
common.not_found 404 No bank transaction with this id; details.resource is bank_transaction
common.internal_error 415 POST without Content-Type: application/json, whether or not it has a body
common.internal_error 500 category longer than 50 characters