Bookings

Bookings represent a stay by a resident at a care home, they indicate the duration of the stay as well as the agreed rate.

The booking object

Attributes

  • _id
    string

    A unique Id for the booking.

  • booking_type
    string

    The type of booking; block_contract, out_of_service, service_user.

  • cancelled
    string

    The date/time the booking was cancelled (if cancelled).

  • check_in
    boolean

    Flag indicating the service user will check-in at the start of this booking.

  • checkout
    boolean

    Flag indicating that the service user will checkout at the end of this booking.

  • checkout_notes
    string

    Further notes on why the service user checked out.

  • created
    string

    The date/time the booking was created.

  • end_date
    string

    The date the booking ends.

  • location
    string

    The Id of the location the service user is being booked in to.

  • modified
    string

    The date/time the booking was modified.

  • notes
    string

    Any additional information about the booking (such as the reason a room is out of service).

  • proposed_checkout_date
    string

    For rolling respite bookings a proposed checkout date is may be set initially until a checkout date is confirmed.

  • rate
    string

    The rate charged for the booking's rate period (in pence).

  • rate_period
    string

    The period of time the booking's rate is calculated over;daily, weekly.

  • reason_for_checkout
    string

    The reason the service user is checking out.

  • respite
    boolean

    Flag indicating if the booking is respite.

  • room
    string

    The Id of the room the is booked for.

  • service_user
    string

    The service user the booking relates to.

  • start_date
    string

    The date the booking starts.

The booking object
{
    "_id": "69b29b8985f06fda012b2ff5",
    "booking_type": "service_user",
    "cancelled": null,
    "check_in": true,
    "checkout": false,
    "checkout_notes": null,
    "created": "2026-03-12 10:55:05",
    "end_date": null,
    "location": "69b29b8485f06fda012b2159",
    "modified": "2026-03-12 10:55:05",
    "notes": null,
    "proposed_checkout_date": null,
    "rate": 138554,
    "rate_period": "weekly",
    "reason_for_checkout": null,
    "respite": false,
    "room": "69b29b8585f06fda012b21b9",
    "service_user": "69b29b8985f06fda012b2ff3",
    "start_date": "2023-12-21"
}

Create a booking

Parameters

  • booking_type
    required

    The type of booking. Currently this must be set to service_user.

    • service_user
  • check_in
    optional

    A boolean indicating if the service user will check-in at the start of this booking.

  • checkout
    optional

    A boolean indicating if the service user will checkout at the end of this booking.

  • checkout_notes
    optional

    Notes on why the service user checked out.

  • end_date
    optional

    The date the booking ends.

  • notes
    optional

    Any additional information about the booking.

  • proposed_checkout_date
    optional

    For rolling respite bookings a proposed checkout date may be set initially until a checkout date is confirmed.

  • rate
    required

    The rate charged for the booking's rate period (in pence).

  • rate_period
    required

    The period of time the booking's rate is calculated over.

    • daily
    • weekly
  • reason_for_checkout
    optional

    The reason for the service user checking out at the end of the booking (only applicable if the checkout flag is set for the booking).

  • respite
    optional

    A boolean indicating if the booking is for a respite stay.

  • room
    required

    The Id of the room being booked.

  • service_user
    required

    The Id of the service user the booking relates to.

  • start_date
    optional

    The date the booking starts.

Response

Returns the booking object created.

PUT
/v1/bookings
var bookings = apiClient.Request(
    HttpMethod.Put,
    "bookings",
    null,
    new MultDict()
        .Add("booking_type", "service_user")
        .Add("check_in", "yes"),
        .Add("rate", 100000),
        .Add("rate_period", "weekly"),
        .Add("room", room_id),
        .Add("service_user", serviceUserId),
        .Add("start_date", "2026-02-23")
);
const bookings = await apiClient.request(
    "PUT",
    "bookings",
    {
        "data": {
            "booking_type': 'service_user',
            "check_in': 'yes',
            "rate': 100000,
            "rate_period': 'weekly',
            "room': roomId,
            "service_user': serviceUserId,
            "start_date": '2026-02-23'
        }
    }
)
<?php

$bookings = $api_client->request(
    'PUT',
    'bookings',
    NULL
    [
        'booking_type'=>'service_user',
        'check_in'=>'yes',
        'rate'=>100000,
        'rate_period'=>'weekly',
        'room'=>$room_id,
        'service_user'=>$service_user_id,
        'start_date'=>'2026-02-23'
    ]
);
booking = api_client(
    'PUT',
    'bookings',
    data={
        'booking_type': 'service_user',
        'check_in': 'yes',
        'rate': 100000,
        'rate_period': 'weekly',
        'room': room_id,
        'service_user': service_user_id,
        'start_date': check_in_date.isoformat()
    }
)
bookings = api_client.request(
    'PUT',
    'bookings',
    data: {
        'booking_type' => 'service_user',
        'check_in' => 'yes',
        'rate' => 100000,
        'rate_period' => 'weekly',
        'room' => service_user_id,
        'service_user' => room_id,
        'start_date' => '2026-02-23'
    }
)
Response
{
    "_id": "69b29b998b74d74a815f0a8b",
    "booking_type": "service_user",
    "cancelled": null,
    "check_in": true,
    "checkout": false,
    "checkout_notes": "",
    "created": "2026-03-12 10:55:21",
    "end_date_str": null,
    "location": "69b29b8485f06fda012b215b",
    "modified": "2026-03-12 10:55:21",
    "notes": "",
    "proposed_checkout_date_str": null,
    "rate": 100000,
    "rate_period": "weekly",
    "reason_for_checkout": null,
    "respite": false,
    "room": "69b29b8585f06fda012b21e1",
    "service_user": "69b29b8985f06fda012b2f87",
    "start_date_str": "2026-03-12"
}

