API Reference
Ledger bank transactions
Endpoints
All the endpoints related to bank transactions in the bank account ledgers need a specific bank_account
in the path.
GET /v1/bank-accounts/<bank_account_id>/ledger-transactions/
GET /v1/bank-accounts/<bank_account_id>/ledger-transactions/:id/
POST /v1/bank-accounts/<bank_account_id>/ledger-transactions/
PATCH /v1/bank-accounts/<bank_account_id>/ledger-transactions/:id/
DELETE /v1/bank-accounts/<bank_account_id>/ledger-transactions/:id/
Ledger bank transaction object
Ledger bank transactions are accounting transactions using the bank account. They can be manual
, in the sense that they were created by a user (for instance to start from a specific balance). They are not manual
when the system generated them, because an invoice / expense / bill used the bank account as the paid through account.
Attribute | Type | Description |
---|---|---|
id | string | id of the ledger bank transaction |
bank_account | string | (Readonly) id of the bank account |
account | string | id of the account |
date | string | The date of the transaction |
amount | number | The transaction amount |
description | string | A description attached to the transaction |
reference | string | A reference attached to the transaction |
is_manual | boolean | (Readonly) True when the transaction was created by a user |
Example
{
"id": "bt_KabEvYZwpUQCevDJycmVWu",
"bank_account": "ba_9t79bCG2Q6SxPxQBqva8z9",
"account": "acc_x908asdlmn298123lnm",
"date": "2019-12-29",
"amount": 1000.0,
"description": "Set bank account initial balance",
"reference": "",
"is_manual": true
}
List ledger bank transactions
GET /v1/bank-accounts/<bank_account_id>/ledger-transactions/
Request
curl --location \
--request GET 'https://api.wafeq.com/v1/bank-accounts/<bank_account_id>/ledger-transactions/' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json'
Filters
Query param | Possible values | Description |
---|---|---|
account | string | The identifier of the account. |
date_after | string | Transactions that are booked on or after the date. |
date_before | string | Transactions that are booked before the date. |
amount_min | number | Transactions with this minimum amount. |
amount_max | number | Transactions with this maximum amount. |
Request
curl --location \
--request GET 'https://api.wafeq.com/v1/bank-accounts/<bank_account_id>/ledger-transactions/?amount_max=0' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json'
Create ledger bank transactions
POST /v1/bank-accounts/<bank_account_id>/ledger-transactions/
Request body
Attribute | Type | Description |
---|---|---|
date | string | The date of the transaction |
account | string | The id of the account |
amount | number | The transaction amount |
description | string | A description attached to the transaction |
reference | string | A reference attached to the transaction |
Update ledger bank transaction
PATCH /v1/bank-accounts/<bank_account_id>/ledger-transactions/:id/
You can only update ledger bank transactions that have is_manual
set to true
.
Request body
Attributes | Type | Description |
---|---|---|
date | string | The date of the transaction |
account | string | The id of the account |
amount | number | The transaction amount |
description | string | A description attached to the transaction |
reference | string | A reference attached to the transaction |
Delete ledger bank transactions
DELETE /v1/bank-accounts/<bank_account_id>/ledger-transactions/:id/