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

AttributesTypeDescription
idstringid of the object.
namestringThe name of the bank account.
currencystringThe currency of the bank account.
classificationstringOne of ASSET or LIABILITY.
sub_classificationstringOne of BANK, PETTY_CASH or CREDIT_CARD.
accountstringThe 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 paramPossible valuesDescription
sub_classificationOne of BANK, PETTY_CASH or CREDIT_CARDThe sub classification of the bank account.
currencyA valid currencyThe 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

AttributesTypeDescription
namestringThe name of the bank account.
sub_classificationstringOne of BANK, PETTY_CASH or CREDIT_CARD.
currencystringThe 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

AttributesTypeDescription
namestringThe name of the bank account.
sub_classificationstringOne of BANK, PETTY_CASH or CREDIT_CARD.
currencystringThe 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/
Previous
Accounts