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": "66bfb4d09ab4e3d6eb735eee",
    "care_fund_type": "66bfb4bc9ab4e3d6eb734916",
    "created": "2024-08-16 20:21:36",
    "description": "Savings",
    "modified": "2024-08-16 20:21:36",
    "opening_balance": 2875000,
    "opening_balance_date": "2022-08-05",
    "service_user": "66bfb4c09ab4e3d6eb73577a"
}

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": "66bfb4d09ab4e3d6eb735eee",
            "description": "Savings",
            "opening_balance": 2875000,
            "opening_balance_date": "2022-08-05",
            "service_user": "66bfb4c09ab4e3d6eb73577a"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735ef0",
            "description": "House sale",
            "opening_balance": 8000000,
            "opening_balance_date": "2024-01-16",
            "service_user": "66bfb4c19ab4e3d6eb735834"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735ef2",
            "description": "Savings",
            "opening_balance": 10000000,
            "opening_balance_date": "2024-05-17",
            "service_user": "66bfb4c09ab4e3d6eb735744"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735ef4",
            "description": "Savings",
            "opening_balance": 18200000,
            "opening_balance_date": "2023-06-12",
            "service_user": "66bfb4c09ab4e3d6eb7357e2"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735ef6",
            "description": "Savings",
            "opening_balance": 16450000,
            "opening_balance_date": "2022-08-08",
            "service_user": "66bfb4c09ab4e3d6eb7357d2"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735ef8",
            "description": "Grant",
            "opening_balance": 8800000,
            "opening_balance_date": "2024-03-25",
            "service_user": "66bfb4c09ab4e3d6eb73577e"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735efa",
            "description": "House sale",
            "opening_balance": 32000000,
            "opening_balance_date": "2022-10-06",
            "service_user": "66bfb4c09ab4e3d6eb7357a0"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735efc",
            "description": "Savings",
            "opening_balance": 15600000,
            "opening_balance_date": "2023-02-26",
            "service_user": "66bfb4c19ab4e3d6eb73582e"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735efe",
            "description": "Bridging loan",
            "opening_balance": 3800000,
            "opening_balance_date": "2024-06-17",
            "service_user": "66bfb4c19ab4e3d6eb73585a"
        },
        {
            "_id": "66bfb4d09ab4e3d6eb735f00",
            "description": "Bridging loan",
            "opening_balance": 4950000,
            "opening_balance_date": "2024-03-06",
            "service_user": "66bfb4c09ab4e3d6eb7357fe"
        }
    ],
    "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": "66bfb4d09ab4e3d6eb735eee",
    "care_fund_type": "66bfb4bc9ab4e3d6eb734916",
    "created": "2024-08-16 20:21:36",
    "description": "Savings",
    "modified": "2024-08-16 20:21:36",
    "opening_balance": 2875000,
    "opening_balance_date": "2022-08-05",
    "service_user": "66bfb4c09ab4e3d6eb73577a"
}