Availability

Availability Calendar

Changed on

This endpoint is highly optimised and will return a single object per day. It's designed to be queried for large date ranges and the result is used to populate an availability calendar.

When the end user selects an open date you can call on /availability endpoint to get the availabilityId to create the booking

post/availability/calendar

Request

  • Base URL: http://localhost:8080/api/octo
  • URL: http://localhost:8080/api/octo/availability/calendar
  • Auth: HTTP bearer

Headers

Octo-Capabilitiesstring required

A list of the Capabilities (their IDs) initialized with your request.

Accept-Languagestring

This optional request header allows to specify preferred languages for content in the response. A language code that specifies the language of the product content. This code must conform to the BCP 47 standard, following RFC 5646 and RFC 4647 specifications for language tags. Examples include en-US for American English, fr-FR for French (France), and es-ES for Spanish (Spain). This header supports a comma-separated list of language tags with optional quality values (q) to indicate priority, such as en-US, fr-CA;q=0.8, fr;q=0.7, which prioritizes U.S. English, followed by Canadian French, and general French. This header is defined in the HTTP/1.1 specification (RFC 7231) and is commonly used for internationalized websites and services to enhance user experience. For more details, visit MDN Web Docs: Accept-Language - HTTP | MDN. Note this only determines preference and does not guarantee location has content available in the desired language.

Request body

productIdstring required

The product id.

optionIdstring required

The option id.

localDateStartstring

Start date to query for (YYYY-MM-DD).

localDateEndstring

End date to query for (YYYY-MM-DD).

currencystring nullable

Can be used only when pricing capability is used.

Example request

{
  "productId": "6b903d44-dc24-4ca4-ae71-6bde6c4f4854",
  "optionId": "DEFAULT",
  "localDateStart": "2022-05-23",
  "localDateEnd": "2022-05-29"
}

Response

The request has succeeded.

localDatestring required

The specific date for querying availability on Availability Calendar endpoint. This field must follow the ISO 8601 date format (e.g., 2024-11-18). It ensures standardized representation of dates across different systems.

availableboolean required

Indicates whether there is any remaining availability for the specified date. true: Availability exists. false: Fully booked or unavailable.

status'AVAILABLE' | 'FREESALE' | 'SOLD_OUT' | 'LIMITED' | 'CLOSED' required
vacanciesinteger nullable required

Specifies the number of available slots remaining quantity (highest remaining vacancies from all availabilities of this day). Should be nulled or omitted when status is FREESALE.

capacityinteger nullable required

The total capacity for this availability date.

Example response

[
  {
    "localDate": "2022-05-12",
    "available": true,
    "status": "AVAILABLE",
    "vacancies": 10,
    "capacity": 10,
    "openingHours": [
      {
        "from": "08:00",
        "to": "16:00"
      }
    ]
  }
]

Changes