Bookings represent a stay by a resident at a care home, they indicate the duration of the stay as well as the agreed rate.
A unique Id for the booking.
The type of booking; block_contract, out_of_service, service_user.
The date/time the booking was cancelled (if cancelled).
Flag indicating the service user will check-in at the start of this.
Flag indicating that the service user will checkout at the end of this booking.
Further notes on why the service user checked out.
The date/time the booking was converted to a permanent booking after the respite to permanent rule has been applied (if converted).
The date/time the booking was created.
The date the booking ends.
The Id of the location the service user is being booked in to.
The date/time the booking was modified.
Any additional information about the booking (such as the reason a room is out of service).
For respite bookings a proposed checkout date is typically set initially until a checkout date is confirmed.
The rate charged for the booking's rate period (in pence).
The period of time the booking's rate is calculated over;daily, weekly.
The reason the service user is checking out.
Flag indicating if the booking is respite.
The Id of the room the is booked for.
The service user the booking relates to.
The date the booking starts.
{
"_id": "66bfb4c09ab4e3d6eb735792",
"booking_type": "service_user",
"cancelled": null,
"check_in": true,
"checkout": false,
"checkout_notes": null,
"converted_to_permanent": null,
"created": "2024-08-16 20:21:20",
"end_date": null,
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:20",
"notes": null,
"proposed_checkout_date": null,
"rate": 138554,
"rate_period": "weekly",
"reason_for_checkout": null,
"respite": false,
"room": "66bfb4bc9ab4e3d6eb73495e",
"service_user": "66bfb4c09ab4e3d6eb735790",
"start_date": "2022-05-27"
}
Return a list of bookings.
['_id']
A list of attributes to include for fetched objects.
A filter that allows bookings to be filtered to a list of booking types.
unset
A filter that allows bookings to be filtered by whether the booking is cancelled.
unset
A filter that allows bookings to be filtered by whether the booking requires a service user to check-in to the location.
unset
A filter that allows bookings to be filtered by whether the booking requires a service user to checkout of the location.
A filter that accepts a date and filters bookings to those that start before the given 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 bookings by the location they are for.
A filter that accepts a rate (in pence) and filters bookings to those with a rate equal to or less than the given rate.
A filter that accepts a rate (in pence) and filters bookings to those with a rate equal to or higher than the given rate.
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; checkout_notes, notes.
unset
A filter that allows bookings to be filtered by whether the booking is for respite or not (long-term/permanent).
A filter that accepts a list of room Ids and filters bookings by the room the booking relates to.
A filter that accepts a list of service user Ids and filters bookings by the service user the bookings are for.
A filter that accepts a date and filters bookings to those that end after the given date (including if the booking has no end date set).
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 bookings.
var bookings = apiClient.Request(
HttpMethod.Get,
"bookings",
new MultiValueDict()
.Add("attributes", "service_user", "start_date", "end_date")
.Add("filters-cancelled", "no")
);
<?php
$bookings = $api_client->request(
'GET',
'bookings',
[
'attributes'=>['service_user', 'start_date', 'end_date'],
'filters-cancelled'=>'no'
]
);
bookings = api_client(
'GET',
'bookings',
params={
'attributes': ['service_user', 'start_date', 'end_date'],
'filters-cancelled': 'no'
}
)
bookings = api_client.request(
'GET',
'bookings',
params: {
'attributes' => ['service_user', 'start_date', 'end_date'],
'filters-cancelled' => 'no'
}
)
{
"item_count": 95,
"items": [
{
"_id": "66bfb4c09ab4e3d6eb73569a",
"end_date": "2022-06-04",
"service_user": "66bfb4c09ab4e3d6eb735698",
"start_date": "2022-05-28"
},
{
"_id": "66bfb4c09ab4e3d6eb73569e",
"end_date": "2022-06-15",
"service_user": "66bfb4c09ab4e3d6eb73569c",
"start_date": "2022-06-10"
},
{
"_id": "66bfb4c09ab4e3d6eb7356a2",
"end_date": "2022-06-25",
"service_user": "66bfb4c09ab4e3d6eb7356a0",
"start_date": "2022-06-21"
},
{
"_id": "66bfb4c09ab4e3d6eb7356a6",
"end_date": "2022-07-03",
"service_user": "66bfb4c09ab4e3d6eb7356a4",
"start_date": "2022-06-19"
},
{
"_id": "66bfb4c09ab4e3d6eb7356aa",
"end_date": "2022-07-03",
"service_user": "66bfb4c09ab4e3d6eb7356a8",
"start_date": "2022-06-27"
},
{
"_id": "66bfb4c09ab4e3d6eb7356ae",
"end_date": "2022-07-07",
"service_user": "66bfb4c09ab4e3d6eb7356ac",
"start_date": "2022-06-23"
},
{
"_id": "66bfb4c09ab4e3d6eb7356b2",
"end_date": "2022-07-11",
"service_user": "66bfb4c09ab4e3d6eb7356b0",
"start_date": "2022-07-06"
},
{
"_id": "66bfb4c09ab4e3d6eb7356b6",
"end_date": "2022-07-25",
"service_user": "66bfb4c09ab4e3d6eb7356b4",
"start_date": "2022-07-11"
},
{
"_id": "66bfb4c09ab4e3d6eb7356ba",
"end_date": "2022-07-27",
"service_user": "66bfb4c09ab4e3d6eb7356b8",
"start_date": "2022-07-24"
},
{
"_id": "66bfb4c09ab4e3d6eb7356be",
"end_date": "2022-08-04",
"service_user": "66bfb4c09ab4e3d6eb7356bc",
"start_date": "2022-07-14"
}
],
"page": 1,
"page_count": 10,
"per_page": 10
}
var booking = apiClient.Request(HttpMethod.Get, $"bookings/{bookingId}");
<?php
$booking = $api_client->request(
'GET',
'bookings/' . $booking_id
);
booking = api_client('GET', f'bookings/{booking_id}')
booking = api_client.request('GET', "bookings/#{booking_id}")
{
"_id": "66bfb4c09ab4e3d6eb735792",
"booking_type": "service_user",
"cancelled": null,
"check_in": true,
"checkout": false,
"checkout_notes": null,
"converted_to_permanent": null,
"created": "2024-08-16 20:21:20",
"end_date": null,
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:20",
"notes": null,
"proposed_checkout_date": null,
"rate": 138554,
"rate_period": "weekly",
"reason_for_checkout": null,
"respite": false,
"room": "66bfb4bc9ab4e3d6eb73495e",
"service_user": "66bfb4c09ab4e3d6eb735790",
"start_date": "2022-05-27"
}