API Reference

Statement bank transactions

Endpoints

All the endpoints related to bank transactions in the bank account statements need a specific bank_account in the path.

GET /v1/bank-accounts/<bank_account_id>/statement-transactions/
GET /v1/bank-accounts/<bank_account_id>/statement-transactions/:id/
POST /v1/bank-accounts/<bank_account_id>/statement-transactions/
PATCH /v1/bank-accounts/<bank_account_id>/statement-transactions/:id/
DELETE /v1/bank-accounts/<bank_account_id>/statement-transactions/:id/

Statement bank transaction object

Statement bank transactions are the transactions usually found in bank statements. They are useful to track and compare the balance as reported by the bank (statement_balance) with the balance computed by all the transactions (calculated_balance).

AttributeTypeDescription
idstringid of the statement bank transaction
bank_accountstring(Readonly) id of the bank account
datestringThe date of the statement
amountnumberThe statement amount
statement_balancenumberThe balance as reported by the bank
calculated_balancenumber(Readonly) The balace computed from all statements
descriptionstringA description attached to the statement
referencestringA reference attached to the statement
is_postedboolean(Readonly) Whether the bank statement is reconciled

Example

{
    "id": "bt_KabEvYZwpUQCevDJycmVWu",
    "bank_account": "ba_9t79bCG2Q6SxPxQBqva8z9",
    "date": "2019-12-29",
    "amount": -1000.0,
    "statement_balance": -1000.0,
    "calculated_balance": -1000.0,
    "description": "Payment",
    "reference": "121",
    "is_posted": false
}

List statement bank transactions

GET /v1/bank-accounts/<bank_account_id>/statement-transactions/

Request

curl --location \
    --request GET 'https://api.wafeq.com/v1/bank-accounts/undefined/statement-transactions/' \
    --header 'Authorization: Api-Key <api_key>' \
    --header 'Content-Type: application/json'

Filters

Query paramPossible valuesDescription
date_afterstringStatements that are booked on or after the date.
date_beforestringStatements that are booked before the date.
amount_minnumberStatements with this minimum amount.
amount_maxnumberStatements with this maximum amount.

Request

curl --location \
    --request GET 'https://api.wafeq.com/v1/bank-accounts/undefined/statement-transactions/?amount_max=0' \
    --header 'Authorization: Api-Key <api_key>' \
    --header 'Content-Type: application/json'

Create statement bank transactions

POST /v1/bank-accounts/<bank_account_id>/statement-transactions/

Request body

AttributeTypeDescription
datestringThe date of the statement
amountnumberThe statement amount
statement_balancenumberThe balance as reported by the bank
descriptionstringA description attached to the statement
referencestringA reference attached to the statement

Update bank statement

PATCH /v1/bank-accounts/<bank_account_id>/statement-transactions/:id/

Request body

AttributesTypeDescription
datestringThe date of the statement
amountnumberThe statement amount
statement_balancenumberThe balance as reported by the bank
descriptionstringA description attached to the statement
referencestringA reference attached to the statement

Delete statement bank transactions

DELETE /v1/bank-accounts/<bank_account_id>/statement-transactions/:id/
Previous
Bank Accounts