API Reference
Bank Accounts
Represents a bank account and the account that is linked to it.
Endpoints
GET /v1/bank-accounts/
GET /v1/bank-accounts/:id/
POST /v1/bank-accounts/
PATCH /v1/bank-accounts/:id/
DELETE /v1/bank-accounts/:id/
The bank account object
Attributes | Type | Description |
---|---|---|
id | string | id of the object. |
name | string | The name of the bank account. |
currency | string | The currency of the bank account. |
classification | string | One of ASSET or LIABILITY . |
sub_classification | string | One of BANK , PETTY_CASH or CREDIT_CARD . |
account | string | The id of the account underlying this bank account. |
Example
{
"id": "ba_iDp8ZyYzHc2HJDckmeGtV2",
"name": "My bank account",
"currency": "SAR",
"classification": "ASSET",
"sub_classification": "PETTY_CASH",
"account": "acc_2nqzog3ZRXegUgvLWEVJ84"
}
List bank accounts
GET /v1/bank-accounts/
Request
curl --location \
--request GET 'https://api.wafeq.com/v1/bank-accounts/?expand=account' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json'
Filters
Query param | Possible values | Description |
---|---|---|
sub_classification | One of BANK , PETTY_CASH or CREDIT_CARD | The sub classification of the bank account. |
currency | A valid currency | The currency of the bank account |
Request
curl --location \
--request GET 'https://api.wafeq.com/v1/bank-accounts/?sub_classification=BANK' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json'
Create bank account
POST /v1/bank-accounts/
Request body
Attributes | Type | Description |
---|---|---|
name | string | The name of the bank account. |
sub_classification | string | One of BANK , PETTY_CASH or CREDIT_CARD . |
currency | string | The bank account currency. |
Request
curl --location \
--request POST 'https://api.wafeq.com/v1/bank-accounts/' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "My bank account",
"currency": "SAR",
"sub_classification": "BANK"
}'
Update bank account
PATCH /v1/bank-accounts/:id/
Any change to the sub_classification
field will result in changes to the classification
and sub_classification
of the linked account.
Request body
Attributes | Type | Description |
---|---|---|
name | string | The name of the bank account. |
sub_classification | string | One of BANK , PETTY_CASH or CREDIT_CARD . |
currency | string | The bank account currency. |
Delete bank account
Delete a bank account for your organization. However you cannot delete a bank account that has been used to book an invoice or an expense.
DELETE /v1/bank-accounts/:id/