Bank accounts

A bank account managed under the account, typically associated with a location (care home).

The bank account object

Attributes

  • _id
    string

    A unique Id for the bank account.

  • account_name
    string

    The bank account's name eg John Smith.

  • account_number
    string

    A unique account number.

  • bank_name
    string

    The name of the bank the account is held with.

  • cash_book
    string

    The cash book the bank account is associated with.

  • company
    string

    The company the bank account is associated with.

  • created
    string

    The date/time the bank account was created.

  • description
    string

    A description of the bank account (e.g. Current account).

  • location
    string

    The location the bank account is associated with.

  • modified
    string

    The date/time the bank account was modified.

  • sort_code
    string

    The sort code of the bank account.

The bank account object
{
    "_id": "6932cdf13550e2b34494c257",
    "account_name": "DOUGLAS COURT",
    "account_number": "12345678",
    "bank_name": "HSBC",
    "cash_book": "6932cde23550e2b34494ab9d",
    "company": null,
    "created": "2025-12-05 12:20:01",
    "description": "Current",
    "location": "6932cde23550e2b34494abad",
    "modified": "2025-12-05 12:20:01",
    "sort_code": "121212"
}

List all bank accounts

Return a list of bank accounts setup for your account on CareHQ.

Parameters

  • attributes
    optional
    default ['_id']

    A list of attributes to include for fetched objects.

  • filters-ids
    optional

    A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.

  • filters-modified_after
    optional

    A filter that accepts a date/time and filters the items returned to those modified after the date/time.

  • filters-modified_before
    optional

    A filter that accepts a date/time and filters the items returned to those modified before the date/time.

  • filters-q
    optional

    A case insensitive keyword filter applied to the following fields; account_name, account_number, archived, bank_name, cash_book, company, description, location, sort_code.

  • page
    optional
    default 1

    The page number to fetch.

  • per_page
    optional
    default 10

    The number of items to return per page.

  • sort_by
    optional
    default _id

    A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.

    • _id
    • account_name
    • account_number
    • bank_name
    • company
    • created
    • description
    • location
    • modified
    • sort_code

Response

Returns a page of bank accounts.

GET
/v1/bank-accounts
var bankAccounts = apiClient.Request(
    HttpMethod.Get,
    "bank-accounts",
    new MultiValueDict()
        .Add("attributes", "name", "description")
);
<?php

$bank_accounts = $api_client->request(
    'GET',
    'bank-accounts',
    [
        'attributes'=>['name','description']
    ]
);
bank_accounts = api_client(
    'GET',
    'bank-accounts',
    params={
        'attributes': ['name','description']
    }
)
bank_accounts = api_client.request(
    'GET',
    'bank-accounts',
    params: {
        'attributes' => ['name','description']
    }
)
Response
{
    "item_count": 3,
    "items": [
        {
            "_id": "6932cdf13550e2b34494c255",
            "description": "Direct debit"
        },
        {
            "_id": "6932cdf13550e2b34494c257",
            "description": "Current"
        },
        {
            "_id": "6932cdf13550e2b34494c259",
            "description": "Current"
        }
    ],
    "page": 1,
    "page_count": 1,
    "per_page": 10
}

Retrieve a bank account

Retrieve a bank account object.

Response

Returns a bank account object.

GET
/v1/bank-accounts/<bank_account_id>
var bankAccount = apiClient.Request(
    HttpMethod.Get, 
    $"bank-accounts/{bankAccountId}"
);
<?php

$bank_account = $api_client->request(
    'GET',
    'bank-accounts/' . $bank_account_id
);
bank_account = api_client('GET', f'bank-accounts/{bank_account_id}')
bank_account = api_client.request('GET', "bank-accounts/#{bank_account_id}")
Response
{
    "_id": "6932cdf13550e2b34494c257",
    "account_name": "DOUGLAS COURT",
    "account_number": "12345678",
    "bank_name": "HSBC",
    "cash_book": "6932cde23550e2b34494ab9d",
    "company": null,
    "created": "2025-12-05 12:20:01",
    "description": "Current",
    "location": "6932cde23550e2b34494abad",
    "modified": "2025-12-05 12:20:01",
    "sort_code": "121212"
}