---
title: "Get information about booking busy times"
method: POST
path: "/bookings/actions/average-booking-busy-times"
tags: ["Bookings"]
---

# Get information about booking busy times

`POST /bookings/actions/average-booking-busy-times`

Returns booking occupancy data for a specified date and time period. The action method provides data on the busiest times of bookings in a period. The period can change depending on the parameters set up.
The chart contains time intervals on the X axis and Percentage information about reserved time slots (70% of slots for the time is reserved) on the Y axis.
Filter by booking ticket or ticket property to narrow the scope of the data.

## Headers

- `Accept-Language` string

## Request body

- object
  - `booking_date` string, required — The date when you want to check how busy the bookings are
  - `time_period` 'day' | 'week' | 'month' | 'year', required — The period that the algorithm uses to calculate past busy times and return your data in that period. If you set the value as DAY, the algorithm will return the data for one day in an hour range.
  - `booking_ticket_id` string — The unique ID of the booking ticket. If not set, the data will be returned for all available tickets.
  - `booking_property_id` string — Booking ticket property ID from resource [booking-ticket-properties](https://carecloud.readme.io/reference/getbookingticketproperties). The parameter determines property, which is used to filter resources by their properties. The parameter must be used in combination with property_value otherwise is ignored in the request.
  - `booking_property_value` string — Booking ticket property record value from [booking-ticket-properties](https://carecloud.readme.io/reference/getbookingticketproperties) in case of datatype with multiple values. Parameter filters resources depends of store property record value. The parameter must be used in combination with property_id otherwise is ignored in the request.

## Response `200`

OK

- object
  - `data` object
    - `time_unit` string — The time unit for X-axis
    - `chart_data` ChartPointData[] — Data for the chart display. The items are ordered by X-axis values ascending.
      - `x_axis_value` string — The X-axis value
      - `y_axis_value` string — The Y-axis value

## Other responses

- `400` — Bad input parameter. The response body's `error.error_data.invalid_params[]` array lists the parameters that caused the failure, each carrying a `reason` code. See the `BadRequestErrorBody` schema for the generic reason taxonomy. Operations with domain-specific business rules document additional reasons at the operation level.
- `401` — The client has invalid credentials or auth token.
- `403` — The client does not exist or the client tried to access an unauthorized property or resource.
- `404` — The resource was not found.
- `405` — The resource does not support the specified HTTP method.
- `429` — Too many requests - more than the resource limit.
- `500` — Server is not working as expected.
- `503` — Temporary state when the service is temporarily unavailable, overloaded or there is a maintenance window.

---

[API](https://skmtc.net/crmcarecloud/apis/rest-api-reference.md) · [All operations](https://skmtc.net/crmcarecloud/apis/rest-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crmcarecloud/rest-api-reference/revisions/329c06dbf8d9/schema)
