Care fund types

Care fund types can be created to track the remaining funds available for a service user and predict when these funds will be depleted.

The care fund type object

Attributes

  • _id
    string

    A unique Id for the care fund type.

  • created
    string

    The date/time the care fund type was created.

  • days_before_notification
    integer

    The number of days prior to the fund being depleted to zero that notification should be sent to subscribed users.

  • modified
    string

    The date/time the care fund type was created.

  • name
    string

    A unique name for the fund type (e.g. private fund).

The care fund type object
{
    "_id": "6724fbc74f73a2cebf637810",
    "created": "2024-11-01 16:03:19",
    "days_before_notification": 180,
    "modified": "2024-11-01 16:03:19",
    "name": "Self-funding reserve"
}

List all care fund types

Return a list of care fund types.

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; name.

  • 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
    • name

Response

Returns a page of care fund types.

GET
/v1/care-fund-types
var careFundTypes = apiClient.Request(
    HttpMethod.Get,
    "care-fund-types",
    new MultiValueDict()
        .Add("attributes", "name")
);
<?php

$care_fund_types = $api_client->request(
    'GET',
    'care-fund-types',
    ['attributes'=>['name']]
);
care_fund_types = api_client(
    'GET',
    'care-fund-types',
    params={'attributes': ['name']}
)
care_fund_types = api_client.request(
    'GET',
    'care-fund-types',
    params: {'attributes' => ['name']}
)
Response
{
    "item_count": 1,
    "items": [
        {
            "_id": "6724fbc74f73a2cebf637810",
            "name": "Self-funding reserve"
        }
    ],
    "page": 1,
    "page_count": 1,
    "per_page": 10
}

Retrieve a care fund type

Retrieve a care fund type object.

Response

Returns a care fund type object.

GET
/v1/care-fund-types/<care_fund_type_id>
var careFundType = apiClient.Request(
    HttpMethod.Get,
    $"care-fund-types/{careFundTypeId}"
);
<?php

$care_fund_type = $api_client->request(
    'GET',
    'care-fund-types/' . $care_fund_type_id
);
care_fund_type = api_client('GET', f'care-fund-types/{care_fund_type_id}')
care_fund_type = api_client.request(
    'GET',
    "care-fund-types/#{care_fund_type_id}"
)
Response
{
    "_id": "6724fbc74f73a2cebf637810",
    "created": "2024-11-01 16:03:19",
    "days_before_notification": 180,
    "modified": "2024-11-01 16:03:19",
    "name": "Self-funding reserve"
}