An absence from the care home for a service user.
A unique Id for the absence.
The date/time the absense was created.
The date/time the service user is returning.
The Id of the location the service user is absent from.
The date/time the absense was modified.
Any additional information about the absence.
The service user the absence relates to.
The date/time the service user is leaving.
Flag indicating if the service user is being accompanied by a family member of friend.
Any other persons the service user is accompanied by.
Flag indicating if the service user is being accompanied by a staff member.
{
"_id": "6724fbd04f73a2cebf638e00",
"created": "2024-11-01 16:03:28",
"ends": "2024-11-08 18:00:00",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:28",
"notes": "Daughter is taking Anna to a dentist appointment.",
"reason_for_absence": "6724fbc74f73a2cebf63770e",
"service_user": "6724fbca4f73a2cebf63868a",
"starts": "2024-11-08 15:00:00",
"with_family_or_friend": true,
"with_other": "",
"with_staff": false
}
Return a list of absences for service users.
['_id']
A list of attributes to include for fetched objects.
A filter that accepts a date and filters absences to those before or on the end date.
A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.
A filter that accepts a list of location Ids and filters absences by the location the service user is absent from.
A filter that accepts a date/time and filters the items returned to those modified after the date/time.
A filter that accepts a date/time and filters the items returned to those modified before the date/time.
A case insensitive keyword filter applied to the following fields; notes.
A filter that accepts a list of group Ids and filters absences by the reason for the absence.
A filter that accepts a list of service user Ids and filters absences by the service user who is absent.
A filter that accepts a date and filters absences to those after or on the start date.
1
The page number to fetch.
10
The number of items to return per page.
_id
A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.
Returns a page of absences.
var absences = apiClient.Request(
HttpMethod.Get,
"absences",
new MultiValueDict()
.Add("attributes", "ends", "notes", "reason_for_absence", "starts"),
.Add("filters-service_user", serviceUserId)
);
<?php
$absences = $api_client->request(
'GET',
'absences',
[
'attributes'=>['ends', 'notes', 'reason_for_absence', 'starts'],
'filters-service_user'=>[$service_user_id]
]
);
absences = api_client(
'GET',
'absences',
params={
'attributes': ['ends', 'notes', 'reason_for_absence', 'starts'],
'filters-service_user': [service_user_id]
}
)
absences = api_client.request(
'GET',
'absences',
params: {
'attributes'=>['ends', 'notes', 'reason_for_absence', 'starts'],
'filters-service_user' => [$service_user_id]
}
)
{
"item_count": 1,
"items": [
{
"_id": "6724fbd04f73a2cebf638e00",
"ends": "2024-11-08 18:00:00",
"notes": "Daughter is taking Anna to a dentist appointment.",
"reason_for_absence": "6724fbc74f73a2cebf63770e",
"starts": "2024-11-08 15:00:00"
}
],
"page": 1,
"page_count": 1,
"per_page": 10
}
var absence = apiClient.Request(HttpMethod.Get, $"absences/{absenceId}");
<?php
$absence = $api_client->request('GET', 'absences/' . $absence_id);
absence = api_client('GET', f'absences/{absence_id}')
absence = api_client.request('GET', "absences/#{absence_id}")
{
"_id": "6724fbd04f73a2cebf638e00",
"created": "2024-11-01 16:03:28",
"ends": "2024-11-08 18:00:00",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:28",
"notes": "Daughter is taking Anna to a dentist appointment.",
"reason_for_absence": "6724fbc74f73a2cebf63770e",
"service_user": "6724fbca4f73a2cebf63868a",
"starts": "2024-11-08 15:00:00",
"with_family_or_friend": true,
"with_other": "",
"with_staff": false
}