API reference

HTS APIs

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

Schema

cancellation_penalty

Cancellation penalty for a lodging.

This object will contain an ordered sequence of gapless penalty ranges starting from the booking time and ending at the check-in time.

The penalty amount will be withheld if the cancellation time falls within the range of the start time (inclusive) and end time (exclusive).

A penalty range with 0 amount indicates that the rate if fully refundable on that range. On the other hand, if the penalty amount equals the booking amount, the rate is non-refundable on that range.

Fields

penalty_ranges
array of PenaltyRange
required

Ordered sequence of gapless penalty ranges from booking time to check-in

Items ≥ 1
Show fields
Array of PenaltyRange · Ordered sequence of gapless penalty ranges from booking time to check-in
Items ≥ 1
start_time
string · date-time
required

Start time of the penalty range (Inclusive), in ISO 8601 format

Example 2020-01-01T00:00:00Z
end_time
string · date-time
required

End time of the penalty range (Exclusive), in ISO 8601 format

Example 2020-01-02T00:00:00Z
penalty
object
required

Monetary amount withheld from the client if cancellation falls within this range

Show fields
currency
string
required

Currency code, in ISO 4217 format.

Pattern ^[A-Z]{3}$ · Example USD
amount
string
required

Monetary amount value Serialized BigDecimal value

Example 123.45
Example
{
  "penalty_ranges": [
    {
      "start_time": "2020-01-01T00:00:00Z",
      "end_time": "2020-01-02T00:00:00Z",
      "penalty": {
        "currency": "USD",
        "amount": "0.00"
      }
    },
    {
      "start_time": "2020-01-02T00:00:00Z",
      "end_time": "2020-01-03T00:00:00Z",
      "penalty": {
        "currency": "USD",
        "amount": "75.00"
      }
    },
    {
      "start_time": "2020-01-03T00:00:00Z",
      "end_time": "2020-01-05T00:00:00Z",
      "penalty": {
        "currency": "USD",
        "amount": "135.00"
      }
    }
  ]
}