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": "66bfb4d09ab4e3d6eb735eea",
"created": "2024-08-16 20:21:36",
"ends": "2024-08-23 18:00:00",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:36",
"notes": "Daughter is taking Anna to a dentist appointment.",
"reason_for_absence": "66bfb4bb9ab4e3d6eb73481e",
"service_user": "66bfb4c09ab4e3d6eb735790",
"starts": "2024-08-23 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": "66bfb4d09ab4e3d6eb735eea",
"ends": "2024-08-23 18:00:00",
"notes": "Daughter is taking Anna to a dentist appointment.",
"reason_for_absence": "66bfb4bb9ab4e3d6eb73481e",
"starts": "2024-08-23 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": "66bfb4d09ab4e3d6eb735eea",
"created": "2024-08-16 20:21:36",
"ends": "2024-08-23 18:00:00",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:36",
"notes": "Daughter is taking Anna to a dentist appointment.",
"reason_for_absence": "66bfb4bb9ab4e3d6eb73481e",
"service_user": "66bfb4c09ab4e3d6eb735790",
"starts": "2024-08-23 15:00:00",
"with_family_or_friend": true,
"with_other": "",
"with_staff": false
}