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": "662edc61835c6a1ad967736a",
    "care_fund_type": "662edc5a835c6a1ad9675ce4",
    "created": "2024-04-28 23:31:45",
    "description": "Savings",
    "modified": "2024-04-28 23:31:45",
    "opening_balance": 2875000,
    "opening_balance_date": "2022-04-18",
    "service_user": "662edc5d835c6a1ad9676b62"
}

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": "662edc61835c6a1ad967736a",
            "description": "Savings",
            "opening_balance": 2875000,
            "opening_balance_date": "2022-04-18",
            "service_user": "662edc5d835c6a1ad9676b62"
        },
        {
            "_id": "662edc61835c6a1ad967736c",
            "description": "House sale",
            "opening_balance": 8000000,
            "opening_balance_date": "2023-09-29",
            "service_user": "662edc5d835c6a1ad9676c1c"
        },
        {
            "_id": "662edc61835c6a1ad967736e",
            "description": "Savings",
            "opening_balance": 10000000,
            "opening_balance_date": "2024-01-29",
            "service_user": "662edc5d835c6a1ad9676b2c"
        },
        {
            "_id": "662edc61835c6a1ad9677370",
            "description": "Savings",
            "opening_balance": 18200000,
            "opening_balance_date": "2023-02-23",
            "service_user": "662edc5d835c6a1ad9676bca"
        },
        {
            "_id": "662edc61835c6a1ad9677372",
            "description": "Savings",
            "opening_balance": 16450000,
            "opening_balance_date": "2022-04-21",
            "service_user": "662edc5d835c6a1ad9676bba"
        },
        {
            "_id": "662edc61835c6a1ad9677374",
            "description": "Grant",
            "opening_balance": 8800000,
            "opening_balance_date": "2023-12-07",
            "service_user": "662edc5d835c6a1ad9676b66"
        },
        {
            "_id": "662edc61835c6a1ad9677376",
            "description": "House sale",
            "opening_balance": 32000000,
            "opening_balance_date": "2022-06-19",
            "service_user": "662edc5d835c6a1ad9676b88"
        },
        {
            "_id": "662edc61835c6a1ad9677378",
            "description": "Savings",
            "opening_balance": 15600000,
            "opening_balance_date": "2022-11-09",
            "service_user": "662edc5d835c6a1ad9676c16"
        },
        {
            "_id": "662edc61835c6a1ad967737a",
            "description": "Bridging loan",
            "opening_balance": 3800000,
            "opening_balance_date": "2024-02-29",
            "service_user": "662edc5d835c6a1ad9676c42"
        },
        {
            "_id": "662edc61835c6a1ad967737c",
            "description": "Bridging loan",
            "opening_balance": 4950000,
            "opening_balance_date": "2023-11-18",
            "service_user": "662edc5d835c6a1ad9676be6"
        }
    ],
    "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": "662edc61835c6a1ad967736a",
    "care_fund_type": "662edc5a835c6a1ad9675ce4",
    "created": "2024-04-28 23:31:45",
    "description": "Savings",
    "modified": "2024-04-28 23:31:45",
    "opening_balance": 2875000,
    "opening_balance_date": "2022-04-18",
    "service_user": "662edc5d835c6a1ad9676b62"
}