API reference

HTS APIs

Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.

PUT/api/lodging/v1/calendars/availabilityCalendar

Get availability calendar for lodgings

https://travel-distribution.staging.htsapis.com/api/lodging/v1/calendars/availability

Returns availability information for the specified lodgings. The response includes per-day information about the lodging's availability, information about if check-in or check-out is available for the day.

Past Date Handling: If the start date is in the past, past days will automatically be included in the response marked as unavailable (available: false, checkin: "invalid", checkout: "invalid").

Request body application/json · required

Date range and lodging IDs for the availability calendar.

request_id
string · uuid
required

Unique value used to identify this request. If provided to us during operational questions, it will help us provide better support.

Example 123e4567-e89b-12d3-a456-426614174000
lodging_ids
array of lodging_id
required

List of lodging IDs to get calendar for. (1 to 25)

Items ≥ 1, ≤ 25
start_date
string · date
required

The start date of the calendar period. Notes:

  • The date is interpreted in the lodging's timezone.
  • Past dates are allowed; past days will be returned as unavailable.
  • Start date can be at most 2 years in the future.
Example 2022-01-01
end_date
string · date
required

The end date of the calendar period. Note:

  • The date is interpreted in the lodging's timezone.
  • End date needs to be after the start date.
  • End date can be at most 1 year after the start date.
Example 2022-05-01

Responses

200Availability calendar for the requested lodgings
lodgings
array of lodging_availability_calendar
required

List of lodging calendars for which availability information is available.

Show fields
Array of lodging_availability_calendar · List of lodging calendars for which availability information is available.
lodging_id
string
required

Unique identifier for the lodging

Example 123e4567-e89b-12d3-a456-426614174000
calendar_days
array of availability_calendar_day
required

List of calendar days with availability information. Must contain an entry for every day in the requested date range. Days with unknown availability should use the Unknown availability day type.

Show fields
Array of availability_calendar_day · one of 2 · List of calendar days with availability information. Must contain an entry for every day in the requested date range. Days with unknown availability should use the Unknown availability day type.

Availability information for a single day

Exactly one of the following, selected by kind:
known (known_availability_calendar_day) known_availability_calendar_day
date
string · date
required

The date (YYYY-MM-DD format) in the lodging's timezone

Example 2022-01-01
kind
string enum
required

Discriminator for calendar day type: 'known' (availability is known) or 'unknown' (availability is not known for this day)

Values knownunknown · Example known
available
string enum
required

Whether the lodging is available or unavailable on a calendar day. (Formerly exposed as schema key available_enum; use availability_status for consistency with other enums such as property_type, meal_plan.)

Values availableunavailable · Example available
unknown (unknown_availability_calendar_day) unknown_availability_calendar_day
date
string · date
required

The date (YYYY-MM-DD format) in the lodging's timezone

Example 2022-01-01
kind
string enum
required

Discriminator for calendar day type: 'known' (availability is known) or 'unknown' (availability is not known for this day)

Values knownunknown · Example known
response_id
string · uuid
required

Unique identifier for this response

Example 123e4567-e89b-12d3-a456-426614174000
400Invalid Request. There will be an error code in the response detailing the issue.
error_code
string enum
required

Error code indicating the type of failure

Values invalid_inputunauthorized · Example invalid_input
description
string
required

Human-readable error description

Example Invalid lodging IDs provided
response_id
string · uuid
required

Unique identifier for this response

Example 123e4567-e89b-12d3-a456-426614174000
Example
{
  "error_code": "invalid_input",
  "description": "Invalid lodging IDs provided",
  "response_id": "123e4567-e89b-12d3-a456-426614174000"
}
499Client closed the connection before the response could be sent (HTTP 499). This occurs when clients timeout or cancel requests while the server is still processing. The client will not receive this response. This means a quote, a booking or any other long running process may have been processed.
error_code
string enum
required

Error returned when a client closes the connection before the response could be sent.

Values client_closed_request
description
string
required

A human-readable description of what happened. For booking requests, this may include the partner reference ID for tracking.

response_id
string · uuid
required

Unique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.

Example 123e4567-e89b-12d3-a456-426614174000
additional_context
object

Additional context about the error. For booking requests, includes partner_reference_id for tracking in BigQuery.

Example
{
  "error_code": "client_closed_request",
  "description": "string",
  "response_id": "123e4567-e89b-12d3-a456-426614174000",
  "additional_context": {}
}
500Internal server error
error_code
string enum
required

Error returned when an internal server error occurs.

Values internal_server_error
description
string
required

A human-readable description of the error.

response_id
string · uuid
required

Unique identifier of the specific response. Use this identifier when you need to refer to a specific response, when requiring technical support.

Example 123e4567-e89b-12d3-a456-426614174000
Example
{
  "error_code": "internal_server_error",
  "description": "string",
  "response_id": "123e4567-e89b-12d3-a456-426614174000"
}
Request
curl -X PUT "https://travel-distribution.staging.htsapis.com/api/lodging/v1/calendars/availability" \
  -H "HTS-API-KEY: $HTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "lodging_ids": [
    "123e4567-e89b-12d3-a456-426614174000",
    "987f6543-21ba-43dc-9876-543210987654"
  ],
  "start_date": "2022-01-01",
  "end_date": "2022-05-01"
}'
Response 200
{
  "lodgings": [
    {
      "lodging_id": "123e4567-e89b-12d3-a456-426614174000",
      "calendar_days": [
        {
          "kind": "known",
          "date": "2022-01-01",
          "available": "available"
        },
        {
          "kind": "known",
          "date": "2022-01-02",
          "available": "available"
        },
        {
          "kind": "known",
          "date": "2022-01-03",
          "available": "unavailable"
        },
        {
          "kind": "unknown",
          "date": "2022-01-04"
        },
        {
          "kind": "known",
          "date": "2022-01-05",
          "available": "available"
        }
      ]
    }
  ],
  "response_id": "123e4567-e89b-12d3-a456-426614174000"
}

Examples are generated from the schema where the spec publishes none; field values are illustrative.