List all bookings

Return a list of bookings.

Parameters

  • attributes
    optional
    default ['_id']

    A list of attributes to include for fetched objects.

  • filters-booking_type
    optional

    A filter that allows bookings to be filtered to a list of booking types.

    • block_contract
    • out_of_service
    • service_user
  • filters-cancelled
    optional
    default unset

    A filter that allows bookings to be filtered by whether the booking is cancelled.

    • unset
    • yes
    • no
  • filters-check_in
    optional
    default unset

    A filter that allows bookings to be filtered by whether the booking requires a service user to check-in to the location.

    • unset
    • yes
    • no
  • filters-checkout
    optional
    default unset

    A filter that allows bookings to be filtered by whether the booking requires a service user to checkout of the location.

    • unset
    • yes
    • no
  • filters-end_date
    optional

    A filter that accepts a date and filters bookings to those that start before the given date.

  • 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-location
    optional

    A filter that accepts a list of location Ids and filters bookings by the location they are for.

  • filters-max_rate
    optional

    A filter that accepts a rate (in pence) and filters bookings to those with a rate equal to or less than the given rate.

  • filters-min_rate
    optional

    A filter that accepts a rate (in pence) and filters bookings to those with a rate equal to or higher than the given rate.

  • 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; checkout_notes, notes.

  • filters-respite
    optional
    default unset

    A filter that allows bookings to be filtered by whether the booking is for respite or not (long-term/permanent).

    • unset
    • yes
    • no
  • filters-room
    optional

    A filter that accepts a list of room Ids and filters bookings by the room the booking relates to.

  • filters-service_user
    optional

    A filter that accepts a list of service user Ids and filters bookings by the service user the bookings are for.

  • filters-start_date
    optional

    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).

  • 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
    • end_date
    • modified
    • start_date

Response

Returns a page of bookings.

GET
/v1/bookings
var bookings = apiClient.Request(
    HttpMethod.Get,
    "bookings",
    new MultiValueDict()
        .Add("attributes", "service_user", "start_date", "end_date")
        .Add("filters-cancelled", "no")
);
const bookings = await apiClient.request(
    "GET",
    "bookings",
    {
        "params": {
            "attributes": ["service_user", "start_date", "end_date"],
            "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'
    }
)
Response
{
    "item_count": 96,
    "items": [
        {
            "_id": "69b29b8885f06fda012b2efd",
            "end_date": "2023-12-29",
            "service_user": "69b29b8885f06fda012b2efb",
            "start_date": "2023-12-22"
        },
        {
            "_id": "69b29b8885f06fda012b2f01",
            "end_date": "2024-01-09",
            "service_user": "69b29b8885f06fda012b2eff",
            "start_date": "2024-01-04"
        },
        {
            "_id": "69b29b8885f06fda012b2f05",
            "end_date": "2024-01-19",
            "service_user": "69b29b8885f06fda012b2f03",
            "start_date": "2024-01-15"
        },
        {
            "_id": "69b29b8885f06fda012b2f09",
            "end_date": "2024-01-27",
            "service_user": "69b29b8885f06fda012b2f07",
            "start_date": "2024-01-13"
        },
        {
            "_id": "69b29b8885f06fda012b2f0d",
            "end_date": "2024-01-27",
            "service_user": "69b29b8885f06fda012b2f0b",
            "start_date": "2024-01-21"
        },
        {
            "_id": "69b29b8885f06fda012b2f11",
            "end_date": "2024-01-31",
            "service_user": "69b29b8885f06fda012b2f0f",
            "start_date": "2024-01-17"
        },
        {
            "_id": "69b29b8885f06fda012b2f15",
            "end_date": "2024-02-04",
            "service_user": "69b29b8885f06fda012b2f13",
            "start_date": "2024-01-30"
        },
        {
            "_id": "69b29b8885f06fda012b2f19",
            "end_date": "2024-02-18",
            "service_user": "69b29b8885f06fda012b2f17",
            "start_date": "2024-02-04"
        },
        {
            "_id": "69b29b8885f06fda012b2f1d",
            "end_date": "2024-02-20",
            "service_user": "69b29b8885f06fda012b2f1b",
            "start_date": "2024-02-17"
        },
        {
            "_id": "69b29b8885f06fda012b2f21",
            "end_date": "2024-02-28",
            "service_user": "69b29b8885f06fda012b2f1f",
            "start_date": "2024-02-07"
        }
    ],
    "page": 1,
    "page_count": 10,
    "per_page": 10
}

Retrieve an booking

Retrieve an booking object.

Response

Returns a booking object.

GET
/v1/bookings/<booking_id>
var booking = apiClient.Request(HttpMethod.Get, $"bookings/{bookingId}");
const booking = await apiClient.request("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}")
Response
{
    "_id": "69b29b8985f06fda012b2ff5",
    "booking_type": "service_user",
    "cancelled": null,
    "check_in": true,
    "checkout": false,
    "checkout_notes": null,
    "created": "2026-03-12 10:55:05",
    "end_date": null,
    "location": "69b29b8485f06fda012b2159",
    "modified": "2026-03-12 10:55:05",
    "notes": null,
    "proposed_checkout_date": null,
    "rate": 138554,
    "rate_period": "weekly",
    "reason_for_checkout": null,
    "respite": false,
    "room": "69b29b8585f06fda012b21b9",
    "service_user": "69b29b8985f06fda012b2ff3",
    "start_date": "2023-12-21"
}