Care funds

Care funds are used to track a service user's available funds, for example the amount of personal funds an individual service user has left to pay for their private care.

The care fund object

Attributes

  • _id
    string

    A unique Id for the care fund type.

  • care_fund_type
    string

    The care fund type, e.g. Savings, Property, etc.

  • created
    string

    The date/time the care fund type was created.

  • description
    string

    A short description for the care fund to help identify a fund when there are multiple of the same type.

  • modified
    string

    The date/time the care fund type was created.

  • opening_balance
    string

    The balance in the fund on the opening date

  • opening_balance_date
    string

    The date on which the fund's balance was last set, this is effectively the opening balance.

  • service_user
    string

    The service user the fund is being tracked for.

The care fund object
{
    "_id": "6724fbd04f73a2cebf638e04",
    "care_fund_type": "6724fbc74f73a2cebf637810",
    "created": "2024-11-01 16:03:28",
    "description": "Savings",
    "modified": "2024-11-01 16:03:28",
    "opening_balance": 2875000,
    "opening_balance_date": "2022-10-21",
    "service_user": "6724fbca4f73a2cebf638674"
}

List all care funds

Return a list of care funds.

Parameters

  • attributes
    optional
    default ['_id']

    A list of attributes to include for fetched objects.

  • filters-care_fund_type
    optional

    A filter that accepts a list of care fund type Ids and filters care funds by type.

  • 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; description.

  • filters-service_user
    optional

    A filter that accepts a list of service user Ids and filters care funds by the service user they are associated with.

  • 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
    • created
    • modified
    • opening_balance

Response

Returns a page of care funds.

GET
/v1/care-funds
var careFunds = apiClient.Request(
    HttpMethod.Get,
    "care-funds",
    new MultiValueDict()
        .Add(
            "attributes",
            "description",
            "opening_balance",
            "opening_balance_date",
            "service_user"
        )
        .Add("filters-care_fund_type", careFundTypeId)
);
<?php

$care_funds = $api_client->request(
    'GET',
    'care-funds',
    [
        'attributes'=>[
            'description',
            'opening_balance',
            'opening_balance_date',
            'service_user'
        ],
        'filters-care_fund_type'=>[$care_fund_type_id]
    ]
);
care_funds = api_client(
    'GET',
    'care-funds',
    params={
        'attributes': [
            'description',
            'opening_balance',
            'opening_balance_date',
            'service_user'
        ],
        'filters-care_fund_type': [care_fund_type_id]
    }
)
care_funds = api_client.request(
    'GET',
    'care-funds',
    params: {
        'attributes' => [
            'description',
            'opening_balance',
            'opening_balance_date',
            'service_user'
        ],
        'filters-care_fund_type' => [care_fund_type_id]
    }
)
Response
{
    "item_count": 14,
    "items": [
        {
            "_id": "6724fbd04f73a2cebf638e04",
            "description": "Savings",
            "opening_balance": 2875000,
            "opening_balance_date": "2022-10-21",
            "service_user": "6724fbca4f73a2cebf638674"
        },
        {
            "_id": "6724fbd04f73a2cebf638e06",
            "description": "House sale",
            "opening_balance": 8000000,
            "opening_balance_date": "2024-04-02",
            "service_user": "6724fbca4f73a2cebf63872e"
        },
        {
            "_id": "6724fbd04f73a2cebf638e08",
            "description": "Savings",
            "opening_balance": 10000000,
            "opening_balance_date": "2024-08-02",
            "service_user": "6724fbca4f73a2cebf63863e"
        },
        {
            "_id": "6724fbd04f73a2cebf638e0a",
            "description": "Savings",
            "opening_balance": 18200000,
            "opening_balance_date": "2023-08-28",
            "service_user": "6724fbca4f73a2cebf6386dc"
        },
        {
            "_id": "6724fbd04f73a2cebf638e0c",
            "description": "Savings",
            "opening_balance": 16450000,
            "opening_balance_date": "2022-10-24",
            "service_user": "6724fbca4f73a2cebf6386cc"
        },
        {
            "_id": "6724fbd04f73a2cebf638e0e",
            "description": "Grant",
            "opening_balance": 8800000,
            "opening_balance_date": "2024-06-10",
            "service_user": "6724fbca4f73a2cebf638678"
        },
        {
            "_id": "6724fbd04f73a2cebf638e10",
            "description": "House sale",
            "opening_balance": 32000000,
            "opening_balance_date": "2022-12-22",
            "service_user": "6724fbca4f73a2cebf63869a"
        },
        {
            "_id": "6724fbd04f73a2cebf638e12",
            "description": "Savings",
            "opening_balance": 15600000,
            "opening_balance_date": "2023-05-14",
            "service_user": "6724fbca4f73a2cebf638728"
        },
        {
            "_id": "6724fbd04f73a2cebf638e14",
            "description": "Bridging loan",
            "opening_balance": 3800000,
            "opening_balance_date": "2024-09-02",
            "service_user": "6724fbca4f73a2cebf638754"
        },
        {
            "_id": "6724fbd04f73a2cebf638e16",
            "description": "Bridging loan",
            "opening_balance": 4950000,
            "opening_balance_date": "2024-05-22",
            "service_user": "6724fbca4f73a2cebf6386f8"
        }
    ],
    "page": 1,
    "page_count": 2,
    "per_page": 10
}

Retrieve a care fund

Retrieve a care fund object.

Response

Returns a care fund object.

GET
/v1/care-funds/<care_fund_id>
var careFund = apiClient.Request(
    HttpMethod.Get,
    $"care-funds/{careFundId}"
);
<?php

$care_fund = $api_client->request(
    'GET',
    'care-funds/' . $care_fund_id
);
care_fund = api_client('GET', f'care-funds/{care_fund_id}')
care_fund = api_client.request(
    'GET',
    "care-funds/#{care_fund_id}"
)
Response
{
    "_id": "6724fbd04f73a2cebf638e04",
    "care_fund_type": "6724fbc74f73a2cebf637810",
    "created": "2024-11-01 16:03:28",
    "description": "Savings",
    "modified": "2024-11-01 16:03:28",
    "opening_balance": 2875000,
    "opening_balance_date": "2022-10-21",
    "service_user": "6724fbca4f73a2cebf638674"
}