{
  "openapi": "3.1.0",
  "info": {
    "title": "CFAR Lodging API",
    "version": "v2"
  },
  "tags": [
    {
      "name": "Offer & Merchandising",
      "description": "Endpoints for creating, pricing, and retrieving offers for a customer's reservation, as well as generating merchandising content for those offers.\n\n---\n\nGuide for integrating the HTS merchandising component into your website to display CFAR offers.\n\n## Overview\n\nHTS merchandising components are lightweight, embeddable widgets that display product offers on your website. They are delivered as web components that render in Shadow DOM with isolated styling.\n\nThere are two integration modes: **Web Component** and **Iframe**. The mode is determined by your tenant's configuration. The `merchandising_url` in the create offer response already points to the correct endpoint for your integration mode:\n\n- `.../component/sdk.js` → **Web Component** mode\n- `.../index.html` → **Iframe** mode\n\n> **`{{HTS_ORIGIN}}`** — Throughout this guide, `{{HTS_ORIGIN}}` represents the HTS domain for your environment (e.g. staging or production). The exact origin is provided during onboarding and must be used for CSP headers and `postMessage` origin verification.\n\n| | Web Component | Iframe |\n| -- | -- | -- |\n| **How it loads** | `<script>` tag + custom element on your page | `<iframe>` pointing to the merchandising URL |\n| **Isolation** | Shadow DOM within host page | Full iframe boundary |\n| **Sizing** | Inline flow — fills container width, height adjusts automatically | Requires manual height management via `hts-dimension` event |\n| **Theming** | CSS custom properties on the host element | `hts-theme` ingress event with design tokens |\n| **Sending commands** | `window.postMessage(...)` | `iframe.contentWindow.postMessage(...)` |\n| **CSP requirement** | `script-src` + `connect-src` for `{{HTS_ORIGIN}}` | `frame-src` for `{{HTS_ORIGIN}}` |\n\n## Integration Flow\n\n1. **Create an offer** — call the create offer API to obtain a `merchandising_url`.\n2. **Embed the component** — load the component on your page using the `merchandising_url`.\n3. **Customer selects an option** — the component emits an `hts-selection` event with the chosen offer tokens.\n4. **Process the selection** — use the offer tokens to create an order.\n\n## Embedding the Component\n\n### Web Component\n\n| Element Name |\n| -- |\n| `<hts-lodging-cfar-merchandising>` |\n\n**Static HTML:**\n\n```html\n<!-- Preconnect for faster DNS resolution -->\n<link rel=\"preconnect\" href=\"{{HTS_ORIGIN}}\" />\n\n<!-- Merchandising script (merchandising_url from create offer API response) -->\n<script src=\"{{MERCHANDISING_URL}}\" type=\"module\" async></script>\n\n<!-- Merchandising component -->\n<hts-lodging-cfar-merchandising></hts-lodging-cfar-merchandising>\n```\n\n**Dynamic (JavaScript):**\n\n```javascript\n// merchandising_url is provided in the create offer API response\nconst sdkUrl = merchandisingUrl;\n\n// Load the merchandising script\nconst script = document.createElement('script');\nscript.src = sdkUrl;\nscript.type = 'module';\nscript.async = true;\ndocument.head.appendChild(script);\n\n// Insert the custom element\nconst component = document.createElement('hts-lodging-cfar-merchandising');\ndocument.body.appendChild(component);\n```\n\n<details>\n<summary><strong>Iframe</strong></summary>\n\nUse the `merchandising_url` from the create offer API response as the iframe `src`.\n\n```html\n<iframe\n  id=\"hts-merchandising\"\n  src=\"{{MERCHANDISING_URL}}\"\n  style=\"width: 100%; border: none; height: 400px;\">\n</iframe>\n```\n\nAdjust the iframe height dynamically using the `hts-dimension` event:\n\n```javascript\nwindow.addEventListener('message', (event) => {\n  if (event.origin !== '{{HTS_ORIGIN}}') return;\n\n  if (event.data.type === 'hts-dimension') {\n    const iframe = document.getElementById('hts-merchandising');\n    iframe.style.height = event.data.data.height + 'px';\n  }\n});\n```\n\n</details>\n\n## Egress Events (Component → Partner)\n\nThe component communicates with your page using the `postMessage` API. These events are identical for both integration modes — listen via `window.addEventListener('message', ...)`.\n\n### Event Types\n\n| Event Type | Description | When Fired |\n| -- | -- | -- |\n| `hts-initialized` | Component loaded and ready | On component mount |\n| `hts-option-selected` | User selected an option | When selection changes |\n| `hts-invalid-params` | Invalid parameters detected | On parameter validation failure |\n| `hts-data-loaded` | Offer data loaded | After successful data parsing |\n| `hts-dimension` | Component dimensions changed | When size changes |\n| `hts-view-terms` | User viewing terms | When terms link is clicked |\n| `hts-link-clicked` | User clicked a link | When FAQ or T&C links are clicked |\n| `hts-initialization-failed` | Initialization blocked | When the app cannot initialize (e.g. unsupported locale) |\n| `hts-validated` | Checkout readiness changed | On each `hts-validate`, and on change once enabled (or immediately with `validate`) |\n| `hts-offer-conversion-displayed` | Amounts are being shown in a display currency | On the first converted render, and on each display-currency change (only while a conversion is active) |\n\n### Listening to Events\n\n```javascript\nwindow.addEventListener('message', (event) => {\n  // Verify origin for security\n  if (event.origin !== '{{HTS_ORIGIN}}') return;\n\n  const { type, product, data } = event.data;\n\n  switch (type) {\n    case 'hts-initialized':\n      console.log(`${product} component initialized`);\n      break;\n    case 'hts-option-selected':\n      if (data.attached && data.offer) {\n        // User selected the offer — offerTokens contains one token per room/unit\n        console.log(`Offer selected, price: ${data.offer.premium} ${data.offer.currency}`);\n      } else {\n        // User declined the offer\n      }\n      break;\n    case 'hts-invalid-params':\n      console.error('Validation failed:', data.error);\n      break;\n    case 'hts-dimension':\n      // For iframe: update iframe height\n      // For web component: typically not needed (inline flow)\n      break;\n    case 'hts-link-clicked':\n      // contextType is \"faq\" or \"termsAndConditions\"\n      break;\n    case 'hts-initialization-failed':\n      // Widget will not render — hide container and do not require selection\n      console.warn('Initialization failed:', data.type);\n      break;\n    case 'hts-validated':\n      // Enable/disable your proceed control based on data.isValid\n      setProceedEnabled(data.isValid);\n      break;\n  }\n});\n```\n\n### Event Payloads\n\nAll egress events share this envelope structure:\n\n```json\n{\n  \"type\": \"<event-type>\",\n  \"product\": \"lodging-cfar\",\n  \"data\": { ... }\n}\n```\n\n#### hts-initialized\n\nFired once when the component has loaded and is ready to display. Wait for this event before sending any ingress events to the component.\n\n```json\n{\n  \"type\": \"hts-initialized\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"sessionId\": \"7a60d98a-c46e-42be-ba9f-fde95cc50307\",\n    \"version\": \"1.422.0\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.sessionId` | string | The session ID for this offer flow |\n| `data.version` | string | Component build version |\n\n#### hts-option-selected\n\nFired when the user selects or deselects an offer option.\n\n**User selected the offer:**\n\n```json\n{\n  \"type\": \"hts-option-selected\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"attached\": true,\n    \"selected\": \"option-1\",\n    \"offer\": {\n      \"offerTokens\": [\"token-room-1\", \"token-room-2\"],\n      \"premium\": \"20.00\",\n      \"currency\": \"USD\"\n    }\n  }\n}\n```\n\n**User declined the offer:**\n\n```json\n{\n  \"type\": \"hts-option-selected\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"attached\": false,\n    \"selected\": \"none\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.attached` | boolean | `true` if the offer is selected, `false` if declined |\n| `data.selected` | string | Option identifier (`\"option-1\"`, `\"option-2\"`, `\"none\"`) |\n| `data.offer.offerTokens` | string[] | One token per room/unit in the booking. Present only when `attached: true` |\n| `data.offer.premium` | string | Total price of the offer |\n| `data.offer.currency` | string | ISO 4217 currency code |\n\n#### hts-data-loaded\n\nFired after offer data has been successfully parsed and is ready for display.\n\n```json\n{\n  \"type\": \"hts-data-loaded\",\n  \"product\": \"lodging-cfar\",\n  \"data\": [\n    {\n      \"offerTokens\": [\"token-room-1\"],\n      \"premium\": \"20.00\",\n      \"currency\": \"USD\"\n    }\n  ]\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data` | array | Array of offer objects that were parsed from the merchandising URL |\n\n#### hts-dimension\n\nFired whenever the widget's rendered size changes.\n\n```json\n{\n  \"type\": \"hts-dimension\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"width\": 800,\n    \"height\": 450\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.width` | number | Widget width in pixels |\n| `data.height` | number | Widget height in pixels |\n\nFor iframe integration, use this to update iframe height. For web component integration, this is informational.\n\n#### hts-invalid-params\n\nFired when the merchandising URL parameters fail validation.\n\n```json\n{\n  \"type\": \"hts-invalid-params\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"error\": { \"offers\": \"required parameter missing\" }\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.error` | object | Validation error details (structure varies) |\n\n#### hts-view-terms\n\nFired when the user clicks the terms and conditions link.\n\n```json\n{\n  \"type\": \"hts-view-terms\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"url\": \"https://hts.hopper.com/<path-to-legal-doc>\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.url` | string | URL of the terms page |\n\n#### hts-link-clicked\n\nFired when the user clicks an FAQ or terms and conditions link.\n\n```json\n{\n  \"type\": \"hts-link-clicked\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"url\": \"https://hts.hopper.com/<path-to-legal-doc>\",\n    \"contextType\": \"termsAndConditions\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.url` | string | URL of the clicked link |\n| `data.contextType` | string | Either `\"faq\"` or `\"termsAndConditions\"` |\n\n#### hts-initialization-failed\n\nFired when the app cannot initialize due to a precondition failure. The widget will not render.\n\n```json\n{\n  \"type\": \"hts-initialization-failed\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"type\": \"unsupported_locale\",\n    \"locale\": \"ja\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.type` | string | Failure reason. Currently only `\"unsupported_locale\"` |\n| `data.locale` | string | The unsupported locale that was requested |\n\nThe only failure type today is `unsupported_locale`, indicating the tenant is configured to reject unsupported locales rather than falling back to English.\n\n#### hts-validated\n\nTells you whether it is safe to proceed to checkout. Use it to enable/disable your proceed/checkout control.\n\n```json\n{\n  \"type\": \"hts-validated\",\n  \"product\": \"lodging-cfar\",\n  \"data\": { \"isValid\": false }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.isValid` | boolean | `true` when it is safe to proceed to checkout, `false` otherwise |\n\n**When it fires.** `hts-validated` is not emitted on load — this event stays quiet until you opt in (other widget events still fire as normal). It starts emitting the first time either you send an `hts-validate` ingress event (e.g. when the customer attempts to proceed), or you set the `validate` attribute/parameter on the component (see the Component Attributes / Iframe Parameters tables below). From then on it emits the **current** `isValid` whenever the value changes (this automatic stream is de-duplicated). In addition, **every `hts-validate` you send always responds with a fresh `hts-validated`** carrying the current validity — even when it hasn't changed — so you can re-query readiness at any time; that ingress also re-shows the in-widget \"selection required\" prompt.\n\n**How to interpret `isValid`:** Treat `isValid: false` as \"disable proceed,\" **not** \"show an error.\" If you want a checkout-readiness signal at load without any customer action, set `validate`; the first `hts-validated` then reflects the offer's selection mode (a forced-choice widget starts `isValid: false`; one that permits no selection starts `isValid: true`). Otherwise drive validation from the proceed attempt: send `hts-validate` and read the resulting `hts-validated`. Surface validation messaging only at the proceed attempt (`hts-validate` and/or your own copy).\n\n#### hts-offer-conversion-displayed\n\nFired while the widget is displaying amounts converted to a currency other than the offer currency. Lets you confirm both what the customer will actually be charged (always in the offer currency) and the converted amounts shown on screen. See the [`hts-display-currency`](#hts-display-currency) ingress event below for how to drive the conversion.\n\n```json\n{\n  \"type\": \"hts-offer-conversion-displayed\",\n  \"product\": \"lodging-cfar\",\n  \"data\": {\n    \"offerIdentifier\": [\"token-room-1\"],\n    \"premium\": 20,\n    \"currency\": \"USD\",\n    \"display\": {\n      \"premium\": 18.4,\n      \"currency\": \"EUR\",\n      \"exchangeRate\": \"0.92\"\n    }\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.offerIdentifier` | string[] | Offer tokens the reported amounts cover |\n| `data.premium` | number | Price in the **offer** currency — the amount the customer is actually charged |\n| `data.currency` | string | Offer (contract) currency, ISO 4217 |\n| `data.display.premium` | number | Price converted to the display currency |\n| `data.display.currency` | string | Display currency, ISO 4217 |\n| `data.display.exchangeRate` | string | Multiplier applied to the offer currency to produce the displayed amounts |\n\n**When it fires.** On the first converted render, and again on every display-currency change. It is emitted **only while a conversion is active**, so treat its absence as \"amounts are in the offer currency.\" The conversion is display-only: the contract, and the amount charged, stay in `currency`.\n\n## Ingress Events (Partner → Component)\n\nThe host page can send commands to the widget via `postMessage`.\n\n| Event Type | Description | Use Case |\n| -- | -- | -- |\n| `hts-selection` | Programmatically select an option | Restore a previous selection or sync with partner state |\n| `hts-validate` | Trigger validation state | Show validation errors when the user tries to proceed without selecting |\n| `hts-theme` | Apply a custom theme at runtime | Override design tokens dynamically after the widget has loaded |\n| `hts-display-currency` | Switch the currency amounts are displayed in | Render prices in the customer's currency, e.g. from a currency picker on your page |\n\n> **Targeting:** For web component integration, post to `window` with origin `{{HTS_ORIGIN}}`. For iframe integration, post to `iframe.contentWindow`. Examples below show both.\n\n### hts-selection\n\nSets the selected option inside the widget using option identifiers.\n\n```json\n{ \"type\": \"hts-selection\", \"option\": \"option-1\" }\n```\n\n| Field | Type | Values | Description |\n| -- | -- | -- | -- |\n| `type` | string | `\"hts-selection\"` | Event type |\n| `option` | string | `\"none\"`, `\"option-1\"`, `\"option-2\"` | Option identifier to select |\n\n**Web Component:**\n\n```javascript\n// Programmatically select an offer option\nwindow.postMessage({ type: 'hts-selection', option: 'option-1' }, '{{HTS_ORIGIN}}');\n```\n\n<details>\n<summary><strong>Iframe</strong></summary>\n\n```javascript\nconst iframe = document.getElementById('hts-merchandising');\niframe.contentWindow.postMessage({ type: 'hts-selection', option: 'option-1' }, '{{HTS_ORIGIN}}');\n```\n\n</details>\n\n### hts-validate\n\nTriggers the widget's validation state, highlighting that a selection is required. Useful when the user clicks \"Continue\" or \"Book\" without making a selection.\n\n```json\n{ \"type\": \"hts-validate\" }\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `type` | string | Event type. No additional fields. |\n\n**Web Component:**\n\n```javascript\nwindow.postMessage({ type: 'hts-validate' }, '{{HTS_ORIGIN}}');\n```\n\n<details>\n<summary><strong>Iframe</strong></summary>\n\n```javascript\nconst iframe = document.getElementById('hts-merchandising');\niframe.contentWindow.postMessage({ type: 'hts-validate' }, '{{HTS_ORIGIN}}');\n```\n\n</details>\n\n### hts-theme\n\nApplies a custom theme to the widget at runtime by sending a partial map of design token overrides. Any subset of tokens can be sent; omitted tokens keep their current values.\n\nFor initial theming, CSS custom properties on the host element are preferred (see [Theming](#section/Merchandising-Component-Integration/Theming)). Use this event for dynamic theme changes after the widget has loaded.\n\n```json\n{\n  \"type\": \"hts-theme\",\n  \"tokens\": {\n    \"colorPrimary\": \"#1a73e8\",\n    \"fontFamilyBase\": \"Inter, sans-serif\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `type` | string | Event type |\n| `tokens` | object | Partial map of design token names to string values. See the [CSS Custom Properties](#section/Merchandising-Component-Integration/CSS-Custom-Properties) table for valid token names. |\n\n**Web Component:**\n\n```javascript\nwindow.postMessage({\n  type: 'hts-theme',\n  tokens: { colorPrimary: '#1a73e8' }\n}, '{{HTS_ORIGIN}}');\n```\n\n<details>\n<summary><strong>Iframe</strong></summary>\n\n```javascript\nconst iframe = document.getElementById('hts-merchandising');\niframe.contentWindow.postMessage({\n  type: 'hts-theme',\n  tokens: { colorPrimary: '#1a73e8' }\n}, '{{HTS_ORIGIN}}');\n```\n\n</details>\n\n### hts-display-currency\n\nSwitches the currency the widget displays amounts in, after it has loaded — use it to power an on-page currency switcher. This is **display-only**: the contract, and the amount the customer is charged, stay in the offer currency, and the widget shows a disclaimer naming both currencies.\n\n```json\n{ \"type\": \"hts-display-currency\", \"currency\": \"EUR\", \"exchangeRate\": 0.92 }\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `type` | string | `\"hts-display-currency\"` |\n| `currency` | string \\| null | Display currency as a 3-letter ISO 4217 code, or `null` to revert to the offer currency |\n| `exchangeRate` | number | *Optional.* Multiplier applied to the offer currency (e.g. `0.92`). Omit it to have HTS resolve a current rate. Must be positive and finite — a zero, negative, or non-numeric rate rejects the whole event with `hts-invalid-params` |\n\n`currency` and `exchangeRate` move together: switching currency clears any rate you supplied before, so send the new rate alongside the new currency. Setting the offer's own currency counts as no conversion — amounts render normally and no event fires. Each accepted change is reported by the [`hts-offer-conversion-displayed`](#hts-offer-conversion-displayed) egress event, which tells you the currency actually shown (the widget falls back to the offer currency if no rate can be resolved).\n\n**Web Component:**\n\n```javascript\n// HTS resolves the rate\nwindow.postMessage({ type: 'hts-display-currency', currency: 'EUR' }, '{{HTS_ORIGIN}}');\n\n// ...or convert with your own rate\nwindow.postMessage({ type: 'hts-display-currency', currency: 'EUR', exchangeRate: 0.92 }, '{{HTS_ORIGIN}}');\n\n// Back to the offer currency\nwindow.postMessage({ type: 'hts-display-currency', currency: null }, '{{HTS_ORIGIN}}');\n```\n\n<details>\n<summary><strong>Iframe</strong></summary>\n\n```javascript\nconst iframe = document.getElementById('hts-merchandising');\niframe.contentWindow.postMessage({ type: 'hts-display-currency', currency: 'EUR', exchangeRate: 0.92 }, '{{HTS_ORIGIN}}');\n```\n\n</details>\n\nAn initial display currency can also be set at load, without an event, via the `display-currency` / `exchange-rate-to-display` attributes (web component) or the `displayCurrency` / `exchangeRateToDisplay` parameters (iframe) — see the tables below. This event and those inputs feed the same state, so you can seed a currency on load and switch from there.\n\n## Component Attributes\n\nWhen using the web component, customizations are set as **kebab-case** attributes on the custom element.\n\n| Attribute | Type | Description |\n| -- | -- | -- |\n| `selected` | string | Pre-select an option (`none`, or an offer id) |\n| `validate` | boolean | Emit `hts-validated` (current validity) as soon as this attribute is set — on load or later — instead of staying silent until the first `hts-validate`. Default `false`. |\n| `rewards-type` | string | Override rewards type |\n| `rewards-conversion` | string | Override rewards conversion |\n| `display-currency` | string | Render amounts in this currency (3-letter ISO 4217 code, e.g. `EUR`). Display-only — the contract stays in the offer currency. |\n| `exchange-rate-to-display` | string | Exchange rate as a multiplier from the offer currency (e.g. `0.92`). Requires `display-currency`; omit to have HTS resolve a rate. |\n\n```html\n<hts-lodging-cfar-merchandising\n  selected=\"none\"\n  rewards-type=\"miles\"\n  rewards-conversion=\"100\"\n></hts-lodging-cfar-merchandising>\n\n<hts-lodging-cfar-merchandising selected=\"option-1\"></hts-lodging-cfar-merchandising>\n```\n\n## Iframe Parameters\n\nWhen using iframe integration, the same customizations are supplied as **camelCase** query parameters on the merchandising URL. See the _Iframe_ embedding example in _Integration Modes_ above.\n\n| Parameter | Type | Description |\n| -- | -- | -- |\n| `selected` | string | Pre-select an option (`none`, or an offer id) |\n| `validate` | boolean | Emit `hts-validated` (current validity) from load instead of staying silent until the first `hts-validate`. Default `false`. |\n| `rewardsType` | string | Override rewards type |\n| `rewardsConversion` | string | Override rewards conversion |\n| `displayCurrency` | string | Render amounts in this currency (3-letter ISO 4217 code, e.g. `EUR`). Display-only — the contract stays in the offer currency. |\n| `exchangeRateToDisplay` | string | Exchange rate as a multiplier from the offer currency (e.g. `0.92`). Requires `displayCurrency`; omit to have HTS resolve a rate. |\n\n## Responsive Sizing\n\nThe widget is fully responsive. The partner controls the **container width** — the widget fills the available width and adjusts its **height dynamically** based on content. There is no fixed pixel height for mobile or desktop.\n\nAfter each resize, the widget emits an `hts-dimension` event:\n\n```json\n{\n  \"type\": \"hts-dimension\",\n  \"product\": \"lodging-cfar\",\n  \"data\": { \"width\": 800, \"height\": 450 }\n}\n```\n\n- **Web component:** The widget flows inline — height adjusts automatically. The `hts-dimension` event is informational.\n- **Iframe:** You **must** listen for `hts-dimension` and update the iframe's height (see the iframe embedding example above).\n\n## Theming\n\n### Web Component: CSS Custom Properties\n\nThe component renders in Shadow DOM with isolated styling. CSS custom properties pierce the Shadow DOM boundary, so you can set them on the host element or an ancestor.\n\nIf no custom properties are set, the widget uses the defaults below. HTS may also apply partner-specific themes server-side based on `partnerId`.\n\n**Header & Borders**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-header-fg` | `colorHeaderFg` | `light-dark(rgb(23, 46, 94), rgb(119, 158, 255))` | Header title and icon |\n| `--hts-color-header-bg` | `colorHeaderBg` | `light-dark(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))` | Header fill |\n| `--hts-color-header-background` | `colorHeaderBackground` | `light-dark(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))` | Deprecated alias of `colorHeaderBg`. Prefer `colorHeaderBg`. If both are set, `colorHeaderBg` wins. |\n| `--hts-color-border` | `colorBorder` | `light-dark(rgb(217, 217, 217), rgb(217, 217, 217))` | Banner, option card, and radio strokes |\n| `--hts-color-option-hover-bg` | `colorOptionHoverBg` | `light-dark(rgb(246, 246, 246), rgb(17, 17, 17))` | Option card hover fill |\n\nFocus, selected-option border, and the terms link follow `colorPrimary`. Partners who set an opaque header fill must also set `colorHeaderFg`; the widget does not auto-correct contrast. Hosts who theme the card surface should also set `colorOptionHoverBg` if they do not want the default grey hover.\n\n**Brand Colors**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-primary` | `colorPrimary` | `#2f394e` | Selected option border, radio button fill, bullet icons |\n| `--hts-color-primary-lighter` | `colorPrimaryLighter` | `#eff3ff` | Header icon background, light accent surfaces |\n| `--hts-color-secondary` | `colorSecondary` | `#4f46e5` | Secondary accent elements, links |\n\n**Text Colors**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-text-primary` | `colorTextPrimary` | `#181d29` | Main body text, headings |\n| `--hts-color-text-secondary` | `colorTextSecondary` | `#6B7280` | Descriptions, secondary labels, muted text |\n\n**Recommended Badge**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-recommended` | `colorRecommended` | `#4f46e5` | \"Recommended\" ribbon background |\n| `--hts-color-text-recommended` | `colorTextRecommended` | `#eff3ff` | \"Recommended\" ribbon text |\n\n**Status Colors**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-status-success` | `colorStatusSuccess` | `#56C470` | Success status indicators |\n| `--hts-color-success-fg` | `colorSuccessFg` | `#27c281` | Success text, bullet point icons, checkmarks |\n| `--hts-color-success-bg` | `colorSuccessBg` | `#e8f8f0` | Success message background |\n| `--hts-color-discount-bg` | `colorDiscountBg` | `#DCFCE7` | Discount badge / savings highlight background |\n| `--hts-color-error-fg` | `colorErrorFg` | `#CC2427` | Error text, validation messages |\n| `--hts-color-error-bg` | `colorErrorBg` | `#f9eff1` | Error message background |\n| `--hts-color-warning-fg` | `colorWarningFg` | `#a7173c` | Warning text, warning icon |\n| `--hts-color-warning-bg` | `colorWarningBg` | `#f9eff1` | Warning banner background |\n\n**Typography**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-font-family-base` | `fontFamilyBase` | `'Proxima Nova', sans-serif` | All text in the widget |\n| `--hts-font-size-body-md` | `fontSizeBodyMd` | `14px` | Standard body text |\n| `--hts-font-size-body-sm` | `fontSizeBodySm` | `12px` | Small body text, captions |\n| `--hts-font-size-body-xs` | `fontSizeBodyXs` | `10px` | Fine print, disclaimers |\n| `--hts-font-size-title-lg` | `fontSizeTitleLg` | `20px` | Large titles, main heading |\n| `--hts-font-size-title-md` | `fontSizeTitleMd` | `16px` | Medium titles, section headings |\n| `--hts-font-size-title-sm` | `fontSizeTitleSm` | `14px` | Small titles, option labels |\n| `--hts-font-weight-base` | `fontWeightBase` | `400` | Normal text weight |\n| `--hts-font-weight-emphasis` | `fontWeightEmphasis` | `600` | Emphasized text (prices, key values) |\n| `--hts-font-weight-headline` | `fontWeightHeadline` | `700` | Headlines, section headers |\n| `--hts-font-style-headline` | `fontStyleHeadline` | `normal` | Headline font style (`normal`, `italic`, or `oblique`) |\n| `--hts-font-weight-title` | `fontWeightTitle` | `700` | Titles within options |\n\n**Layout**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-border-radius-base` | `borderRadiusBase` | `8px` | Border radius on cards, buttons, option containers, header icon |\n\n```css\nhts-lodging-cfar-merchandising {\n  --hts-color-primary: #1a73e8;\n  --hts-color-secondary: #ea4335;\n  --hts-color-header-fg: #1a73e8;\n  --hts-color-header-bg: transparent;\n  --hts-color-border: #d9d9d9;\n  --hts-color-option-hover-bg: #f6f6f6;\n  --hts-font-family-base: 'Inter', sans-serif;\n  --hts-font-style-headline: normal;\n  --hts-border-radius-base: 12px;\n}\n```\n\n<details>\n<summary><strong>Iframe: hts-theme Event</strong></summary>\n\nCSS custom properties cannot cross iframe boundaries. For iframe integrations, use the `hts-theme` ingress event to send design token overrides. The token names correspond to the \"Token\" column in the tables above.\n\n```javascript\nconst iframe = document.getElementById('hts-merchandising');\niframe.contentWindow.postMessage({\n  type: 'hts-theme',\n  tokens: {\n    colorPrimary: '#1a73e8',\n    colorSecondary: '#ea4335',\n    colorHeaderFg: '#1a73e8',\n    colorHeaderBg: 'transparent',\n    colorBorder: '#d9d9d9',\n    colorOptionHoverBg: '#f6f6f6',\n    fontFamilyBase: 'Inter, sans-serif',\n    fontStyleHeadline: 'normal',\n    borderRadiusBase: '12px'\n  }\n}, '{{HTS_ORIGIN}}');\n```\n\nSee the [hts-theme ingress event](#section/Merchandising-Component-Integration/hts-theme) for the full specification.\n\n</details>\n\n## Security\n\n| | Web Component | Iframe |\n| -- | -- | -- |\n| **CSP** | `script-src 'self' {{HTS_ORIGIN}}; connect-src 'self' {{HTS_ORIGIN}};` | `frame-src 'self' {{HTS_ORIGIN}};` |\n| **Origin check** | Verify `event.origin` on all `message` events | Same |\n| **HTTPS** | Required in production | Required in production |\n\n## Loading Tolerance\n\nIf the `hts-initialized` event is not received within a reasonable tolerance period after embedding the component, the hosting application should hide the widget and not require forced selection. This prevents user experience degradation if the component fails to load.\n\n## Alternative: Merchandising Contents API\n\nPartners who cannot embed the widget can use the **Create Offer Merchandising Contents** endpoint to retrieve product copy and messaging as JSON. This approach requires the partner to build their own UI while using HTS-provided content.\n"
    },
    {
      "name": "Contract Management",
      "description": "Endpoints for managing the lifecycle of contracts after purchase, including creation, confirmation, retrieval, search, and cancellation."
    },
    {
      "name": "HTS Self-Service Exercise",
      "description": "The partner utilizes the HTS frontend to handle 100% of the exercise experience end to end.\n\n---\n\nGuide for integrating the HTS exercise component into your website to handle CFAR cancellation and refund flows.\n\n## Overview\n\nThe HTS exercise component is an embeddable widget that guides the end user through the CFAR cancellation process — reviewing the booking, confirming cancellation, and processing the refund. It is delivered as a web component that renders in Shadow DOM with isolated styling.\n\nTo obtain the exercise URL, call the **Create Order Exercise URL** endpoint (`POST /orders/{id}/exercise_url`). The response contains an `exercise_url` that you embed on your page.\n\n> **`{{HTS_ORIGIN}}`** — Throughout this guide, `{{HTS_ORIGIN}}` represents the HTS domain for your environment (e.g. staging or production). The exact origin is provided during onboarding and must be used for CSP headers and `postMessage` origin verification.\n\nThere are two integration modes: **Web Component** and **Iframe**. The mode is determined by your tenant's configuration. The `exercise_url` in the response already points to the correct endpoint for your integration mode:\n\n- `.../component/sdk.js?...` → **Web Component** mode\n- `.../cancel-lodging/...` → **Iframe** / redirect mode\n\n| | Web Component | Iframe |\n| -- | -- | -- |\n| **How it loads** | `<script>` tag + custom element on your page | `<iframe>` pointing to the exercise URL |\n| **Isolation** | Shadow DOM within host page | Full iframe boundary |\n| **Sizing** | Inline flow — fills container width, height adjusts automatically | Requires manual height management via `hts-dimension` event |\n| **Theming** | CSS custom properties on the host element | `hts-theme` ingress event with design tokens |\n| **Sending commands** | `window.postMessage(...)` | `iframe.contentWindow.postMessage(...)` |\n| **CSP requirement** | `script-src` + `connect-src` for `{{HTS_ORIGIN}}` | `frame-src` for `{{HTS_ORIGIN}}` |\n\n## Integration Flow\n\n1. **Get exercise URL** — call the create order exercise URL API to obtain the `exercise_url`.\n2. **Embed the component** — load the component on your page using the `exercise_url`.\n3. **User reviews and confirms** — the component walks the user through cancellation and refund details.\n4. **Process exercise events** — listen for `hts-exercise` (or `hts-exercise-click-confirm` under `partner_fulfill`) to handle the result.\n\n## Embedding the Component\n\n### Web Component\n\n| Element Name |\n| -- |\n| `<hts-fintech-exercise>` |\n\n**Static HTML:**\n\n```html\n<!-- Preconnect for faster DNS resolution -->\n<link rel=\"preconnect\" href=\"{{HTS_ORIGIN}}\" />\n\n<!-- Exercise script (exercise_url from Create Order Exercise URL response) -->\n<script src=\"{{EXERCISE_URL}}\" type=\"module\" async></script>\n\n<!-- Exercise component -->\n<hts-fintech-exercise></hts-fintech-exercise>\n```\n\n**Dynamic (JavaScript):**\n\n```javascript\n// exercise_url is provided in the Create Order Exercise URL API response\nconst exerciseUrl = response.exercise_url;\n\n// Load the exercise script\nconst script = document.createElement('script');\nscript.src = exerciseUrl;\nscript.type = 'module';\nscript.async = true;\ndocument.head.appendChild(script);\n\n// Insert the custom element\nconst component = document.createElement('hts-fintech-exercise');\ndocument.body.appendChild(component);\n```\n\n<details>\n<summary><strong>Iframe</strong></summary>\n\nUse the `exercise_url` from the API response as the iframe `src`.\n\n```html\n<iframe\n  id=\"hts-exercise\"\n  src=\"{{EXERCISE_URL}}\"\n  style=\"width: 100%; border: none; height: 600px;\">\n</iframe>\n```\n\nAdjust the iframe height dynamically using the `hts-dimension` event:\n\n```javascript\nwindow.addEventListener('message', (event) => {\n  if (event.origin !== '{{HTS_ORIGIN}}') return;\n\n  if (event.data.type === 'hts-dimension') {\n    const iframe = document.getElementById('hts-exercise');\n    iframe.style.height = event.data.data.height + 'px';\n  }\n});\n```\n\n</details>\n\n## URL Parameters\n\nThe `exercise_url` returned by the API includes all required parameters. For reference, the parameters are:\n\n| Parameter | Type | Required | Description |\n| -- | -- | -- | -- |\n| `token` | string | Yes | JWT token authorizing the exercise session |\n| `tenant` | string | Yes | Tenant slug identifying your integration |\n| `productType` | string | Yes | Always `lodging-cfar` for lodging |\n| `orderId` | string | Yes | The order ID to exercise |\n| `locale` | string | No | BCP 47 locale code (default: `en`) |\n| `headless` | boolean | No | Enable headless mode — see below |\n\n## Egress Events (Component → Partner)\n\nThe component communicates with your page using the `postMessage` API. These events are identical for both integration modes — listen via `window.addEventListener('message', ...)`.\n\n### Event Types\n\n| Event Type | Description | When Fired |\n| -- | -- | -- |\n| `hts-ready` | Component loaded and ready | After initialization completes |\n| `hts-dimension` | Component dimensions changed | When size changes |\n| `hts-exercise` | Exercise lifecycle status | When fulfill starts, succeeds, or fails |\n| `hts-exercise-click-confirm` | User confirmed cancellation | When user clicks \"Confirm Cancel\" |\n| `hts-exercise-click-cancel` | User cancelled out of exercise | When user clicks \"Go Back\" |\n| `hts-exercise-click-support` | User clicked support link | When user requests help |\n| `hts-exercise-refund-option-selected` | User selected a refund option | When user picks a refund method (FTC flows) |\n| `hts-navigate-back` | User wants to go back | When user navigates backward |\n| `hts-scroll-to-top` | Component requests scroll | When a new page is shown |\n| `hts-exit` | User is exiting the flow | When exercise flow completes or user leaves |\n\n### Listening to Events\n\n```javascript\nwindow.addEventListener('message', (event) => {\n  // Verify origin for security\n  if (event.origin !== '{{HTS_ORIGIN}}') return;\n\n  const { type, data } = event.data;\n\n  switch (type) {\n    case 'hts-ready':\n      if (data.status === 'success') {\n        console.log('Exercise component ready');\n      } else {\n        // Component failed to initialize — hide container\n        console.error('Exercise component failed to load');\n      }\n      break;\n    case 'hts-exercise':\n      // Exercise fulfill lifecycle\n      if (data.status === 'success') {\n        console.log('Exercise completed successfully');\n      } else if (data.status === 'error') {\n        console.error('Exercise failed');\n      }\n      break;\n    case 'hts-exercise-click-confirm':\n      // User confirmed cancellation\n      if (data?.quoteId) {\n        // partner_fulfill policy: partner must now fulfill the exercise\n        console.log('User confirmed, quoteId:', data.quoteId);\n      }\n      break;\n    case 'hts-exercise-click-cancel':\n      // User decided not to cancel\n      break;\n    case 'hts-dimension':\n      // For iframe: update iframe height\n      // For web component: typically not needed (inline flow)\n      break;\n    case 'hts-exit':\n      // User is done — navigate them away or close the component\n      break;\n  }\n});\n```\n\n### Event Payloads\n\nAll egress events share this envelope structure:\n\n```json\n{\n  \"type\": \"<event-type>\",\n  \"data\": { ... }\n}\n```\n\n#### hts-ready\n\nFired once when the component has loaded and is ready to display. Wait for this event before sending any ingress events to the component.\n\n```json\n{\n  \"type\": \"hts-ready\",\n  \"data\": {\n    \"status\": \"success\",\n    \"metadata\": {\n      \"vertical\": \"lodging\"\n    }\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.status` | string | `\"success\"` if ready, `\"error\"` if initialization failed |\n| `data.metadata.vertical` | string | Product vertical (`\"lodging\"` for lodging CFAR) |\n\n#### hts-dimension\n\nFired whenever the component's rendered size changes.\n\n```json\n{\n  \"type\": \"hts-dimension\",\n  \"data\": {\n    \"width\": 800,\n    \"height\": 600\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.width` | number | Component width in pixels |\n| `data.height` | number | Component height in pixels |\n\nFor iframe integration, use this to update iframe height. For web component integration, this is informational.\n\n#### hts-exercise\n\nFired during the exercise fulfill lifecycle.\n\n```json\n{\n  \"type\": \"hts-exercise\",\n  \"data\": {\n    \"status\": \"success\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.status` | string | `\"pending\"` when fulfill starts, `\"success\"` when completed, `\"error\"` on failure |\n\nThis event is fired under the `hts_fulfill` exercise policy (default). Under `partner_fulfill`, the component emits `hts-exercise-click-confirm` instead and the partner handles fulfillment.\n\n#### hts-exercise-click-confirm\n\nFired when the user confirms their wish to cancel.\n\n**Under `hts_fulfill` policy (default):**\n\n```json\n{\n  \"type\": \"hts-exercise-click-confirm\",\n  \"data\": null\n}\n```\n\n**Under `partner_fulfill` policy:**\n\n```json\n{\n  \"type\": \"hts-exercise-click-confirm\",\n  \"data\": {\n    \"quoteId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data` | object or null | `null` under default policy; contains `quoteId` under `partner_fulfill` |\n| `data.quoteId` | string | Exercise quote ID — the partner must call `PUT /exercise_quotes/{id}/fulfill` with this ID |\n\n#### hts-exercise-click-cancel\n\nFired when the user decides not to proceed with cancellation.\n\n```json\n{\n  \"type\": \"hts-exercise-click-cancel\",\n  \"data\": null\n}\n```\n\nNo additional fields.\n\n#### hts-exercise-click-support\n\nFired when the user clicks a support or help link.\n\n```json\n{\n  \"type\": \"hts-exercise-click-support\",\n  \"data\": null\n}\n```\n\nNo additional fields.\n\n#### hts-exercise-refund-option-selected\n\nFired when the user selects a refund option (relevant for future travel credit flows).\n\n```json\n{\n  \"type\": \"hts-exercise-refund-option-selected\",\n  \"data\": null\n}\n```\n\nNo additional fields.\n\n#### hts-navigate-back\n\nFired when the user wants to navigate backward (e.g., back to trips list).\n\n```json\n{\n  \"type\": \"hts-navigate-back\",\n  \"data\": {\n    \"route\": \"trips\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.route` | string | Target route. Currently only `\"trips\"` |\n\n#### hts-scroll-to-top\n\nFired when the component transitions to a new page and the host should scroll to the top.\n\n```json\n{\n  \"type\": \"hts-scroll-to-top\",\n  \"data\": {\n    \"behavior\": \"instant\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `data.behavior` | string | `\"instant\"` or `\"smooth\"` — the recommended scroll behavior |\n\n#### hts-exit\n\nFired when the user is exiting the exercise flow (flow completed or user chose to leave).\n\n```json\n{\n  \"type\": \"hts-exit\",\n  \"data\": null\n}\n```\n\nNo additional fields.\n\n## Ingress Events (Partner → Component)\n\nThe host page can send commands to the component via `postMessage`.\n\n| Event Type | Description | Use Case |\n| -- | -- | -- |\n| `hts-external-navigation` | Drive page navigation | Headless mode — host controls forward/backward navigation |\n| `hts-theme` | Apply a custom theme at runtime | Override design tokens dynamically after the component has loaded |\n\n> **Targeting:** For web component integration, post to `window` with origin `{{HTS_ORIGIN}}`. For iframe integration, post to `iframe.contentWindow`. Examples below show both.\n\n### hts-external-navigation\n\nDrives navigation within the exercise flow. Used in headless mode when the host page provides its own navigation controls.\n\n```json\n{ \"type\": \"hts-external-navigation\", \"data\": { \"direction\": \"forward\" } }\n```\n\n| Field | Type | Values | Description |\n| -- | -- | -- | -- |\n| `type` | string | `\"hts-external-navigation\"` | Event type |\n| `data.direction` | string | `\"forward\"`, `\"backward\"` | Navigation direction |\n\n**Web Component:**\n\n```javascript\n// Advance to the next step\nwindow.postMessage({\n  type: 'hts-external-navigation',\n  data: { direction: 'forward' }\n}, '{{HTS_ORIGIN}}');\n```\n\n<details>\n<summary><strong>Iframe</strong></summary>\n\n```javascript\nconst iframe = document.getElementById('hts-exercise');\niframe.contentWindow.postMessage({\n  type: 'hts-external-navigation',\n  data: { direction: 'forward' }\n}, '{{HTS_ORIGIN}}');\n```\n\n</details>\n\n### hts-theme\n\nApplies a custom theme to the component at runtime by sending a partial map of design token overrides. Any subset of tokens can be sent; omitted tokens keep their current values.\n\nFor initial theming, CSS custom properties on the host element are preferred (see [Theming](#section/Exercise-Component-Integration/Theming)). Use this event for dynamic theme changes after the component has loaded.\n\n```json\n{\n  \"type\": \"hts-theme\",\n  \"tokens\": {\n    \"colorPrimary\": \"#1a73e8\",\n    \"fontFamilyBase\": \"Inter, sans-serif\"\n  }\n}\n```\n\n| Field | Type | Description |\n| -- | -- | -- |\n| `type` | string | Event type |\n| `tokens` | object | Partial map of design token names to string values. See the [CSS Custom Properties](#section/Exercise-Component-Integration/CSS-Custom-Properties) table for valid token names. |\n\n**Web Component:**\n\n```javascript\nwindow.postMessage({\n  type: 'hts-theme',\n  tokens: { colorPrimary: '#1a73e8' }\n}, '{{HTS_ORIGIN}}');\n```\n\n<details>\n<summary><strong>Iframe</strong></summary>\n\n```javascript\nconst iframe = document.getElementById('hts-exercise');\niframe.contentWindow.postMessage({\n  type: 'hts-theme',\n  tokens: { colorPrimary: '#1a73e8' }\n}, '{{HTS_ORIGIN}}');\n```\n\n</details>\n\n## Exercise Policies\n\nThe exercise component supports two policies that determine who handles the actual cancellation fulfillment:\n\n### hts_fulfill (Default)\n\nHTS handles the full exercise lifecycle — the component calls the fulfill API, cancels the booking via callback to the partner, processes the refund, and shows the result. The component emits `hts-exercise` events with status `pending` → `success` / `error`.\n\n### partner_fulfill\n\nThe component displays the cancellation summary and collects user confirmation, but does **not** call fulfill. Instead, it emits `hts-exercise-click-confirm` with a `quoteId`. The partner must:\n\n1. Cancel the booking on their end.\n2. Call `PUT /exercise_quotes/{quoteId}/fulfill` to complete the exercise.\n\nThis policy is configured per-tenant. Partners using this policy should listen for `hts-exercise-click-confirm` and handle the fulfillment API call from their backend.\n\n## Headless Mode\n\nWhen `headless=true` is passed as a URL parameter, the component hides its built-in navigation buttons and success/error screens. The host page is responsible for:\n\n1. **Driving navigation** — send `hts-external-navigation` events with `direction: \"forward\"` or `\"backward\"` to move between steps.\n2. **Handling scroll** — listen for `hts-scroll-to-top` and scroll the container.\n3. **Showing results** — listen for `hts-exercise` (or `hts-exercise-click-confirm` under `partner_fulfill`) and display your own confirmation UI.\n\nHeadless mode is useful when embedding the exercise flow within a partner's existing booking management UI, where the partner wants full control over the surrounding layout and navigation.\n\n## Theming\n\n### Web Component: CSS Custom Properties\n\nThe component renders in Shadow DOM with isolated styling. CSS custom properties pierce the Shadow DOM boundary, so you can set them on the host element or an ancestor.\n\nIf no custom properties are set, the component uses the defaults below. HTS may also apply partner-specific themes server-side based on `partnerId`.\n\n**Header & Borders**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-header-fg` | `colorHeaderFg` | `light-dark(rgb(23, 46, 94), rgb(119, 158, 255))` | Header title and icon |\n| `--hts-color-header-bg` | `colorHeaderBg` | `light-dark(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))` | Header fill |\n| `--hts-color-header-background` | `colorHeaderBackground` | `light-dark(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))` | Deprecated alias of `colorHeaderBg`. Prefer `colorHeaderBg`. If both are set, `colorHeaderBg` wins. |\n| `--hts-color-border` | `colorBorder` | `light-dark(rgb(217, 217, 217), rgb(217, 217, 217))` | Banner, option card, and radio strokes |\n| `--hts-color-option-hover-bg` | `colorOptionHoverBg` | `light-dark(rgb(246, 246, 246), rgb(17, 17, 17))` | Option card hover fill |\n\nFocus, selected-option border, and the terms link follow `colorPrimary`. Partners who set an opaque header fill must also set `colorHeaderFg`; the widget does not auto-correct contrast. Hosts who theme the card surface should also set `colorOptionHoverBg` if they do not want the default grey hover.\n\n**Brand Colors**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-primary` | `colorPrimary` | `#2f394e` | Selected option border, radio button fill, bullet icons |\n| `--hts-color-primary-lighter` | `colorPrimaryLighter` | `#eff3ff` | Header icon background, light accent surfaces |\n| `--hts-color-secondary` | `colorSecondary` | `#4f46e5` | Secondary accent elements, links |\n\n**Text Colors**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-text-primary` | `colorTextPrimary` | `#181d29` | Main body text, headings |\n| `--hts-color-text-secondary` | `colorTextSecondary` | `#6B7280` | Descriptions, secondary labels, muted text |\n\n**Status Colors**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-color-status-success` | `colorStatusSuccess` | `#56C470` | Success status indicators |\n| `--hts-color-success-fg` | `colorSuccessFg` | `#27c281` | Success text, bullet point icons, checkmarks |\n| `--hts-color-success-bg` | `colorSuccessBg` | `#e8f8f0` | Success message background |\n| `--hts-color-error-fg` | `colorErrorFg` | `#CC2427` | Error text, validation messages |\n| `--hts-color-error-bg` | `colorErrorBg` | `#f9eff1` | Error message background |\n| `--hts-color-warning-fg` | `colorWarningFg` | `#a7173c` | Warning text, warning icon |\n| `--hts-color-warning-bg` | `colorWarningBg` | `#f9eff1` | Warning banner background |\n\n**Typography**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-font-family-base` | `fontFamilyBase` | `'Proxima Nova', sans-serif` | All text in the component |\n| `--hts-font-size-body-md` | `fontSizeBodyMd` | `14px` | Standard body text |\n| `--hts-font-size-body-sm` | `fontSizeBodySm` | `12px` | Small body text, captions |\n| `--hts-font-size-body-xs` | `fontSizeBodyXs` | `10px` | Fine print, disclaimers |\n| `--hts-font-size-title-lg` | `fontSizeTitleLg` | `20px` | Large titles, main heading |\n| `--hts-font-size-title-md` | `fontSizeTitleMd` | `16px` | Medium titles, section headings |\n| `--hts-font-size-title-sm` | `fontSizeTitleSm` | `14px` | Small titles, option labels |\n| `--hts-font-weight-base` | `fontWeightBase` | `400` | Normal text weight |\n| `--hts-font-weight-emphasis` | `fontWeightEmphasis` | `600` | Emphasized text (prices, key values) |\n| `--hts-font-weight-headline` | `fontWeightHeadline` | `700` | Headlines, section headers |\n| `--hts-font-style-headline` | `fontStyleHeadline` | `normal` | Headline font style (`normal`, `italic`, or `oblique`) |\n| `--hts-font-weight-title` | `fontWeightTitle` | `700` | Titles within options |\n\n**Layout**\n\n| CSS Custom Property | Token | Default | Used For |\n| -- | -- | -- | -- |\n| `--hts-border-radius-base` | `borderRadiusBase` | `8px` | Border radius on cards, buttons, containers |\n\n```css\nhts-fintech-exercise {\n  --hts-color-primary: #1a73e8;\n  --hts-color-secondary: #ea4335;\n  --hts-color-header-fg: #1a73e8;\n  --hts-color-header-bg: transparent;\n  --hts-color-border: #d9d9d9;\n  --hts-color-option-hover-bg: #f6f6f6;\n  --hts-font-family-base: 'Inter', sans-serif;\n  --hts-font-style-headline: normal;\n  --hts-border-radius-base: 12px;\n}\n```\n\n<details>\n<summary><strong>Iframe: hts-theme Event</strong></summary>\n\nCSS custom properties cannot cross iframe boundaries. For iframe integrations, use the `hts-theme` ingress event to send design token overrides. The token names correspond to the \"Token\" column in the tables above.\n\n```javascript\nconst iframe = document.getElementById('hts-exercise');\niframe.contentWindow.postMessage({\n  type: 'hts-theme',\n  tokens: {\n    colorPrimary: '#1a73e8',\n    colorSecondary: '#ea4335',\n    colorHeaderFg: '#1a73e8',\n    colorHeaderBg: 'transparent',\n    colorBorder: '#d9d9d9',\n    colorOptionHoverBg: '#f6f6f6',\n    fontFamilyBase: 'Inter, sans-serif',\n    fontStyleHeadline: 'normal',\n    borderRadiusBase: '12px'\n  }\n}, '{{HTS_ORIGIN}}');\n```\n\nSee the [hts-theme ingress event](#section/Exercise-Component-Integration/hts-theme) for the full specification.\n\n</details>\n\n## Responsive Sizing\n\nThe component is fully responsive. The partner controls the **container width** — the component fills the available width and adjusts its **height dynamically** based on content.\n\nAfter each resize, the component emits an `hts-dimension` event:\n\n```json\n{\n  \"type\": \"hts-dimension\",\n  \"data\": { \"width\": 800, \"height\": 600 }\n}\n```\n\n- **Web component:** The component flows inline — height adjusts automatically. The `hts-dimension` event is informational.\n- **Iframe:** You **must** listen for `hts-dimension` and update the iframe's height (see the iframe embedding example above).\n\n## Security\n\n| | Web Component | Iframe |\n| -- | -- | -- |\n| **CSP** | `script-src 'self' {{HTS_ORIGIN}}; connect-src 'self' {{HTS_ORIGIN}};` | `frame-src 'self' {{HTS_ORIGIN}};` |\n| **Origin check** | Verify `event.origin` on all `message` events | Same |\n| **HTTPS** | Required in production | Required in production |\n\n## Loading Tolerance\n\nIf the `hts-ready` event is not received within a reasonable tolerance period after embedding the component, the hosting application should hide the widget and provide an alternative cancellation path. This prevents user experience degradation if the component fails to load.\n"
    },
    {
      "name": "Partner Self-Service Exercise",
      "description": "For cases where the partner-owned frontend handles the orchestration of the self-service exercise, and HTS provides the backend logic to expose rebooking options, refund breakdowns, and actually fulfill the exercise."
    },
    {
      "name": "Partner Manual Exercise",
      "description": "For cases where the regular, automated flow is not possible: the partner cancelled the reservation and refunded the customer on its own, and informs HTS of the exercise after the fact."
    },
    {
      "name": "Analytics",
      "description": "Endpoints for tracking events and analytics data."
    },
    {
      "name": "Partner Endpoints",
      "description": "Endpoints that partners must implement and that HTS calls on-demand."
    }
  ],
  "servers": [
    {
      "url": "https://fintech.htsapis.com/lodging-cfar/v2",
      "description": "Production"
    },
    {
      "url": "https://fintech.staging.htsapis.com/lodging-cfar/v2",
      "description": "Staging"
    }
  ],
  "paths": {
    "/offers": {
      "post": {
        "tags": [
          "Offer & Merchandising"
        ],
        "summary": "Create CFAR Offers",
        "description": "Create CFAR offers for a user's shopped lodging units.",
        "operationId": "postOffers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/create_cfar_offer_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The created CFAR offers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/create_cfar_offer_response"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_create_cfar_offer_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/offers/price": {
      "post": {
        "tags": [
          "Offer & Merchandising"
        ],
        "summary": "Price CFAR Offers",
        "description": "Price offers for a customer's reservation.",
        "operationId": "postOffersPrice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/price_cfar_offer_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Offers priced for a given reservation. There will be at least one type of offer returned. If no offers are available, a 204 No Content will be returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/price_cfar_offer_response"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_price_cfar_offer_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders": {
      "post": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Create a CFAR Order",
        "description": "Create a CFAR Order to begin the purchase.\n\nHTS uses an external payment gateway to tokenize payment cards as well as process payments and payouts.\nWhen HTS is the Merchant of Record (MOR) for the purchase of the order or remitting any product payout to a customer's credit card, HTS requires a tokenized credit card to be present in the `payments` array in the request below.\n\n<details>\n<summary>Expand this section for instructions about testing and Spreedly integration.</summary>\n\nThe returned payment method token **MxyYEhDK12CUAA18bJDkAq0ab3y** (from the sample response below) should be passed in the `payment_card` type with a `token` identifier as a part of the `payments` array in the request below.\n\nWhen using the staging environment, make sure to use one of [Adyen's test credit card numbers](https://docs.adyen.com/development-resources/testing/test-card-numbers).\n\n**Tokenization URL**: `https://core.spreedly.com/v1/payment_methods.json`\n\n- Documentation: [Spreedly API docs](https://developer.spreedly.com/reference/create-payment-method)\n\n**Example Tokenization Request**:\n\n```\ncurl --request POST --url https://core.spreedly.com/v1/payment_methods.json --header 'content-type: application/json' -u  \"login:password\" --data '{\n\t\"payment_method\": {\n\t\t\"email\": \"aaa@bbb.com\",\n\t\t\"credit_card\": {\n\t\t\t\"number\": \"4000020000000000\",\n\t\t\t\"month\": \"03\",\n\t\t\t\"year\": \"2030\",\n\t\t\t\"first_name\": \"John\",\n\t\t\t\"last_name\": \"Smith\",\n\t\t\t\"address1\": \"123 12th St\",\n\t\t\t\"address2\": \"Building B\",\n\t\t\t\"city\": \"Boston\",\n\t\t\t\"state\": \"MA\",\n\t\t\t\"zip\": \"02121\",\n\t\t\t\"country\": \"US\",\n\t\t\t\"verification_value\": \"737\"\n\t\t}\n\t}\n}'\n```\n**Example Tokenization Response**:\n```\n{\n\t\"transaction\": {\n\t\t\"token\": \"KtToV20m9qT1Yi8pbTeLNz0Ypns\",\n\t\t\"created_at\": \"2023-11-29T13:31:56Z\",\n\t\t\"updated_at\": \"2023-11-29T13:31:56Z\",\n\t\t\"succeeded\": true,\n\t\t\"transaction_type\": \"AddPaymentMethod\",\n\t\t\"retained\": false,\n\t\t\"state\": \"succeeded\",\n\t\t\"message_key\": \"messages.transaction_succeeded\",\n\t\t\"message\": \"Succeeded!\",\n\t\t\"payment_method\": {\n\t\t\t\"token\": \"MxyYEhDK12CUAA18bJDkAq0ab3y\",\n\t\t\t\"created_at\": \"2023-11-29T13:31:56Z\",\n\t\t\t\"updated_at\": \"2023-11-29T13:31:56Z\",\n\t\t\t\"email\": \"aaa@bbb.com\",\n\t\t\t\"data\": null,\n\t\t\t\"storage_state\": \"cached\",\n\t\t\t\"test\": true,\n\t\t\t\"metadata\": null,\n\t\t\t\"callback_url\": null,\n            \"last_four_digits\": \"0000\",\n            \"first_six_digits\": \"400002\",\n\t\t\t\"card_type\": \"visa\",\n\t\t\t\"first_name\": \"John\",\n\t\t\t\"last_name\": \"Smith\",\n\t\t\t\"month\": 3,\n\t\t\t\"year\": 2030,\n\t\t\t\"address1\": \"123 12th St\",\n\t\t\t\"address2\": \"Building B\",\n            \"city\": \"Boston\",\n            \"state\": \"MA\",\n            \"zip\": \"02121\",\n            \"country\": \"US\",\n\t\t\t\"phone_number\": null,\n\t\t\t\"company\": null,\n\t\t\t\"full_name\": \"John Smith\",\n\t\t\t\"eligible_for_card_updater\": true,\n\t\t\t\"shipping_address1\": null,\n\t\t\t\"shipping_address2\": null,\n\t\t\t\"shipping_city\": null,\n\t\t\t\"shipping_state\": null,\n\t\t\t\"shipping_zip\": null,\n\t\t\t\"shipping_country\": null,\n\t\t\t\"shipping_phone_number\": null,\n\t\t\t\"issuer_identification_number\": \"40000200\",\n\t\t\t\"click_to_pay\": false,\n\t\t\t\"managed\": true,\n\t\t\t\"payment_method_type\": \"credit_card\",\n\t\t\t\"errors\": [],\n\t\t\t\"bin_metadata\": {\n\t\t\t\t\"message\": \"BIN Metadata is available only to Advanced Vault enrolled customers and payment methods. Reach out to your account representative for more details.\"\n\t\t\t},\n\t\t\t\"fingerprint\": \"7ccffcf38900f224fc946cf2a9c8e260072b\",\n\t\t\t\"verification_value\": \"XXX\",\n\t\t\t\"number\": \"XXXX-XXXX-XXXX-0000\"\n\t\t}\n\t}\n}\n```\n</details>\n",
        "operationId": "postOrders",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Unique key that makes resource creation idempotent. Send the same value when retrying a request to avoid creating duplicate resources. Send a new key to create a new resource.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "d96b9fde-b3d5-4a92-b557-332d3c0f7df0"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/create_cfar_order_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The created CFAR order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cfar_order"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "409": {
            "description": "The request conflicts with another request currently being processed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_create_cfar_order_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/{id}/purchase": {
      "put": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Purchase a CFAR Order",
        "description": "Purchase a CFAR Order. When HTS is merchant of record, HTS will charge the customer during this request.",
        "operationId": "putOrdersIdPurchase",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR order.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/purchase_cfar_order_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The purchased CFAR order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cfar_order"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_purchase_cfar_order_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/{id}/void": {
      "put": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Void a CFAR Order",
        "description": "\n Void a CFAR Order.\n This will void all contracts associated with the order, and no further action can be taken on the order or any of its contracts.\n It will also refund CFAR's cost if HTS charged it during booking.\n Request body is optional for backwards compatibility - if not provided, reason defaults to Unknown.\n ",
        "operationId": "putOrdersIdVoid",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR order.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/void_cfar_order_request"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "The voided CFAR order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cfar_order"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_void_cfar_order_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/{id}/cancel": {
      "put": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Cancel a CFAR Order",
        "description": "\n Cancel a CFAR Order.\n This will cancel all contracts associated with the order, and no further action can be taken on the order or any of its contracts.\n This will not refund any CFAR costs associated with the booking.\n Request body is optional for backwards compatibility - if not provided, reason defaults to Unknown.\n ",
        "operationId": "putOrdersIdCancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR order.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cancel_cfar_order_request"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "The cancelled CFAR order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cfar_order"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_cancel_cfar_order_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/{id}/exercise_url": {
      "post": {
        "tags": [
          "HTS Self-Service Exercise"
        ],
        "summary": "Create order exercise URL",
        "description": "Produce JWT for contract portal exercise",
        "operationId": "postOrdersIdExercise_url",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR order.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Login order exercise url with JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/create_order_exercise_url_response"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/{id}/exercise_quotes": {
      "post": {
        "tags": [
          "Partner Self-Service Exercise"
        ],
        "summary": "Create CFAR Exercise Quote",
        "description": "Create a quote for how CFAR would be exercised.",
        "operationId": "postOrdersIdExercise_quotes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR order.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The exercise quote for exercising CFAR contract(s)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cfar_exercise_quote"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_quote_exercise_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/exercise_quotes/{id}/fulfill": {
      "put": {
        "tags": [
          "Partner Self-Service Exercise"
        ],
        "summary": "Fulfill CFAR Exercise Quote",
        "description": "Fulfill a CFAR Exercise Quote. When applicable, HTS will payout the exercise amount to the user.",
        "operationId": "putExercise_quotesIdFulfill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR exercise quote.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_fulfill_exercise_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/{id}/exercise": {
      "put": {
        "tags": [
          "Partner Manual Exercise"
        ],
        "summary": "Manual CFAR Exercise",
        "description": "\nManually exercise a CFAR.\nThis should only be used if the regular, automated flow is not possible and so the partner has manually performed the exercise\nand so this is informing HTS of their actions.\n",
        "operationId": "putOrdersIdExercise",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR order.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/manual_order_exercise_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_manual_order_exercise_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/offers/{id}": {
      "get": {
        "tags": [
          "Offer & Merchandising"
        ],
        "summary": "Get CFAR Offer",
        "description": "Get CFAR offer.",
        "operationId": "getOffersId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR offer.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "display_currency",
            "in": "query",
            "description": "Optional display-only currency (3-letter ISO 4217). When supplied and different from the offer currency, the response includes a converted `display_details` object. The contract currency and amounts are never changed.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The CFAR offer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cfar_offer"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_get_cfar_offer_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/{id}": {
      "get": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Get CFAR Order",
        "description": "Get CFAR Order.",
        "operationId": "getOrdersId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CFAR Order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cfar_order"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/search": {
      "post": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Search Orders",
        "description": "Search for CFAR orders.",
        "operationId": "postOrdersSearch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/search_orders_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The CFAR orders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/search_orders_response"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/contracts/{id}": {
      "get": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Get CFAR Contract",
        "description": "Get CFAR Contract.",
        "operationId": "getContractsId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CFAR Contract",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cfar_contract"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/orders/{id}/user_projected_payouts": {
      "post": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Get User Projected Payouts",
        "description": "\nReturns the projected outcome for the user if they exercised CFAR on the given contracts within this order,\nin the same shape as an exercise quote's `user_outcome`: the legs the partner refunds by payment method, the\nHTS-funded leg, and the property-funded leg, combined across the included contracts. Read-only; does not\ncreate an exercise quote.\n\nThe projection is evaluated as of just before the contracts expire, so cancellation penalties are fully\naccrued. For bookings with a pay-later payment schedule, the projection assumes the schedule is fully paid\n(the maximum refund); a customer who exercises before completing the schedule would receive less.\n\nWith `full_order`, contracts that cannot be projected (exercised, voided, cancelled, expired or not\npurchased) are skipped, and 422 is returned only if none of the order's contracts can be projected. With\n`by_contracts`, 422 is returned if any requested contract cannot be projected. The body carries the\nspecific reason for each contract.\n",
        "operationId": "postOrdersIdUser_projected_payouts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the CFAR order.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/user_payouts_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The projected payout breakdown. For bookings with a pay-later payment schedule, the breakdown assumes the schedule is fully paid (the maximum refund); a customer who exercises before completing the schedule would receive less.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user_payouts_response"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unprocessable_entity_user_payouts_error"
                }
              }
            }
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/contracts/search": {
      "post": {
        "tags": [
          "Contract Management"
        ],
        "summary": "Search Contracts",
        "description": "Search for CFAR contracts.",
        "operationId": "postContractsSearch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/search_contracts_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The CFAR contracts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/search_contracts_response"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/events": {
      "post": {
        "tags": [
          "Analytics"
        ],
        "summary": "Create Event",
        "description": "Create a new event for the provided session.",
        "operationId": "postEvents",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/send_event_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          },
          "503": {
            "description": "The server is overloaded or undergoing maintenance"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/merchandising_contents": {
      "put": {
        "tags": [
          "Offer & Merchandising"
        ],
        "summary": "Create Merchandising Contents",
        "description": "Create merchandising contents for product offer(s)",
        "operationId": "putMerchandising_contents",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/merchandising_contents_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The merchandising contents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchandising_contents_response"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The client could not be authenticated"
          },
          "403": {
            "description": "The authenticated client does not have permission to call this endpoint"
          },
          "499": {
            "description": "The client cancelled the request"
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        },
        "security": [
          {},
          {
            "TenantAuth": []
          }
        ]
      }
    },
    "/get_booking": {
      "get": {
        "tags": [
          "Partner Endpoints"
        ],
        "summary": "Get Booking",
        "description": "Called by HTS to retrieve the current state of a lodging booking from the partner system.\n\nHTS calls this endpoint after purchase confirmation, during exercise to determine payout\namounts based on current payment state, and periodically for product reconciliation to\nensure system state consistency.\n\nThe recommended response includes:\n- **Reservation details** — reservation ID, confirmation ID, status, check-in/check-out dates, and price breakdown (base, taxes, fees)\n- **Property, unit & rate** — property ID, unit ID, and rate ID, each matching the identifiers sent on the create-offer request; plus property name, chain name, and check-in time\n- **Currency** — ISO 4217 currency code for all monetary amounts\n- **Payment transactions** — amount, timestamp, transaction type (UserCharge, UserRefund), and payment type (PaymentCard, NotProvided, etc.). HTS uses the current payment state to reconcile how much the customer should be paid out during exercise.\n- **CFAR order ID** — HTS order ID if a CFAR contract is associated with the booking\n- **Cancel URL** — URL for the customer to initiate cancellation\n\nPartner implementations may vary in structure and field naming. HTS is designed to handle\nthese variations gracefully, including partner-specific reservation status values.",
        "operationId": "get_booking",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/get_booking_response"
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        }
      }
    },
    "/cancel_booking": {
      "post": {
        "tags": [
          "Partner Endpoints"
        ],
        "summary": "Cancel Booking",
        "description": "Called by HTS to cancel a lodging booking.\n\nHTS calls this endpoint when it needs to initiate a cancellation on the partner's side.\nThe specific scenarios in which this is used depend on the integration — some partners\nhandle cancellation entirely on their end during exercise, while others rely on HTS to\ntrigger it. May be processed synchronously (204) or asynchronously (202).\n\nThe request includes:\n- **Unit booking IDs** — IDs of the rooms/units to cancel\n- **Payouts** — refund amounts and payment method types",
        "operationId": "cancel_booking",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cancel_booking_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted for asynchronous processing"
          },
          "204": {
            "description": "Completed successfully"
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        }
      }
    },
    "/search_bookings": {
      "get": {
        "tags": [
          "Partner Endpoints"
        ],
        "summary": "Search Bookings",
        "description": "Called by HTS during nightly reconciliation to list the partner's CFAR bookings and reconcile them\nagainst the HTS store.\n\n`from` is required and `to` is optional; when `to` is omitted, every CFAR booking from `from` onward is returned.\n\nThe response is a JSON array of CFAR bookings. Each element has the same shape as the Get Booking\nresponse.",
        "operationId": "search_bookings",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Start of the date range to search, in ISO 8601 local date format.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the date range to search, in ISO 8601 local date format. When omitted, the range is open at the end.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/get_booking_response"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Syntactic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested resource could not be found"
          },
          "422": {
            "description": "Semantic errors were encountered while handling the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/error"
                  }
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an internal error"
          }
        }
      }
    }
  },
  "webhooks": {
    "contract_purchased": {
      "post": {
        "summary": "Contract Purchased",
        "description": "Sent when a CFAR contract is successfully purchased and confirmed.",
        "operationId": "contract_purchased",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_purchased"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Acknowledged successfully."
          },
          "400": {
            "description": "Invalid value for: body",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "The client has sent too many requests in a given amount of time"
          },
          "500": {
            "description": "The server encountered an internal error"
          },
          "503": {
            "description": "The server is overloaded or undergoing maintenance"
          }
        }
      }
    },
    "contract_voided": {
      "post": {
        "summary": "Contract Voided",
        "description": "Sent when a CFAR contract is voided (price refunded, before purchase confirmation).",
        "operationId": "contract_voided",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_voided"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Acknowledged successfully."
          },
          "400": {
            "description": "Invalid value for: body",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "The client has sent too many requests in a given amount of time"
          },
          "500": {
            "description": "The server encountered an internal error"
          },
          "503": {
            "description": "The server is overloaded or undergoing maintenance"
          }
        }
      }
    },
    "contract_canceled": {
      "post": {
        "summary": "Contract Canceled",
        "description": "Sent when a CFAR contract is canceled (after purchase, price not refunded).",
        "operationId": "contract_canceled",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_canceled"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Acknowledged successfully."
          },
          "400": {
            "description": "Invalid value for: body",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "The client has sent too many requests in a given amount of time"
          },
          "500": {
            "description": "The server encountered an internal error"
          },
          "503": {
            "description": "The server is overloaded or undergoing maintenance"
          }
        }
      }
    },
    "contract_exercised": {
      "post": {
        "summary": "Contract Exercised",
        "description": "Sent when a customer has successfully exercised their CFAR contract.",
        "operationId": "contract_exercised",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contract_exercised1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Acknowledged successfully."
          },
          "400": {
            "description": "Invalid value for: body",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "The client has sent too many requests in a given amount of time"
          },
          "500": {
            "description": "The server encountered an internal error"
          },
          "503": {
            "description": "The server is overloaded or undergoing maintenance"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "address": {
        "title": "address",
        "description": "The property's address.",
        "type": "object",
        "required": [
          "street_address",
          "locality",
          "country_code",
          "coordinates"
        ],
        "properties": {
          "street_address": {
            "description": "The street address.",
            "examples": [
              "138 St James Ave"
            ],
            "type": "string",
            "minLength": 1
          },
          "locality": {
            "description": "The city, town, or village.",
            "examples": [
              "Boston"
            ],
            "type": "string",
            "minLength": 1
          },
          "country_code": {
            "description": "The 2 uppercase letter ISO country code.",
            "examples": [
              "US"
            ],
            "type": "string",
            "minLength": 1
          },
          "region": {
            "description": "The state, province, territory, or region.",
            "examples": [
              "MA"
            ],
            "type": "string",
            "minLength": 1
          },
          "postal_code": {
            "description": "The postal or zip code.",
            "examples": [
              "02116"
            ],
            "type": "string",
            "minLength": 1
          },
          "coordinates": {
            "$ref": "#/components/schemas/coordinates"
          }
        }
      },
      "agent": {
        "title": "agent",
        "description": "The agent operating the session. Expected from every agent portal integration.",
        "type": "object",
        "required": [
          "id",
          "account_created_at",
          "verification_status"
        ],
        "properties": {
          "id": {
            "description": "The ID of the agent.",
            "examples": [
              "a420c244-06c0-40cf-b004-a1f390f069cc"
            ],
            "type": "string",
            "minLength": 1
          },
          "account_created_at": {
            "description": "When the agent's account was created in the partner's system, in UTC.",
            "examples": [
              "2026-08-14T09:31:00Z"
            ],
            "type": "string",
            "format": "date-time"
          },
          "verification_status": {
            "$ref": "#/components/schemas/verification_status"
          }
        }
      },
      "agent_commission": {
        "title": "agent_commission",
        "description": "Commission payable to the travel agent.",
        "type": "object",
        "required": [
          "amount",
          "payable_date"
        ],
        "properties": {
          "amount": {
            "description": "Monetary amount payable to the agent, in the offer's currency.",
            "examples": [
              "1.20"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          },
          "payable_date": {
            "description": "Informs the agent of when their commission becomes payable — agents should not expect payment before this date. Commissions are not paid if the reservation is cancelled - the traveller must check-in.",
            "examples": [
              "2026-08-15"
            ],
            "type": "string",
            "format": "date"
          }
        }
      },
      "agent_reseller": {
        "title": "agent_reseller",
        "description": "The partner's channel that is interacting with the API.",
        "type": "object",
        "required": [
          "agency_id",
          "agent",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "agent_reseller",
            "description": "value: `agent_reseller`"
          },
          "agency_id": {
            "description": "The ID of the agency.",
            "examples": [
              "858695eb-db27-406a-b9dd-a76af17b7d1c"
            ],
            "type": "string",
            "minLength": 1
          },
          "agent": {
            "$ref": "#/components/schemas/agent"
          }
        }
      },
      "already_exercised": {
        "title": "already_exercised",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "already_exercised"
          }
        }
      },
      "alternate_payment_method": {
        "title": "alternate_payment_method",
        "type": "object",
        "required": [
          "amount",
          "method",
          "type"
        ],
        "properties": {
          "type": {
            "description": "A payment that cannot be tokenized. eg: ApplePay.",
            "examples": [
              "alternate_payment_method"
            ],
            "type": "string",
            "const": "alternate_payment_method"
          },
          "amount": {
            "examples": [
              "173.24"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          },
          "method": {
            "$ref": "#/components/schemas/method"
          }
        }
      },
      "and": {
        "title": "and",
        "type": "object",
        "required": [
          "filters",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "and",
            "description": "value: `and`"
          },
          "filters": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/composable_filter"
            }
          }
        }
      },
      "and1": {
        "title": "and",
        "type": "object",
        "required": [
          "filters",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "and",
            "description": "value: `and`"
          },
          "filters": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/composable_filter1"
            }
          }
        }
      },
      "api": {
        "title": "api",
        "description": "The partner's channel that is interacting with the API.",
        "type": "object",
        "required": [
          "client",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "api",
            "description": "value: `api`"
          },
          "client": {
            "description": "The client name of the API.",
            "type": "string",
            "minLength": 1
          }
        }
      },
      "apple_pay": {
        "title": "apple_pay",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "apple_pay",
            "description": "value: `apple_pay`"
          }
        }
      },
      "automation": {
        "title": "automation",
        "description": "The partner's system, as part of its normal cancellation flow.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "automation",
            "description": "value: `automation`"
          }
        }
      },
      "billing_info": {
        "title": "billing_info",
        "description": "Billing information of the user buying the product(s). Required if HTS is merchant of record.",
        "type": "object",
        "required": [
          "first_name",
          "last_name",
          "street_address",
          "city",
          "state_province",
          "postal_code",
          "country"
        ],
        "properties": {
          "first_name": {
            "description": "First name of the customer.",
            "type": "string",
            "minLength": 1
          },
          "last_name": {
            "description": "Last name of the customer.",
            "type": "string",
            "minLength": 1
          },
          "street_address": {
            "description": "Street address of the customer billing address.",
            "type": "string",
            "minLength": 1
          },
          "city": {
            "description": "City of the customer billing address.",
            "type": "string",
            "minLength": 1
          },
          "state_province": {
            "description": "State or province of the customer billing address.",
            "type": "string",
            "minLength": 1
          },
          "postal_code": {
            "description": "Postal code of the customer billing address.",
            "type": "string",
            "minLength": 1
          },
          "country": {
            "description": "Country of the customer billing address.",
            "examples": [
              "US"
            ],
            "type": "string",
            "pattern": "[A-Z]{2}"
          }
        }
      },
      "billing_jurisdiction": {
        "title": "billing_jurisdiction",
        "type": "object",
        "properties": {
          "country": {
            "description": "Country of the customer billing address. 2 uppercase letter ISO country code.",
            "examples": [
              "US"
            ],
            "type": "string",
            "pattern": "[A-Z]{2}"
          },
          "state_province": {
            "description": "State or province of the customer billing address.",
            "type": "string",
            "minLength": 1
          },
          "city": {
            "description": "City of the customer billing address.",
            "type": "string",
            "minLength": 1
          },
          "postal_code": {
            "description": "Postal code of the customer billing address.",
            "type": "string",
            "minLength": 1
          }
        }
      },
      "booking_confirmed": {
        "title": "booking_confirmed",
        "type": "object",
        "required": [
          "session_id",
          "occurred_at",
          "booking_information_source",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "booking_confirmed",
            "description": "value: `booking_confirmed`"
          },
          "session_id": {
            "description": "Identifies a single shopping funnel, from the initial search through to booking. A new search (including changing the search parameters) begins a new funnel with a new id.",
            "examples": [
              "c17aff84-7581-461e-8505-002d15ac368a"
            ],
            "type": "string"
          },
          "occurred_at": {
            "description": "Date and time at which the event occurred, as a UTC RFC3339 formatted datetime.",
            "type": "string",
            "format": "date-time"
          },
          "booking_information_source": {
            "$ref": "#/components/schemas/booking_information_source"
          }
        }
      },
      "booking_data": {
        "title": "booking_data",
        "description": "The details of the confirmed booking.",
        "type": "object",
        "required": [
          "check_in_date",
          "check_out_date",
          "currency",
          "property",
          "rates",
          "channel",
          "booking_references"
        ],
        "properties": {
          "check_in_date": {
            "description": "The date the guest checks in.",
            "examples": [
              "2026-09-12"
            ],
            "type": "string",
            "format": "date"
          },
          "check_out_date": {
            "description": "The date the guest checks out.",
            "examples": [
              "2026-09-14"
            ],
            "type": "string",
            "format": "date"
          },
          "currency": {
            "description": "The currency the guest was charged in. 3-letter ISO 4217 code.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "property": {
            "$ref": "#/components/schemas/booking_property"
          },
          "rates": {
            "description": "\n The rates that were booked, each with the unit it was booked for,\n its price breakdown and its cancellation penalty.\n A single-room booking has exactly one; a multi-room booking has one per booked room.\n ",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/booking_rate"
            }
          },
          "occupancy": {
            "$ref": "#/components/schemas/occupancy",
            "description": "The occupancy that was booked."
          },
          "channel": {
            "$ref": "#/components/schemas/channel",
            "description": "The partner's channel the booking was made through."
          },
          "booking_references": {
            "$ref": "#/components/schemas/map_string",
            "description": "\n IDs that are relevant to the booking. It's a dictionary of key/value pairs. Check with HTS for examples of supported keys.\n "
          },
          "user_id": {
            "description": "The ID of the user who made the booking.",
            "examples": [
              "33bb4eb2-2937-4bd3-97b1-7796206712f0"
            ],
            "type": "string"
          }
        }
      },
      "booking_information_source": {
        "title": "booking_information_source",
        "oneOf": [
          {
            "$ref": "#/components/schemas/from_booking_data"
          },
          {
            "$ref": "#/components/schemas/from_booking_references"
          },
          {
            "$ref": "#/components/schemas/not_available"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "from_booking_data": "#/components/schemas/from_booking_data",
            "from_booking_references": "#/components/schemas/from_booking_references",
            "not_available": "#/components/schemas/not_available"
          }
        }
      },
      "booking_property": {
        "title": "booking_property",
        "description": "The property that was booked.",
        "type": "object",
        "required": [
          "id",
          "property_name",
          "country_code"
        ],
        "properties": {
          "id": {
            "description": "The ID of the property in the partner's system.",
            "examples": [
              "12345"
            ],
            "type": "string"
          },
          "property_name": {
            "description": "The name of the property.",
            "examples": [
              "Fairmont Copley Plaza Boston"
            ],
            "type": "string",
            "minLength": 1
          },
          "chain_name": {
            "description": "The name of the property's chain.",
            "examples": [
              "Fairmont"
            ],
            "type": "string",
            "minLength": 1
          },
          "country_code": {
            "description": "The country the property is in, as an ISO 3166-1 alpha-2 code (2 letters, upper case).",
            "examples": [
              "US"
            ],
            "type": "string",
            "minLength": 1
          }
        }
      },
      "booking_rate": {
        "title": "booking_rate",
        "description": "A booked rate and the unit it was booked for. A multi-room booking has one per room.",
        "type": "object",
        "required": [
          "id",
          "unit_id",
          "price",
          "cancellation_penalty"
        ],
        "properties": {
          "id": {
            "description": "The ID of the booked rate in the partner's system, as sent at offer creation.",
            "examples": [
              "rate-bar-flex"
            ],
            "type": "string"
          },
          "unit_id": {
            "description": "The ID of the booked unit in the partner's system, as sent at offer creation.",
            "examples": [
              "unit-king-lux"
            ],
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/pricing"
          },
          "cancellation_penalty": {
            "$ref": "#/components/schemas/cancellation_penalty"
          }
        }
      },
      "by_contracts": {
        "title": "by_contracts",
        "description": "Project payouts for the given contracts in the order. Fails if any of them cannot be projected.",
        "type": "object",
        "required": [
          "contract_ids",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "by_contracts",
            "description": "value: `by_contracts`"
          },
          "contract_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "cancel_booking_payout": {
        "title": "cancel_booking_payout",
        "description": "A payout instruction for refunding the customer.",
        "type": "object",
        "required": [
          "amount",
          "type"
        ],
        "properties": {
          "amount": {
            "description": "Refund amount.",
            "examples": [
              "250.00"
            ],
            "type": "string",
            "minimum": 0
          },
          "type": {
            "$ref": "#/components/schemas/payment_type",
            "description": "Payment method type for this payout."
          }
        }
      },
      "cancel_booking_request": {
        "title": "cancel_booking_request",
        "description": "Request sent by HTS to cancel a lodging booking.",
        "type": "object",
        "required": [
          "unit_booking_ids",
          "payouts"
        ],
        "properties": {
          "unit_booking_ids": {
            "description": "IDs of the unit bookings (rooms) to cancel.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "payouts": {
            "description": "Payout instructions for refunding the customer.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cancel_booking_payout"
            }
          }
        }
      },
      "cancel_cfar_order_error": {
        "title": "cancel_cfar_order_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/contract_expired"
          },
          {
            "$ref": "#/components/schemas/invalid_contract_status1"
          },
          {
            "$ref": "#/components/schemas/invalid_order_status1"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "contract_expired": "#/components/schemas/contract_expired",
            "invalid_contract_status": "#/components/schemas/invalid_contract_status1",
            "invalid_order_status": "#/components/schemas/invalid_order_status1"
          }
        }
      },
      "cancel_cfar_order_request": {
        "title": "cancel_cfar_order_request",
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "$ref": "#/components/schemas/reason1"
          }
        }
      },
      "cancellation_penalty": {
        "title": "cancellation_penalty",
        "description": "\n The cancellation penalty for this rate. Use:\n - `non_refundable` if the rate is not refundable starting from booking time (i.e., if the user cancels right after booking, they won't get any refund)\n - `refundable` for anything else\n ",
        "oneOf": [
          {
            "$ref": "#/components/schemas/non_refundable1"
          },
          {
            "$ref": "#/components/schemas/refundable1"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "non_refundable": "#/components/schemas/non_refundable1",
            "refundable": "#/components/schemas/refundable1"
          }
        }
      },
      "cfar_ancillary_offer": {
        "title": "cfar_ancillary_offer",
        "description": "CFAR ancillary offers to use if the user selects this rate for this unit.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/full_offer"
          },
          {
            "$ref": "#/components/schemas/id"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "full_offer": "#/components/schemas/full_offer",
            "id": "#/components/schemas/id"
          }
        }
      },
      "cfar_ancillary_offer_group": {
        "title": "cfar_ancillary_offer_group",
        "description": "A group of CFAR ancillary offers to present to a user",
        "type": "object",
        "required": [
          "rate_id",
          "unit_id",
          "offers"
        ],
        "properties": {
          "rate_id": {
            "description": "The rate these offers belong to.",
            "type": "string"
          },
          "unit_id": {
            "description": "The unit these offers belong to.",
            "type": "string"
          },
          "offers": {
            "$ref": "#/components/schemas/cfar_ancillary_offer"
          },
          "merchandising_url": {
            "description": "Micro-site URL for offer merchandising.",
            "type": "string"
          }
        }
      },
      "cfar_contract": {
        "title": "cfar_contract",
        "type": "object",
        "required": [
          "id",
          "price",
          "payout",
          "expires_at",
          "status",
          "currency"
        ],
        "properties": {
          "id": {
            "description": "CFAR contract ID",
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/cfar_price",
            "description": "Price for CFAR."
          },
          "payout": {
            "$ref": "#/components/schemas/payout",
            "description": "Breakdown of what will be paid upon exercise."
          },
          "expires_at": {
            "description": "The instant the purchased contract will expire as a UTC (RFC3339) datetime.",
            "type": "string",
            "format": "date-time"
          },
          "unit_reservation_id": {
            "description": "\n The ID of the unit reservation (in the partner's system) associated with this contract.\n For single-unit bookings, this may be the same as `reservation_id`.\n ",
            "type": "string",
            "minLength": 1
          },
          "status": {
            "$ref": "#/components/schemas/status"
          },
          "agent_commission": {
            "$ref": "#/components/schemas/agent_commission"
          },
          "currency": {
            "description": "Currency of all money values in this contract. 3-letter ISO 4217 code.",
            "examples": [
              "USD"
            ],
            "type": "string"
          }
        }
      },
      "cfar_exercisable": {
        "title": "cfar_exercisable",
        "type": "object",
        "required": [
          "id",
          "currency",
          "user_outcome",
          "expires_at",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "cfar_exercisable",
            "description": "value: `cfar_exercisable`"
          },
          "id": {
            "description": "The ID of the quoted exercise. Use this to fulfill the exercise.",
            "type": "string"
          },
          "currency": {
            "description": "The currency all payments are in.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "user_outcome": {
            "$ref": "#/components/schemas/user_outcome",
            "description": "The outcome that the user will receive if they exercise CFAR."
          },
          "partner_outcome": {
            "$ref": "#/components/schemas/partner_outcome",
            "description": "The outcome that the partner will receive if reservation is cancelled."
          },
          "expires_at": {
            "description": "\n The date and time at which this quote expires as a UTC (RFC3339) datetime.\n After this time, a new quote must be created.\n      ",
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "cfar_exercisable1": {
        "title": "cfar_exercisable",
        "description": "Details of how the contract was exercised.",
        "type": "object",
        "required": [
          "id",
          "currency",
          "user_outcome",
          "expires_at"
        ],
        "properties": {
          "id": {
            "description": "The ID of the quoted exercise. Use this to fulfill the exercise.",
            "type": "string"
          },
          "currency": {
            "description": "The currency all payments are in.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "user_outcome": {
            "$ref": "#/components/schemas/user_outcome",
            "description": "The outcome that the user will receive if they exercise CFAR."
          },
          "partner_outcome": {
            "$ref": "#/components/schemas/partner_outcome",
            "description": "The outcome that the partner will receive if reservation is cancelled."
          },
          "expires_at": {
            "description": "\n The date and time at which this quote expires as a UTC (RFC3339) datetime.\n After this time, a new quote must be created.\n      ",
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "cfar_exercise_quote": {
        "title": "cfar_exercise_quote",
        "oneOf": [
          {
            "$ref": "#/components/schemas/cfar_exercisable"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "cfar_exercisable": "#/components/schemas/cfar_exercisable"
          }
        }
      },
      "cfar_offer": {
        "title": "cfar_offer",
        "type": "object",
        "required": [
          "id",
          "price",
          "payout",
          "currency",
          "expires_at",
          "contract_expires_at",
          "priced"
        ],
        "properties": {
          "id": {
            "description": "ID of this CFAR offer.",
            "examples": [
              "AJsheH2bNOQkxlIgwWSAQlxTeNz0PuQI4JF173CQ8qrI3BFHomJrBkQgqD6n7b-T8XutyEjE7bbUocCcqL1WHt0CINBNotBQAS0QiKg"
            ],
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/cfar_price",
            "description": "Price for CFAR."
          },
          "payout": {
            "$ref": "#/components/schemas/payout",
            "description": "Breakdown of what will be paid upon exercise."
          },
          "agent_commission": {
            "$ref": "#/components/schemas/agent_commission"
          },
          "currency": {
            "description": "Currency of all money values in this offer. 3-letter ISO 4217 code.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "expires_at": {
            "description": "The instant at which this offer expires as a UTC (RFC3339) datetime. After this time, a new offer must be created.",
            "type": "string",
            "format": "date-time"
          },
          "contract_expires_at": {
            "description": "If this offer is purchased, this is the instant the purchased contract will expire as a UTC (RFC3339) datetime.",
            "type": "string",
            "format": "date-time"
          },
          "priced": {
            "description": "Whether this is a priced offer or not. A priced offer is required to create an order.",
            "type": "boolean"
          },
          "rate_id": {
            "description": "The rate this offer belong to.",
            "type": "string"
          },
          "unit_id": {
            "description": "The unit this offer belong to.",
            "type": "string"
          },
          "display_details": {
            "$ref": "#/components/schemas/display_details"
          }
        }
      },
      "cfar_order": {
        "title": "cfar_order",
        "type": "object",
        "required": [
          "id",
          "payments",
          "contracts",
          "currency"
        ],
        "properties": {
          "id": {
            "description": "The order ID that groups all `contracts` together.",
            "type": "string"
          },
          "payments": {
            "description": "\n List of payment methods used to pay for this order, for all contracts,\n including both the unit and any other charges in the same booking.\n If the partner is MOR on CFAR payment, this should also include CFAR's cost.\n All amount must be in the same currency as the one specified on the order.\n This is from the point of view of the end user.\n ",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/payment"
            }
          },
          "contracts": {
            "description": "The list of contracts included in this order.",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/cfar_contract"
            }
          },
          "reservation_id": {
            "description": "The ID of the reservation (in the partner's system) associated with this order.",
            "type": "string",
            "minLength": 1
          },
          "currency": {
            "description": "Currency of all money values in this order and associated contracts. 3-letter ISO 4217 code.",
            "examples": [
              "USD"
            ],
            "type": "string"
          }
        }
      },
      "cfar_price": {
        "title": "cfar_price",
        "type": "object",
        "required": [
          "total_amount",
          "base_amount"
        ],
        "properties": {
          "total_amount": {
            "description": "The total amount for CFAR, including base and taxes.",
            "examples": [
              "12.00"
            ],
            "type": "string"
          },
          "base_amount": {
            "description": "The base amount for CFAR.",
            "examples": [
              "10.00"
            ],
            "type": "string"
          },
          "taxes": {
            "description": "The taxes for this price.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tax"
            }
          }
        }
      },
      "channel": {
        "title": "channel",
        "oneOf": [
          {
            "$ref": "#/components/schemas/agent_reseller"
          },
          {
            "$ref": "#/components/schemas/api"
          },
          {
            "$ref": "#/components/schemas/direct"
          },
          {
            "$ref": "#/components/schemas/online_booking_tool"
          },
          {
            "$ref": "#/components/schemas/white_label"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "direct": "#/components/schemas/direct",
            "agent_reseller": "#/components/schemas/agent_reseller",
            "api": "#/components/schemas/api",
            "online_booking_tool": "#/components/schemas/online_booking_tool",
            "white_label": "#/components/schemas/white_label"
          }
        }
      },
      "charge_back": {
        "title": "charge_back",
        "description": "Customer performed a charge back on the order",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "charge_back",
            "description": "value: `charge_back`"
          }
        }
      },
      "composable_filter": {
        "title": "composable_filter",
        "oneOf": [
          {
            "$ref": "#/components/schemas/field"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "field": "#/components/schemas/field"
          }
        }
      },
      "composable_filter1": {
        "title": "composable_filter",
        "oneOf": [
          {
            "$ref": "#/components/schemas/field1"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "field": "#/components/schemas/field1"
          }
        }
      },
      "contact_info": {
        "title": "contact_info",
        "description": "Contact information of the user buying the product(s).",
        "type": "object",
        "required": [
          "email_address"
        ],
        "properties": {
          "email_address": {
            "$ref": "#/components/schemas/email_address"
          }
        }
      },
      "contract_canceled": {
        "title": "contract_canceled",
        "description": "Webhook sent when a CFAR contract is canceled.",
        "type": "object",
        "required": [
          "id",
          "type",
          "occurred_at",
          "data"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier for this webhook event.",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/contract_canceled1"
          },
          "occurred_at": {
            "description": "Timestamp when the event occurred (ISO 8601).",
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/data2"
          }
        }
      },
      "contract_canceled1": {
        "title": "contract_canceled",
        "description": "The webhook event type: `fintech.lodging.cfar.contract.canceled`",
        "type": "object"
      },
      "contract_exercised": {
        "title": "contract_exercised",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "contract_exercised"
          }
        }
      },
      "contract_exercised1": {
        "title": "contract_exercised",
        "description": "Webhook sent when a customer has successfully exercised their CFAR contract.",
        "type": "object",
        "required": [
          "id",
          "type",
          "occurred_at",
          "data"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier for this webhook event.",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/contract_exercised2"
          },
          "occurred_at": {
            "description": "Timestamp when the event occurred (ISO 8601).",
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/data3"
          }
        }
      },
      "contract_exercised2": {
        "title": "contract_exercised",
        "description": "The webhook event type: `fintech.lodging.cfar.contract.exercised`",
        "type": "object"
      },
      "contract_expired": {
        "title": "contract_expired",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "contract_expired"
          }
        }
      },
      "contract_expired1": {
        "title": "contract_expired",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "contract_expired"
          }
        }
      },
      "contract_not_confirmed": {
        "title": "contract_not_confirmed",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "contract_not_confirmed"
          }
        }
      },
      "contract_not_found": {
        "title": "contract_not_found",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "contract_not_found"
          }
        }
      },
      "contract_not_in_order": {
        "title": "contract_not_in_order",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "contract_not_in_order"
          }
        }
      },
      "contract_purchased": {
        "title": "contract_purchased",
        "description": "Webhook sent when a CFAR contract is successfully purchased and confirmed.",
        "type": "object",
        "required": [
          "id",
          "type",
          "occurred_at",
          "data"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier for this webhook event.",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/contract_purchased1"
          },
          "occurred_at": {
            "description": "Timestamp when the event occurred (ISO 8601).",
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/data"
          }
        }
      },
      "contract_purchased1": {
        "title": "contract_purchased",
        "description": "The webhook event type: `fintech.lodging.cfar.contract.purchased`",
        "type": "object"
      },
      "contract_state_changed": {
        "title": "contract_state_changed",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "contract_state_changed"
          }
        }
      },
      "contract_voided": {
        "title": "contract_voided",
        "description": "Webhook sent when a CFAR contract is voided.",
        "type": "object",
        "required": [
          "id",
          "type",
          "occurred_at",
          "data"
        ],
        "properties": {
          "id": {
            "description": "Unique identifier for this webhook event.",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/contract_voided1"
          },
          "occurred_at": {
            "description": "Timestamp when the event occurred (ISO 8601).",
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/data1"
          }
        }
      },
      "contract_voided1": {
        "title": "contract_voided",
        "description": "The webhook event type: `fintech.lodging.cfar.contract.voided`",
        "type": "object"
      },
      "contracts_exercise_request": {
        "title": "contracts_exercise_request",
        "description": "\n Record an exercise the partner already carried out on the named contracts.\n The partner cancelled the reservation and paid the customer. HTS writes it down.\n ",
        "type": "object",
        "required": [
          "contracts",
          "exercise_type",
          "source",
          "currency"
        ],
        "properties": {
          "contracts": {
            "description": "One entry per contract exercised: every contract on the order, or a subset.",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/exercised_contract"
            }
          },
          "exercise_type": {
            "$ref": "#/components/schemas/exercise_type"
          },
          "source": {
            "$ref": "#/components/schemas/source"
          },
          "exercised_at": {
            "description": "\n When the cancellation and refund happened, as a UTC (RFC3339) datetime. Defaults to now.\n Must not be in the future, nor before the contracts were purchased.\n ",
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "description": "Currency of every amount in this request. Must equal the order's currency.",
            "examples": [
              "USD"
            ],
            "type": "string"
          }
        }
      },
      "coordinates": {
        "title": "coordinates",
        "description": "The property's coordinates.",
        "examples": [
          {
            "latitude": 42.349218117059806,
            "longitude": -71.07616071007658
          }
        ],
        "type": "object",
        "required": [
          "latitude",
          "longitude"
        ],
        "properties": {
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "create_cfar_offer_error": {
        "title": "create_cfar_offer_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/invalid_stay_dates"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "invalid_stay_dates": "#/components/schemas/invalid_stay_dates"
          }
        }
      },
      "create_cfar_offer_request": {
        "title": "create_cfar_offer_request",
        "type": "object",
        "required": [
          "session_id",
          "check_in_date",
          "check_out_date",
          "currency",
          "channel"
        ],
        "properties": {
          "session_id": {
            "description": "Identifies a single shopping funnel, from the initial search through to booking. A new search (including changing the search parameters) begins a new funnel with a new id.",
            "examples": [
              "c17aff84-7581-461e-8505-002d15ac368a"
            ],
            "type": "string"
          },
          "check_in_date": {
            "description": "The date the guest checks in.",
            "examples": [
              "2025-07-12"
            ],
            "type": "string",
            "format": "date"
          },
          "check_out_date": {
            "description": "The date the guest checks out.",
            "examples": [
              "2025-07-13"
            ],
            "type": "string",
            "format": "date"
          },
          "units": {
            "description": "The list of available units the user can book. Required.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/fast_lodging_unit"
            }
          },
          "occupancy": {
            "$ref": "#/components/schemas/occupancy",
            "description": "The occupancy for this search."
          },
          "properties": {
            "description": "\n The properties referenced by the units in this request.\n Can be empty if property data is synced out-of-band.\n ",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/property"
            }
          },
          "currency": {
            "description": "The currency all rates are in and what the user will be charged in. 3-letter ISO 4217 code.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/channel",
            "description": "The partner's channel that is interacting with the API."
          },
          "max_synthetic_rate_offers_per_unit": {
            "description": "Max number of synthetic rate offers to return per unit. (default = 1).",
            "type": "integer",
            "format": "int32"
          },
          "max_ancillary_offers_per_rate": {
            "description": "Max number of ancillary offers to return per rate. (default = 0)",
            "type": "integer",
            "format": "int32"
          },
          "return_full_ancillary_offer": {
            "description": "\n By default, only the IDs of ancillary offers are returned in the response.\n If you need the full offer details, set this to true,\n but beware that it will increase response size and thus may increase latency.\n (default = false)\n ",
            "type": "boolean"
          },
          "user_id": {
            "description": "The ID of the user making the request.",
            "examples": [
              "33bb4eb2-2937-4bd3-97b1-7796206712f0"
            ],
            "type": "string"
          },
          "priced": {
            "description": "\n Type of offer requested; priced or not.<br/>\n A priced offer can be used to create an order, but has lower rate limits and adds a bit of latency.\n If the offer is made on rates that are repriced later in the flow then it's best to\n keep it as false and then call the Price Offers endpoint later in the flow.\n But if the rate already has the final price then setting this to true returns offers\n that are priced and can therefore be used as-is in the Create Order endpoint.\n (default = false)\n ",
            "type": "boolean"
          },
          "billing_jurisdiction": {
            "$ref": "#/components/schemas/billing_jurisdiction",
            "description": "\n Billing information of the user buying the product(s).\n Recommended for accurate tax calculations at the price offer step,\n especially if HTS is merchant of record, to avoid corrections at the `Create Order` step.\n This information is usually not known at this step of the flow,\n but if the offers are created deep in the funnel it might be available.\n If setting priced=true, then it's important to use this information here to have accurate pricing.\n Otherwise it's optional and the taxes are approximated based on lodging location.\n "
          }
        }
      },
      "create_cfar_offer_response": {
        "title": "create_cfar_offer_response",
        "type": "object",
        "properties": {
          "synthetic_rate_offers": {
            "description": "List of synthetic rate CFAR offers generated for a given set of rates.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/synthetic_rate_offer"
            }
          },
          "ancillary_offer_groups": {
            "description": "Ancillary CFAR offers generated for a given set of rates.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cfar_ancillary_offer_group"
            }
          }
        }
      },
      "create_cfar_order_error": {
        "title": "create_cfar_order_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/idempotency_key_reused"
          },
          {
            "$ref": "#/components/schemas/invalid_discount_amount"
          },
          {
            "$ref": "#/components/schemas/invalid_email"
          },
          {
            "$ref": "#/components/schemas/invalid_mor_reservation"
          },
          {
            "$ref": "#/components/schemas/invalid_offer_id"
          },
          {
            "$ref": "#/components/schemas/missing_payment_token"
          },
          {
            "$ref": "#/components/schemas/offer_already_purchased"
          },
          {
            "$ref": "#/components/schemas/offer_expired"
          },
          {
            "$ref": "#/components/schemas/offer_not_priced"
          },
          {
            "$ref": "#/components/schemas/order_already_exists"
          },
          {
            "$ref": "#/components/schemas/payment_authorization_failure"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "idempotency_key_reused": "#/components/schemas/idempotency_key_reused",
            "invalid_discount_amount": "#/components/schemas/invalid_discount_amount",
            "invalid_email": "#/components/schemas/invalid_email",
            "invalid_mor_reservation": "#/components/schemas/invalid_mor_reservation",
            "invalid_offer_id": "#/components/schemas/invalid_offer_id",
            "missing_payment_token": "#/components/schemas/missing_payment_token",
            "offer_already_purchased": "#/components/schemas/offer_already_purchased",
            "offer_expired": "#/components/schemas/offer_expired",
            "offer_not_priced": "#/components/schemas/offer_not_priced",
            "order_already_exists": "#/components/schemas/order_already_exists",
            "payment_authorization_failure": "#/components/schemas/payment_authorization_failure"
          }
        }
      },
      "create_cfar_order_request": {
        "title": "create_cfar_order_request",
        "type": "object",
        "required": [
          "priced_offers",
          "currency",
          "merchant_of_record_on_cfar",
          "merchant_of_record_on_reservation",
          "payment_information",
          "contact_info",
          "locale"
        ],
        "properties": {
          "priced_offers": {
            "description": "\n List of CFAR offer IDs the user is purchasing.\n The offers must not be expired and must be all in the same currency.\n ",
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "description": "The currency all payments are in. 3-letter ISO 4217 code.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "merchant_of_record_on_cfar": {
            "$ref": "#/components/schemas/merchant_of_record_on_cfar"
          },
          "merchant_of_record_on_reservation": {
            "$ref": "#/components/schemas/merchant_of_record_on_reservation"
          },
          "payments": {
            "description": "DEPRECATED: Use payment_information instead. List of payment methods used to pay for this order, for all contracts, including both the unit and any other charges in the same booking. If the partner is MOR on CFAR payment, this should also include CFAR's cost. All amount must be in the same currency as the one specified on this request.",
            "deprecated": true,
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/provided_payment"
            }
          },
          "payment_information": {
            "$ref": "#/components/schemas/payment_information"
          },
          "contact_info": {
            "$ref": "#/components/schemas/contact_info"
          },
          "user_id": {
            "description": "The ID of the user making the request.",
            "examples": [
              "33bb4eb2-2937-4bd3-97b1-7796206712f0"
            ],
            "type": "string"
          },
          "locale": {
            "description": "The user's locale, as an IETF [BCP 47](https://www.rfc-editor.org/info/bcp47) language tag in {language}-{region} form, where region is an ISO 3166-1 alpha-2 country code or a UN M.49 macro-region code (e.g. en-US, es-419). Determines the language of user-facing content.",
            "examples": [
              "en-US"
            ],
            "type": "string"
          },
          "display_currency": {
            "description": "The currency that the user selected for display purposes.",
            "examples": [
              "CAD"
            ],
            "type": "string"
          },
          "billing_info": {
            "$ref": "#/components/schemas/billing_info"
          }
        }
      },
      "create_order_exercise_url_response": {
        "title": "create_order_exercise_url_response",
        "type": "object",
        "required": [
          "exercise_url"
        ],
        "properties": {
          "exercise_url": {
            "description": "The exercise url with the JWT token and any display information as query parameter.",
            "type": "string"
          }
        }
      },
      "currency_mismatch": {
        "title": "currency_mismatch",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "currency_mismatch"
          }
        }
      },
      "data": {
        "title": "data",
        "description": "The webhook payload.",
        "type": "object",
        "required": [
          "contract"
        ],
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/cfar_contract",
            "description": "The purchased contract."
          }
        }
      },
      "data1": {
        "title": "data",
        "description": "The webhook payload.",
        "type": "object",
        "required": [
          "contract"
        ],
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/cfar_contract",
            "description": "The voided contract."
          }
        }
      },
      "data2": {
        "title": "data",
        "description": "The webhook payload.",
        "type": "object",
        "required": [
          "contract"
        ],
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/cfar_contract",
            "description": "The canceled contract."
          }
        }
      },
      "data3": {
        "title": "data",
        "description": "The webhook payload.",
        "type": "object",
        "required": [
          "contract",
          "exercise"
        ],
        "properties": {
          "contract": {
            "$ref": "#/components/schemas/cfar_contract",
            "description": "The exercised contract."
          },
          "exercise": {
            "$ref": "#/components/schemas/cfar_exercisable1"
          }
        }
      },
      "details": {
        "title": "details",
        "type": "object",
        "required": [
          "last_four_digits",
          "expiration_month",
          "expiration_year",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "details",
            "description": "value: `details`"
          },
          "last_four_digits": {
            "description": "Last four digits of the payment card.",
            "type": "string",
            "pattern": "[0-9]{4}"
          },
          "expiration_month": {
            "description": "Two digits expiration month of the payment card.",
            "type": "string",
            "pattern": "[0-9]{2}"
          },
          "expiration_year": {
            "description": "Four digits expiration year of the payment card.",
            "type": "string",
            "pattern": "[0-9]{4}"
          }
        }
      },
      "direct": {
        "title": "direct",
        "description": "The partner's channel that is interacting with the API.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "direct",
            "description": "value: `direct`"
          }
        }
      },
      "display_details": {
        "title": "display_details",
        "description": "Display-only converted view of the offer's monetary values, present when the requested display currency differs from `currency`.",
        "type": "object",
        "required": [
          "display_currency",
          "display_price",
          "display_payout",
          "display_exchange_rate"
        ],
        "properties": {
          "display_currency": {
            "description": "Display-only currency the monetary values were converted to. 3-letter ISO 4217 code.",
            "examples": [
              "CAD"
            ],
            "type": "string"
          },
          "display_price": {
            "$ref": "#/components/schemas/cfar_price",
            "description": "Display-only CFAR price, converted to `displayCurrency`."
          },
          "display_payout": {
            "$ref": "#/components/schemas/payout",
            "description": "Display-only payout, converted to `displayCurrency`."
          },
          "display_exchange_rate": {
            "description": "Exchange rate (multiplier) used to convert from the offer `currency` to `displayCurrency`.",
            "examples": [
              "1.322067"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "duplicate_contract": {
        "title": "duplicate_contract",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "duplicate_contract"
          }
        }
      },
      "email_address": {
        "title": "email_address",
        "oneOf": [
          {
            "$ref": "#/components/schemas/hashed"
          },
          {
            "$ref": "#/components/schemas/literal"
          },
          {
            "$ref": "#/components/schemas/not_provided1"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "hashed": "#/components/schemas/hashed",
            "literal": "#/components/schemas/literal",
            "not_provided": "#/components/schemas/not_provided1"
          }
        }
      },
      "error": {
        "title": "error",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "exercise_already_in_progress": {
        "title": "exercise_already_in_progress",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "exercise_already_in_progress"
          }
        }
      },
      "exercise_already_in_progress1": {
        "title": "exercise_already_in_progress",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "exercise_already_in_progress"
          }
        }
      },
      "exercise_already_in_progress2": {
        "title": "exercise_already_in_progress",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "exercise_already_in_progress"
          }
        }
      },
      "exercise_type": {
        "title": "exercise_type",
        "description": "\n `cfar`: the customer used CFAR, and the amounts are the CFAR payout.\n `full_refund`: the cancellation was fully refundable on its own, so the customer got everything back,\n including the CFAR price.\n ",
        "type": "string",
        "enum": [
          "cfar",
          "full_refund"
        ]
      },
      "exercised": {
        "title": "exercised",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "exercised"
          }
        }
      },
      "exercised_contract": {
        "title": "exercised_contract",
        "type": "object",
        "required": [
          "id",
          "user_outcome"
        ],
        "properties": {
          "id": {
            "description": "The HTS contract id.",
            "type": "string"
          },
          "user_outcome": {
            "$ref": "#/components/schemas/exercised_user_outcome"
          },
          "partner_outcome": {
            "$ref": "#/components/schemas/partner_outcome",
            "description": "What the partner got back for this contract."
          }
        }
      },
      "exercised_user_outcome": {
        "title": "exercised_user_outcome",
        "description": "What the customer got back for this contract.",
        "type": "object",
        "required": [
          "payouts_from_partner"
        ],
        "properties": {
          "payouts_from_partner": {
            "description": "\n What the partner paid the customer, by payment method.\n Empty when the partner paid nothing.\n ",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/refundable_payment"
            }
          },
          "payout_from_lodging": {
            "description": "\n What the lodging property paid the customer directly.\n Only when `merchant_of_record_on_reservation` is `lodging`.\n ",
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "expired": {
        "title": "expired",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "expired"
          }
        }
      },
      "expired1": {
        "title": "expired",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "expired"
          }
        }
      },
      "fast_cancellation_penalty": {
        "title": "fast_cancellation_penalty",
        "description": "\n The cancellation penalty for this rate. Use:\n - `non_refundable` if the rate is not refundable starting from booking time (i.e., if the user cancels right after booking, they won't get any refund)\n - `refundable` for anything else\n ",
        "oneOf": [
          {
            "$ref": "#/components/schemas/non_refundable"
          },
          {
            "$ref": "#/components/schemas/refundable"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "non_refundable": "#/components/schemas/non_refundable",
            "refundable": "#/components/schemas/refundable"
          }
        }
      },
      "fast_cfar_price": {
        "title": "fast_cfar_price",
        "description": "Price for CFAR.",
        "type": "object",
        "required": [
          "total_amount",
          "base_amount"
        ],
        "properties": {
          "total_amount": {
            "description": "The total amount for CFAR, including base and taxes.",
            "examples": [
              "12.00"
            ],
            "type": "string"
          },
          "base_amount": {
            "description": "The base amount for CFAR.",
            "examples": [
              "10.00"
            ],
            "type": "string"
          },
          "taxes": {
            "description": "The taxes for this price.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tax"
            }
          }
        }
      },
      "fast_lodging_unit": {
        "title": "fast_lodging_unit",
        "type": "object",
        "required": [
          "id",
          "property_id"
        ],
        "properties": {
          "id": {
            "description": "The ID of the unit in the partner's system.",
            "type": "string"
          },
          "property_id": {
            "description": "The ID of the lodging this unit belongs to in the partner's system.",
            "type": "string"
          },
          "rates": {
            "description": "The available rates the user can book. Required.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/fast_rate"
            }
          },
          "unit_name": {
            "description": "The name of the unit.",
            "examples": [
              "King Room with Luxury Bathroom"
            ],
            "type": "string",
            "minLength": 1
          }
        }
      },
      "fast_payout": {
        "title": "fast_payout",
        "description": "Breakdown of what will be paid upon exercise.",
        "type": "object",
        "required": [
          "amount",
          "percentage",
          "price_included"
        ],
        "properties": {
          "amount": {
            "description": "The maximum amount to issue to the user if they exercise CFAR.",
            "examples": [
              "450"
            ],
            "type": "string"
          },
          "percentage": {
            "description": "The payout defined as a percentage of the unit's booking_amount. Must be a number between 0 and 100.",
            "examples": [
              100
            ],
            "type": "integer",
            "format": "int32"
          },
          "price_included": {
            "description": "If CFAR price is included in the payout amount.",
            "type": "boolean"
          }
        }
      },
      "fast_pricing": {
        "title": "fast_pricing",
        "description": "The price breakdown for this rate.",
        "type": "object",
        "required": [
          "base_amount",
          "taxes_amount",
          "fees_amount"
        ],
        "properties": {
          "base_amount": {
            "description": "The base amount, this includes the provider's base charge and any markup.",
            "examples": [
              "100.24"
            ],
            "type": "string"
          },
          "taxes_amount": {
            "description": "The amount of taxes.",
            "examples": [
              "23.91"
            ],
            "type": "string"
          },
          "fees_amount": {
            "description": "The amount of fees.",
            "examples": [
              "10.00"
            ],
            "type": "string"
          },
          "payment_schedule": {
            "description": "The payment schedule for when the payments will be collected from the user. The sum of amounts must sum up to the full price of the reservation.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/payment_schedule"
            }
          }
        }
      },
      "fast_rate": {
        "title": "fast_rate",
        "description": "A rate for a unit.",
        "type": "object",
        "required": [
          "id",
          "price",
          "cancellation_penalty"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier for this rate.",
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/fast_pricing"
          },
          "cancellation_penalty": {
            "$ref": "#/components/schemas/fast_cancellation_penalty"
          }
        }
      },
      "field": {
        "title": "field",
        "type": "object",
        "required": [
          "name",
          "value",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "field",
            "description": "value: `field`"
          },
          "name": {
            "$ref": "#/components/schemas/filterable_field"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "field1": {
        "title": "field",
        "type": "object",
        "required": [
          "name",
          "value",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "field",
            "description": "value: `field`"
          },
          "name": {
            "$ref": "#/components/schemas/filterable_field1"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "filter": {
        "title": "filter",
        "oneOf": [
          {
            "$ref": "#/components/schemas/and"
          },
          {
            "$ref": "#/components/schemas/field"
          },
          {
            "$ref": "#/components/schemas/or"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "and": "#/components/schemas/and",
            "field": "#/components/schemas/field",
            "or": "#/components/schemas/or"
          }
        }
      },
      "filterable_field": {
        "title": "filterable_field",
        "type": "string",
        "enum": [
          "reservation_id",
          "unit_reservation_id"
        ]
      },
      "filterable_field1": {
        "title": "filterable_field",
        "type": "string",
        "enum": [
          "reservation_id"
        ]
      },
      "fixed": {
        "title": "fixed",
        "type": "object",
        "required": [
          "start_date_time",
          "amount",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "fixed",
            "description": "value: `fixed`"
          },
          "start_date_time": {
            "description": "The time at which the penalty will take effect, in the property's timezone.",
            "examples": [
              "2025-07-12T16:00:00"
            ],
            "type": "string"
          },
          "amount": {
            "description": "A fixed amount charged as the penalty upon cancellation",
            "examples": [
              "3.91"
            ],
            "type": "string"
          }
        }
      },
      "fixed1": {
        "title": "fixed",
        "type": "object",
        "required": [
          "start_date_time",
          "amount",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "fixed",
            "description": "value: `fixed`"
          },
          "start_date_time": {
            "description": "The time at which the penalty will take effect, in the property's timezone.",
            "examples": [
              "2025-07-12T16:00:00"
            ],
            "type": "string"
          },
          "amount": {
            "description": "A fixed amount charged as the penalty upon cancellation",
            "examples": [
              "3.91"
            ],
            "type": "string"
          }
        }
      },
      "from_booking_data": {
        "title": "from_booking_data",
        "description": "\n Booking information is provided inline by the partner.\n Use this variant when HTS cannot retrieve the booking from the partner's systems;\n prefer `from_booking_references` whenever it can.\n ",
        "type": "object",
        "required": [
          "booking_data",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "from_booking_data",
            "description": "value: `from_booking_data`"
          },
          "booking_data": {
            "$ref": "#/components/schemas/booking_data"
          }
        }
      },
      "from_booking_references": {
        "title": "from_booking_references",
        "description": "Booking Information is to be retrieved from the partner systems by HTS, using the booking references provided.",
        "type": "object",
        "required": [
          "booking_references",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "from_booking_references",
            "description": "value: `from_booking_references`"
          },
          "booking_references": {
            "$ref": "#/components/schemas/map_string",
            "description": "Record locators if PSS, Order ID if OMS, etc. Used to retrieve the flight booking later. It's a dictionary of key/value pairs. The keys can be anything, but they are referenced in the configuration when retrieving the booking, so those must align."
          }
        }
      },
      "fulfill_exercise_error": {
        "title": "fulfill_exercise_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/contract_expired1"
          },
          {
            "$ref": "#/components/schemas/contract_state_changed"
          },
          {
            "$ref": "#/components/schemas/exercise_already_in_progress1"
          },
          {
            "$ref": "#/components/schemas/exercised"
          },
          {
            "$ref": "#/components/schemas/not_purchased2"
          },
          {
            "$ref": "#/components/schemas/past_check_in1"
          },
          {
            "$ref": "#/components/schemas/payout_failed"
          },
          {
            "$ref": "#/components/schemas/quote_expired"
          },
          {
            "$ref": "#/components/schemas/reservation_cancel_failed"
          },
          {
            "$ref": "#/components/schemas/reservation_cancelled1"
          },
          {
            "$ref": "#/components/schemas/voided"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "contract_expired": "#/components/schemas/contract_expired1",
            "contract_state_changed": "#/components/schemas/contract_state_changed",
            "exercise_already_in_progress": "#/components/schemas/exercise_already_in_progress1",
            "exercised": "#/components/schemas/exercised",
            "not_purchased": "#/components/schemas/not_purchased2",
            "past_check_in": "#/components/schemas/past_check_in1",
            "payout_failed": "#/components/schemas/payout_failed",
            "quote_expired": "#/components/schemas/quote_expired",
            "reservation_cancel_failed": "#/components/schemas/reservation_cancel_failed",
            "reservation_cancelled": "#/components/schemas/reservation_cancelled1",
            "voided": "#/components/schemas/voided"
          }
        }
      },
      "full_offer": {
        "title": "full_offer",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "full_offer",
            "description": "value: `full_offer`"
          },
          "offers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cfar_offer"
            }
          }
        }
      },
      "full_order": {
        "title": "full_order",
        "description": "Project payouts for every contract in the order that can be projected. Contracts that are exercised, voided, cancelled, expired or not purchased are skipped.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "full_order",
            "description": "value: `full_order`"
          }
        }
      },
      "fully_exercised": {
        "title": "fully_exercised",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "fully_exercised"
          }
        }
      },
      "fully_voided": {
        "title": "fully_voided",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "fully_voided"
          }
        }
      },
      "fully_voided1": {
        "title": "fully_voided",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "fully_voided"
          }
        }
      },
      "get_booking_response": {
        "title": "get_booking_response",
        "description": "Recommended response structure for the partner get_booking endpoint.",
        "type": "object",
        "required": [
          "reservation_id",
          "customer_confirmation_id",
          "reservation_status",
          "check_in_date",
          "check_out_date",
          "created_at",
          "reservation_price",
          "booking_currency",
          "property_id",
          "unit_id",
          "rate_id",
          "property_name"
        ],
        "properties": {
          "reservation_id": {
            "description": "ID of the reservation in the partner's system.",
            "type": "string"
          },
          "customer_confirmation_id": {
            "description": "Customer-facing confirmation ID (locator) for the hotel.",
            "type": "string"
          },
          "reservation_status": {
            "description": "Current status of the reservation. Partners may use their own status values; HTS will accept and translate them.",
            "type": "string"
          },
          "check_in_date": {
            "description": "Check-in date in ISO 8601 local date format.",
            "examples": [
              "2024-06-15"
            ],
            "type": "string",
            "format": "date"
          },
          "check_out_date": {
            "description": "Check-out date in ISO 8601 local date format.",
            "examples": [
              "2024-06-18"
            ],
            "type": "string",
            "format": "date"
          },
          "created_at": {
            "description": "ISO 8601 timestamp when the reservation was created.",
            "examples": [
              "2024-06-15T10:30:00Z"
            ],
            "type": "string",
            "format": "date-time"
          },
          "last_modified_at": {
            "description": "ISO 8601 timestamp when the reservation was last modified.",
            "type": "string",
            "format": "date-time"
          },
          "reservation_price": {
            "$ref": "#/components/schemas/price"
          },
          "booking_currency": {
            "description": "ISO 4217 currency code for all monetary amounts in the response.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "property_id": {
            "description": "ID of the property in the partner's system.",
            "type": "string"
          },
          "unit_id": {
            "description": "ID of the booked unit in the partner's system.",
            "type": "string"
          },
          "rate_id": {
            "description": "ID of the booked rate in the partner's system.",
            "type": "string"
          },
          "property_name": {
            "description": "Display name of the property.",
            "type": "string"
          },
          "check_in_time": {
            "description": "Local check-in time at the property.",
            "examples": [
              "15:00"
            ],
            "type": "string"
          },
          "chain_name": {
            "description": "Name of the hotel chain. Not required for independent properties.",
            "type": "string"
          },
          "payment_transactions": {
            "description": "Record of payment transactions associated with this booking.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/payment_transaction"
            }
          },
          "cfar_order_id": {
            "description": "HTS CFAR order ID, if a CFAR contract is associated with this booking.",
            "type": "string"
          },
          "cancel_url": {
            "description": "URL for the customer to initiate a cancellation.",
            "type": "string"
          }
        }
      },
      "get_cfar_offer_error": {
        "title": "get_cfar_offer_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/invalid_token1"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "invalid_token": "#/components/schemas/invalid_token1"
          }
        }
      },
      "good_will": {
        "title": "good_will",
        "description": "Void was performed to establish good will with the customer, i.e. in response to sub-par customer experience.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "good_will",
            "description": "value: `good_will`"
          }
        }
      },
      "hashed": {
        "title": "hashed",
        "type": "object",
        "required": [
          "value",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "hashed",
            "description": "value: `hashed`"
          },
          "value": {
            "description": "A stable hash of the user's email address. Must be stable across different API calls and different bookings. Used for transaction correlation for fraud analysis.",
            "examples": [
              "a8cfcd74832004951b4408cdb0a5dbcd8c7e5243f7fe-244bf72058205241da"
            ],
            "type": "string",
            "minLength": 1
          }
        }
      },
      "id": {
        "title": "id",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "id",
            "description": "value: `id`"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "idempotency_key_reused": {
        "title": "idempotency_key_reused",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "idempotency_key_reused"
          }
        }
      },
      "identifier": {
        "title": "identifier",
        "oneOf": [
          {
            "$ref": "#/components/schemas/details"
          },
          {
            "$ref": "#/components/schemas/token"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "details": "#/components/schemas/details",
            "token": "#/components/schemas/token"
          }
        }
      },
      "invalid_contract_status": {
        "title": "invalid_contract_status",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_contract_status"
          }
        }
      },
      "invalid_contract_status1": {
        "title": "invalid_contract_status",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_contract_status"
          }
        }
      },
      "invalid_discount_amount": {
        "title": "invalid_discount_amount",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_discount_amount"
          }
        }
      },
      "invalid_email": {
        "title": "invalid_email",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_email"
          }
        }
      },
      "invalid_mor_reservation": {
        "title": "invalid_mor_reservation",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_mor_reservation"
          }
        }
      },
      "invalid_offer_id": {
        "title": "invalid_offer_id",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_offer_id"
          }
        }
      },
      "invalid_order_status": {
        "title": "invalid_order_status",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_order_status"
          }
        }
      },
      "invalid_order_status1": {
        "title": "invalid_order_status",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_order_status"
          }
        }
      },
      "invalid_stay_dates": {
        "title": "invalid_stay_dates",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_stay_dates"
          }
        }
      },
      "invalid_token": {
        "title": "invalid_token",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_token"
          }
        }
      },
      "invalid_token1": {
        "title": "invalid_token",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "invalid_token"
          }
        }
      },
      "literal": {
        "title": "literal",
        "type": "object",
        "required": [
          "value",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "literal",
            "description": "value: `literal`"
          },
          "value": {
            "description": "The actual email address for the user.",
            "examples": [
              "john@email.com"
            ],
            "type": "string",
            "pattern": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"
          }
        }
      },
      "lodging_unit": {
        "title": "lodging_unit",
        "type": "object",
        "required": [
          "id",
          "property_id"
        ],
        "properties": {
          "id": {
            "description": "The ID of the unit in the partner's system.",
            "type": "string"
          },
          "property_id": {
            "description": "The ID of the lodging this unit belongs to in the partner's system.",
            "type": "string"
          },
          "rates": {
            "description": "The available rates the user can book. Required.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/rate"
            }
          },
          "unit_name": {
            "description": "The name of the unit.",
            "examples": [
              "King Room with Luxury Bathroom"
            ],
            "type": "string",
            "minLength": 1
          }
        }
      },
      "loyalty_program": {
        "title": "loyalty_program",
        "type": "object",
        "required": [
          "amount",
          "name",
          "units",
          "type"
        ],
        "properties": {
          "type": {
            "examples": [
              "alternate_payment_method"
            ],
            "type": "string",
            "const": "loyalty_program",
            "description": "value: `loyalty_program`"
          },
          "amount": {
            "examples": [
              "173.24"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          },
          "name": {
            "description": "\n The name of the of the loyalty program, e.g. points, miles, cash_rewards, etc.\n Required, to ensure that the amounts are refunded to the same loyalty program used during purchase.\n ",
            "type": "string",
            "minLength": 1
          },
          "units": {
            "description": "\n The unit to currency exchange rate is implicit from the amount in the Payment object\n and this number of points.\n ",
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "manual_order_exercise_error": {
        "title": "manual_order_exercise_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/already_exercised"
          },
          {
            "$ref": "#/components/schemas/contract_not_confirmed"
          },
          {
            "$ref": "#/components/schemas/contract_not_in_order"
          },
          {
            "$ref": "#/components/schemas/currency_mismatch"
          },
          {
            "$ref": "#/components/schemas/duplicate_contract"
          },
          {
            "$ref": "#/components/schemas/exercise_already_in_progress2"
          },
          {
            "$ref": "#/components/schemas/multiple_contracts"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "already_exercised": "#/components/schemas/already_exercised",
            "contract_not_confirmed": "#/components/schemas/contract_not_confirmed",
            "contract_not_in_order": "#/components/schemas/contract_not_in_order",
            "currency_mismatch": "#/components/schemas/currency_mismatch",
            "duplicate_contract": "#/components/schemas/duplicate_contract",
            "exercise_already_in_progress": "#/components/schemas/exercise_already_in_progress2",
            "multiple_contracts": "#/components/schemas/multiple_contracts"
          }
        }
      },
      "manual_order_exercise_request": {
        "title": "manual_order_exercise_request",
        "oneOf": [
          {
            "$ref": "#/components/schemas/contracts_exercise_request"
          },
          {
            "$ref": "#/components/schemas/single_contract_exercise_request"
          }
        ]
      },
      "map_string": {
        "title": "map_string",
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "merchandising_contents_request": {
        "title": "merchandising_contents_request",
        "type": "object",
        "required": [
          "offer_ids",
          "locale"
        ],
        "properties": {
          "offer_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "locale": {
            "description": "The user's locale, as an IETF [BCP 47](https://www.rfc-editor.org/info/bcp47) language tag in {language}-{region} form, where region is an ISO 3166-1 alpha-2 country code or a UN M.49 macro-region code (e.g. en-US, es-419). Determines the language of user-facing content.",
            "examples": [
              "en-US"
            ],
            "type": "string"
          },
          "substitutions": {
            "$ref": "#/components/schemas/map_string"
          }
        }
      },
      "merchandising_contents_response": {
        "title": "merchandising_contents_response",
        "type": "object",
        "required": [
          "merchandising_contents"
        ],
        "properties": {
          "merchandising_contents": {
            "$ref": "#/components/schemas/map_string"
          }
        }
      },
      "merchandising_displayed": {
        "title": "merchandising_displayed",
        "description": "Triggered when merchandising content is displayed to a user.",
        "type": "object",
        "required": [
          "session_id",
          "occurred_at",
          "offer_ids",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "merchandising_displayed",
            "description": "value: `merchandising_displayed`"
          },
          "session_id": {
            "description": "Identifies a single shopping funnel, from the initial search through to booking. A new search (including changing the search parameters) begins a new funnel with a new id.",
            "examples": [
              "c17aff84-7581-461e-8505-002d15ac368a"
            ],
            "type": "string"
          },
          "occurred_at": {
            "description": "Date and time at which the event occurred, as a UTC RFC3339 formatted datetime.",
            "type": "string",
            "format": "date-time"
          },
          "offer_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "merchandising_faq_clicked": {
        "title": "merchandising_faq_clicked",
        "description": "Triggered during merchandising when FAQ is clicked.",
        "type": "object",
        "required": [
          "session_id",
          "occurred_at",
          "offer_ids",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "merchandising_faq_clicked",
            "description": "value: `merchandising_faq_clicked`"
          },
          "session_id": {
            "description": "Identifies a single shopping funnel, from the initial search through to booking. A new search (including changing the search parameters) begins a new funnel with a new id.",
            "examples": [
              "c17aff84-7581-461e-8505-002d15ac368a"
            ],
            "type": "string"
          },
          "occurred_at": {
            "description": "Date and time at which the event occurred, as a UTC RFC3339 formatted datetime.",
            "type": "string",
            "format": "date-time"
          },
          "offer_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "merchandising_offer_attached": {
        "title": "merchandising_offer_attached",
        "description": "Triggered during merchandising when an offer is selected by a user and attached to a booking.",
        "type": "object",
        "required": [
          "session_id",
          "occurred_at",
          "offer_id",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "merchandising_offer_attached",
            "description": "value: `merchandising_offer_attached`"
          },
          "session_id": {
            "description": "Identifies a single shopping funnel, from the initial search through to booking. A new search (including changing the search parameters) begins a new funnel with a new id.",
            "examples": [
              "c17aff84-7581-461e-8505-002d15ac368a"
            ],
            "type": "string"
          },
          "occurred_at": {
            "description": "Date and time at which the event occurred, as a UTC RFC3339 formatted datetime.",
            "type": "string",
            "format": "date-time"
          },
          "offer_id": {
            "type": "string"
          }
        }
      },
      "merchandising_offer_declined": {
        "title": "merchandising_offer_declined",
        "description": "Triggered during merchandising when a user declines an offer.",
        "type": "object",
        "required": [
          "session_id",
          "occurred_at",
          "offer_ids",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "merchandising_offer_declined",
            "description": "value: `merchandising_offer_declined`"
          },
          "session_id": {
            "description": "Identifies a single shopping funnel, from the initial search through to booking. A new search (including changing the search parameters) begins a new funnel with a new id.",
            "examples": [
              "c17aff84-7581-461e-8505-002d15ac368a"
            ],
            "type": "string"
          },
          "occurred_at": {
            "description": "Date and time at which the event occurred, as a UTC RFC3339 formatted datetime.",
            "type": "string",
            "format": "date-time"
          },
          "offer_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "merchant_of_record_on_cfar": {
        "title": "merchant_of_record_on_cfar",
        "description": "\n Party responsible for processing CFAR's cost for the purchased offers.\n If it's HTS, a payment_card with a token `identifier` must be provided in the `payments` list.\n ",
        "type": "string",
        "enum": [
          "partner",
          "hts"
        ]
      },
      "merchant_of_record_on_reservation": {
        "title": "merchant_of_record_on_reservation",
        "description": "Party responsible for processing the reservation cost.",
        "type": "string",
        "enum": [
          "partner",
          "lodging"
        ]
      },
      "method": {
        "title": "method",
        "description": "The method of payment.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/apple_pay"
          },
          {
            "$ref": "#/components/schemas/other"
          },
          {
            "$ref": "#/components/schemas/paypal"
          },
          {
            "$ref": "#/components/schemas/venmo"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "apple_pay": "#/components/schemas/apple_pay",
            "other": "#/components/schemas/other",
            "paypal": "#/components/schemas/paypal",
            "venmo": "#/components/schemas/venmo"
          }
        }
      },
      "missing_payment_token": {
        "title": "missing_payment_token",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "missing_payment_token"
          }
        }
      },
      "multiple_contracts": {
        "title": "multiple_contracts",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "multiple_contracts"
          }
        }
      },
      "negative_synthetic_rates_not_supported": {
        "title": "negative_synthetic_rates_not_supported",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "negative_synthetic_rates_not_supported"
          }
        }
      },
      "non_refundable": {
        "title": "non_refundable",
        "description": "A penalty for cancelling the reservation.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "non_refundable",
            "description": "value: `non_refundable`"
          }
        }
      },
      "non_refundable1": {
        "title": "non_refundable",
        "description": "A penalty for cancelling the reservation.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "non_refundable",
            "description": "value: `non_refundable`"
          }
        }
      },
      "non_refundable_discounts": {
        "title": "non_refundable_discounts",
        "type": "object",
        "required": [
          "amount",
          "name",
          "type"
        ],
        "properties": {
          "type": {
            "description": "A discount to the booking that won't be refunded if the booking is canceled or CFAR is exercised. eg: $5 off first time booking.",
            "examples": [
              "alternate_payment_method"
            ],
            "type": "string",
            "const": "non_refundable_discounts"
          },
          "amount": {
            "examples": [
              "173.24"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          },
          "name": {
            "description": "\n The name of the non-refundable discount, e.g. first time booker incentive, etc.\n Set if useful for refund during exercise, e.g. for display, book keeping, etc.\n ",
            "type": "string",
            "minLength": 1
          }
        }
      },
      "not_available": {
        "title": "not_available",
        "description": "Booking information is not available.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "not_available",
            "description": "value: `not_available`"
          }
        }
      },
      "not_provided": {
        "title": "not_provided",
        "description": "\n When partner can not pass any form of payment information.\n Not compatible with HTS as Merchant of Record.\n ",
        "type": "object",
        "required": [
          "amount",
          "type"
        ],
        "properties": {
          "type": {
            "examples": [
              "provided"
            ],
            "type": "string",
            "const": "not_provided",
            "description": "value: `not_provided`"
          },
          "amount": {
            "description": "Total amount of the transaction.",
            "examples": [
              "200.00"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "not_provided1": {
        "title": "not_provided",
        "description": "Indicates that no email address is available. Only valid when the partner is MOR and cannot provide the email in any form, including hashed. Rejected when HTS is MOR.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "not_provided",
            "description": "value: `not_provided`"
          }
        }
      },
      "not_provided2": {
        "title": "not_provided",
        "description": "\n Used when the partner is Merchant of Record and does not provide payment details.\n Payment information is controlled by the partner and not shared with Hopper.\n ",
        "type": "object",
        "required": [
          "amount",
          "type"
        ],
        "properties": {
          "type": {
            "examples": [
              "alternate_payment_method"
            ],
            "type": "string",
            "const": "not_provided",
            "description": "value: `not_provided`"
          },
          "amount": {
            "examples": [
              "173.24"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "not_provided3": {
        "title": "not_provided",
        "description": "\n The partner is Merchant of Record and does not provide payout details to Hopper.\n The partner is responsible for all refund processing.\n ",
        "type": "object",
        "required": [
          "amount",
          "type"
        ],
        "properties": {
          "type": {
            "examples": [
              "provided"
            ],
            "type": "string",
            "const": "not_provided",
            "description": "value: `not_provided`"
          },
          "amount": {
            "description": "Total amount of the payout.",
            "examples": [
              "200.00"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "not_purchased": {
        "title": "not_purchased",
        "description": "The booking was not purchased.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "not_purchased",
            "description": "value: `not_purchased`"
          }
        }
      },
      "not_purchased1": {
        "title": "not_purchased",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "not_purchased"
          }
        }
      },
      "not_purchased2": {
        "title": "not_purchased",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "not_purchased"
          }
        }
      },
      "not_purchased3": {
        "title": "not_purchased",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "not_purchased"
          }
        }
      },
      "number_of_nights": {
        "title": "number_of_nights",
        "type": "object",
        "required": [
          "start_date_time",
          "num_nights",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "number_of_nights",
            "description": "value: `number_of_nights`"
          },
          "start_date_time": {
            "description": "The time at which the penalty will take effect, in the property's timezone.",
            "examples": [
              "2025-07-12T16:00:00"
            ],
            "type": "string"
          },
          "num_nights": {
            "description": "\n The number of nights to charge the guest for cancelling.\n e.g. on a $900 booking for 4 nights, with NumberOfNights(3)\n and the guest cancels within the penalty period,\n - penalty is: $900 / 4 * 3 = $675\n - user is refunded $900 - $675 = $225\n",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "number_of_nights1": {
        "title": "number_of_nights",
        "type": "object",
        "required": [
          "start_date_time",
          "num_nights",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "number_of_nights",
            "description": "value: `number_of_nights`"
          },
          "start_date_time": {
            "description": "The time at which the penalty will take effect, in the property's timezone.",
            "examples": [
              "2025-07-12T16:00:00"
            ],
            "type": "string"
          },
          "num_nights": {
            "description": "\n The number of nights to charge the guest for cancelling.\n e.g. on a $900 booking for 4 nights, with NumberOfNights(3)\n and the guest cancels within the penalty period,\n - penalty is: $900 / 4 * 3 = $675\n - user is refunded $900 - $675 = $225\n",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "occupancy": {
        "title": "occupancy",
        "type": "object",
        "properties": {
          "num_adults": {
            "description": "The number of adults the user is booking for.",
            "examples": [
              1
            ],
            "type": "integer",
            "format": "int32"
          },
          "num_children": {
            "description": "The number of children the user is booking for.",
            "type": "integer",
            "format": "int32"
          },
          "num_units": {
            "description": "The number of units the user is booking.",
            "examples": [
              1
            ],
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "offer_already_purchased": {
        "title": "offer_already_purchased",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "offer_already_purchased"
          }
        }
      },
      "offer_already_purchased1": {
        "title": "offer_already_purchased",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "offer_already_purchased"
          }
        }
      },
      "offer_display_requested": {
        "title": "offer_display_requested",
        "description": "Triggered when a customer explicitly requests to view an offer.",
        "type": "object",
        "required": [
          "session_id",
          "occurred_at",
          "offer_ids",
          "trigger",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "offer_display_requested",
            "description": "value: `offer_display_requested`"
          },
          "session_id": {
            "description": "Identifies a single shopping funnel, from the initial search through to booking. A new search (including changing the search parameters) begins a new funnel with a new id.",
            "examples": [
              "c17aff84-7581-461e-8505-002d15ac368a"
            ],
            "type": "string"
          },
          "occurred_at": {
            "description": "Date and time at which the event occurred, as a UTC RFC3339 formatted datetime.",
            "type": "string",
            "format": "date-time"
          },
          "offer_ids": {
            "description": "The offers that the customer is requesting to view.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "trigger": {
            "$ref": "#/components/schemas/request_trigger"
          }
        }
      },
      "offer_expired": {
        "title": "offer_expired",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "offer_expired"
          }
        }
      },
      "offer_not_priced": {
        "title": "offer_not_priced",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "offer_not_priced"
          }
        }
      },
      "online_booking_tool": {
        "title": "online_booking_tool",
        "description": "The partner's channel that is interacting with the API.",
        "type": "object",
        "required": [
          "travel_management_company",
          "business",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "online_booking_tool",
            "description": "value: `online_booking_tool`"
          },
          "travel_management_company": {
            "description": "The name of the travel management company.",
            "type": "string",
            "minLength": 1
          },
          "business": {
            "description": "The name of the business.",
            "type": "string",
            "minLength": 1
          }
        }
      },
      "or": {
        "title": "or",
        "type": "object",
        "required": [
          "filters",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "or",
            "description": "value: `or`"
          },
          "filters": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/composable_filter"
            }
          }
        }
      },
      "or1": {
        "title": "or",
        "type": "object",
        "required": [
          "filters",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "or",
            "description": "value: `or`"
          },
          "filters": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/composable_filter1"
            }
          }
        }
      },
      "order_already_exists": {
        "title": "order_already_exists",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "order_already_exists"
          }
        }
      },
      "other": {
        "title": "other",
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "other",
            "description": "value: `other`"
          },
          "name": {
            "description": "Name of the alternate payment method for unsupported types, e.g. Bank Transfer.",
            "type": "string",
            "minLength": 1
          }
        }
      },
      "other1": {
        "title": "other",
        "description": "Other or unspecified reason",
        "type": "object",
        "required": [
          "reason",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "other",
            "description": "value: `other`"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "other2": {
        "title": "other",
        "description": "Other or unspecified reason",
        "type": "object",
        "required": [
          "reason",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "other",
            "description": "value: `other`"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "partner_outcome": {
        "title": "partner_outcome",
        "type": "object",
        "properties": {
          "payout_from_lodging": {
            "description": "\n The amount that the partner is expected to receive from the lodging property if the reservation is cancelled.\n This may only be defined if `merchant_of_record_on_reservation` is `partner`.\n      ",
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "past_check_in": {
        "title": "past_check_in",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "past_check_in"
          }
        }
      },
      "past_check_in1": {
        "title": "past_check_in",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "past_check_in"
          }
        }
      },
      "pay_at_check_in": {
        "title": "pay_at_check_in",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "pay_at_check_in",
            "description": "value: `pay_at_check_in`"
          }
        }
      },
      "pay_at_check_in1": {
        "title": "pay_at_check_in",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "pay_at_check_in",
            "description": "value: `pay_at_check_in`"
          }
        }
      },
      "pay_later": {
        "title": "pay_later",
        "type": "object",
        "required": [
          "due",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "pay_later",
            "description": "value: `pay_later`"
          },
          "due": {
            "description": "Date at which the user will be charged, in the timezone of the property.",
            "type": "string",
            "format": "date"
          }
        }
      },
      "pay_later1": {
        "title": "pay_later",
        "type": "object",
        "required": [
          "due",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "pay_later",
            "description": "value: `pay_later`"
          },
          "due": {
            "description": "Date at which the user will be charged, in the timezone of the property.",
            "type": "string",
            "format": "date"
          }
        }
      },
      "pay_now": {
        "title": "pay_now",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "pay_now",
            "description": "value: `pay_now`"
          }
        }
      },
      "pay_now1": {
        "title": "pay_now",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "pay_now",
            "description": "value: `pay_now`"
          }
        }
      },
      "payment": {
        "title": "payment",
        "oneOf": [
          {
            "$ref": "#/components/schemas/alternate_payment_method"
          },
          {
            "$ref": "#/components/schemas/loyalty_program"
          },
          {
            "$ref": "#/components/schemas/non_refundable_discounts"
          },
          {
            "$ref": "#/components/schemas/not_provided2"
          },
          {
            "$ref": "#/components/schemas/payment_card"
          },
          {
            "$ref": "#/components/schemas/reseller_controlled"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "alternate_payment_method": "#/components/schemas/alternate_payment_method",
            "loyalty_program": "#/components/schemas/loyalty_program",
            "non_refundable_discounts": "#/components/schemas/non_refundable_discounts",
            "not_provided": "#/components/schemas/not_provided2",
            "payment_card": "#/components/schemas/payment_card",
            "reseller_controlled": "#/components/schemas/reseller_controlled"
          }
        }
      },
      "payment_authorization_failure": {
        "title": "payment_authorization_failure",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "payment_authorization_failure"
          }
        }
      },
      "payment_card": {
        "title": "payment_card",
        "type": "object",
        "required": [
          "amount",
          "identifier",
          "type"
        ],
        "properties": {
          "type": {
            "description": "A credit or debit card. Must be tokenized (refer to above documentation).",
            "examples": [
              "alternate_payment_method"
            ],
            "type": "string",
            "const": "payment_card"
          },
          "amount": {
            "examples": [
              "173.24"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          },
          "identifier": {
            "$ref": "#/components/schemas/identifier"
          }
        }
      },
      "payment_information": {
        "title": "payment_information",
        "description": "Payment information for the order. Either a detailed breakdown of payment methods (Provided) or a signal that no payment details are available (NotProvided). Payments should equate to the total amount for which a partner is the MoR, e.g. if the partner is collecting the ancillary price, the total of the payments should be inclusive of the price. Must include a tokenized payment card if HTS is merchant of record. If both payments and payment_information are provided, payment_information takes precedence.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/not_provided"
          },
          {
            "$ref": "#/components/schemas/provided"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "not_provided": "#/components/schemas/not_provided",
            "provided": "#/components/schemas/provided"
          }
        }
      },
      "payment_schedule": {
        "title": "payment_schedule",
        "type": "object",
        "required": [
          "amount",
          "schedule"
        ],
        "properties": {
          "amount": {
            "description": "Amount that the user will be charged.",
            "examples": [
              "1.23"
            ],
            "type": "string"
          },
          "schedule": {
            "$ref": "#/components/schemas/schedule"
          }
        }
      },
      "payment_schedule1": {
        "title": "payment_schedule",
        "type": "object",
        "required": [
          "amount",
          "schedule"
        ],
        "properties": {
          "amount": {
            "description": "Amount that the user will be charged.",
            "examples": [
              "1.23"
            ],
            "type": "string",
            "minimum": 0
          },
          "schedule": {
            "$ref": "#/components/schemas/schedule1"
          }
        }
      },
      "payment_transaction": {
        "title": "payment_transaction",
        "description": "A payment transaction associated with the booking.",
        "type": "object",
        "required": [
          "amount",
          "date_time",
          "transaction_type",
          "payment_type"
        ],
        "properties": {
          "amount": {
            "description": "Monetary amount of the transaction.",
            "examples": [
              "150.00"
            ],
            "type": "string",
            "minimum": 0
          },
          "date_time": {
            "description": "ISO 8601 timestamp when the transaction occurred.",
            "examples": [
              "2024-06-15T10:30:00Z"
            ],
            "type": "string",
            "format": "date-time"
          },
          "transaction_type": {
            "$ref": "#/components/schemas/transaction_type"
          },
          "payment_type": {
            "$ref": "#/components/schemas/payment_type",
            "description": "The payment method used for this transaction."
          }
        }
      },
      "payment_type": {
        "title": "payment_type",
        "type": "string",
        "enum": [
          "payment_card",
          "not_provided"
        ]
      },
      "payout": {
        "title": "payout",
        "type": "object",
        "required": [
          "amount",
          "percentage",
          "price_included"
        ],
        "properties": {
          "amount": {
            "description": "The maximum amount to issue to the user if they exercise CFAR.",
            "examples": [
              "450"
            ],
            "type": "string"
          },
          "percentage": {
            "description": "The payout defined as a percentage of the unit's booking_amount. Must be a number between 0 and 100.",
            "examples": [
              100
            ],
            "type": "integer",
            "format": "int32"
          },
          "price_included": {
            "description": "If CFAR price is included in the payout amount.",
            "type": "boolean"
          }
        }
      },
      "payout_failed": {
        "title": "payout_failed",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "payout_failed"
          }
        }
      },
      "payout_from_hts": {
        "title": "payout_from_hts",
        "description": "Payment that will be paid out by HTS.",
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "payout_information": {
        "title": "payout_information",
        "description": "Payout information for the exercise. Either a detailed breakdown of payouts (Provided) or a signal that no payout details are available (NotProvided). If both payouts and payout_information are provided, payout_information takes precedence.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/not_provided3"
          },
          {
            "$ref": "#/components/schemas/provided1"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "not_provided": "#/components/schemas/not_provided3",
            "provided": "#/components/schemas/provided1"
          }
        }
      },
      "paypal": {
        "title": "paypal",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "paypal",
            "description": "value: `paypal`"
          }
        }
      },
      "penalty": {
        "title": "penalty",
        "oneOf": [
          {
            "$ref": "#/components/schemas/fixed"
          },
          {
            "$ref": "#/components/schemas/number_of_nights"
          },
          {
            "$ref": "#/components/schemas/percentage_nightly"
          },
          {
            "$ref": "#/components/schemas/percentage_total"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "fixed": "#/components/schemas/fixed",
            "number_of_nights": "#/components/schemas/number_of_nights",
            "percentage_nightly": "#/components/schemas/percentage_nightly",
            "percentage_total": "#/components/schemas/percentage_total"
          }
        }
      },
      "penalty1": {
        "title": "penalty",
        "oneOf": [
          {
            "$ref": "#/components/schemas/fixed1"
          },
          {
            "$ref": "#/components/schemas/number_of_nights1"
          },
          {
            "$ref": "#/components/schemas/percentage_nightly1"
          },
          {
            "$ref": "#/components/schemas/percentage_total1"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "fixed": "#/components/schemas/fixed1",
            "number_of_nights": "#/components/schemas/number_of_nights1",
            "percentage_nightly": "#/components/schemas/percentage_nightly1",
            "percentage_total": "#/components/schemas/percentage_total1"
          }
        }
      },
      "percentage_nightly": {
        "title": "percentage_nightly",
        "type": "object",
        "required": [
          "start_date_time",
          "nightly_percentage",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "percentage_nightly",
            "description": "value: `percentage_nightly`"
          },
          "start_date_time": {
            "description": "The time at which the penalty will take effect, in the property's timezone.",
            "examples": [
              "2025-07-12T16:00:00"
            ],
            "type": "string"
          },
          "nightly_percentage": {
            "description": "\n The percentage of a single night to charge the guest for cancelling.\n e.g. on a $900 booking for 4 nights, with PercentageNightly(90%)\n and the guest cancels within the penalty period,\n - penalty is: $900 / 4 * 0.9 = $202.50\n - user is refunded $900 - $202.50 = $697.50\n",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "percentage_nightly1": {
        "title": "percentage_nightly",
        "type": "object",
        "required": [
          "start_date_time",
          "nightly_percentage",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "percentage_nightly",
            "description": "value: `percentage_nightly`"
          },
          "start_date_time": {
            "description": "The time at which the penalty will take effect, in the property's timezone.",
            "examples": [
              "2025-07-12T16:00:00"
            ],
            "type": "string"
          },
          "nightly_percentage": {
            "description": "\n The percentage of a single night to charge the guest for cancelling.\n e.g. on a $900 booking for 4 nights, with PercentageNightly(90%)\n and the guest cancels within the penalty period,\n - penalty is: $900 / 4 * 0.9 = $202.50\n - user is refunded $900 - $202.50 = $697.50\n",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "percentage_total": {
        "title": "percentage_total",
        "type": "object",
        "required": [
          "start_date_time",
          "total_percentage",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "percentage_total",
            "description": "value: `percentage_total`"
          },
          "start_date_time": {
            "description": "The time at which the penalty will take effect, in the property's timezone.",
            "examples": [
              "2025-07-12T16:00:00"
            ],
            "type": "string"
          },
          "total_percentage": {
            "description": "\n The percentage of the booking amount to charge the guest for cancelling.\n e.g. on a $900 booking for 4nights, with PercentageTotal(70%)\n and the guest cancels within the penalty period,\n - penalty is: $900 * 0.7 = $630\n - user is refunded $900 - $630 = $270\n",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "percentage_total1": {
        "title": "percentage_total",
        "type": "object",
        "required": [
          "start_date_time",
          "total_percentage",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "percentage_total",
            "description": "value: `percentage_total`"
          },
          "start_date_time": {
            "description": "The time at which the penalty will take effect, in the property's timezone.",
            "examples": [
              "2025-07-12T16:00:00"
            ],
            "type": "string"
          },
          "total_percentage": {
            "description": "\n The percentage of the booking amount to charge the guest for cancelling.\n e.g. on a $900 booking for 4nights, with PercentageTotal(70%)\n and the guest cancels within the penalty period,\n - penalty is: $900 * 0.7 = $630\n - user is refunded $900 - $630 = $270\n",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "price": {
        "title": "price",
        "description": "Full reservation cost split into base, taxes, and fees.",
        "type": "object",
        "required": [
          "base",
          "taxes",
          "fees"
        ],
        "properties": {
          "base": {
            "description": "Base price amount.",
            "examples": [
              "200.00"
            ],
            "type": "string",
            "minimum": 0
          },
          "taxes": {
            "description": "Tax amount.",
            "examples": [
              "30.00"
            ],
            "type": "string",
            "minimum": 0
          },
          "fees": {
            "description": "Fee amount.",
            "examples": [
              "20.00"
            ],
            "type": "string",
            "minimum": 0
          }
        }
      },
      "price_cfar_offer_error": {
        "title": "price_cfar_offer_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/invalid_token"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "invalid_token": "#/components/schemas/invalid_token"
          }
        }
      },
      "price_cfar_offer_request": {
        "title": "price_cfar_offer_request",
        "type": "object",
        "required": [
          "offers",
          "check_in_date",
          "check_out_date",
          "units",
          "currency",
          "channel"
        ],
        "properties": {
          "offers": {
            "description": "List of CFAR offer IDs along with their rate IDs.",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/price_ids"
            }
          },
          "check_in_date": {
            "description": "The date the guest checks in.",
            "examples": [
              "2025-07-12"
            ],
            "type": "string",
            "format": "date"
          },
          "check_out_date": {
            "description": "The date the guest checks out.",
            "examples": [
              "2025-07-13"
            ],
            "type": "string",
            "format": "date"
          },
          "units": {
            "description": "The list of available units the offer IDs are for.",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/lodging_unit"
            }
          },
          "occupancy": {
            "$ref": "#/components/schemas/occupancy",
            "description": "The occupancy for this search."
          },
          "property": {
            "$ref": "#/components/schemas/property",
            "description": "\n The property referenced by the units in this request.\n Can be empty if property data is synced out-of-band.\n It is expected that all units belong to the same property.\n "
          },
          "currency": {
            "description": "Currency of all pricing fields within the request.",
            "examples": [
              "CAD"
            ],
            "type": "string"
          },
          "user_id": {
            "description": "The ID of the user making the request.",
            "examples": [
              "33bb4eb2-2937-4bd3-97b1-7796206712f0"
            ],
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/channel",
            "description": "The partner's channel that is interacting with the API."
          },
          "billing_jurisdiction": {
            "$ref": "#/components/schemas/billing_jurisdiction",
            "description": "\n Billing information of the user buying the product(s).\n Recommended for accurate tax calculations especially if HTS is merchant of record,\n to avoid corrections at the `Create Order` step since it would be after the user has clicked 'book'.\n "
          }
        }
      },
      "price_cfar_offer_response": {
        "title": "price_cfar_offer_response",
        "type": "object",
        "required": [
          "offers"
        ],
        "properties": {
          "offers": {
            "description": "Priced CFAR offers.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cfar_offer"
            }
          }
        }
      },
      "price_ids": {
        "title": "price_ids",
        "type": "object",
        "required": [
          "offer_id",
          "unit_id",
          "rate_id"
        ],
        "properties": {
          "offer_id": {
            "description": "The ID of the offer to re-price.",
            "type": "string"
          },
          "unit_id": {
            "description": "The ID of the unit this offer belongs to.",
            "type": "string"
          },
          "rate_id": {
            "description": "The ID of the rate this offer belongs to.",
            "type": "string"
          }
        }
      },
      "pricing": {
        "title": "pricing",
        "description": "The price breakdown for this rate.",
        "type": "object",
        "required": [
          "base_amount",
          "taxes_amount",
          "fees_amount"
        ],
        "properties": {
          "base_amount": {
            "description": "The base amount, this includes the provider's base charge and any markup.",
            "examples": [
              "100.24"
            ],
            "type": "string",
            "minimum": 0
          },
          "taxes_amount": {
            "description": "The amount of taxes.",
            "examples": [
              "23.91"
            ],
            "type": "string",
            "minimum": 0
          },
          "fees_amount": {
            "description": "The amount of fees.",
            "examples": [
              "10.00"
            ],
            "type": "string",
            "minimum": 0
          },
          "payment_schedule": {
            "description": "The payment schedule for when the payments will be collected from the user. The sum of amounts must sum up to the full price of the reservation.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/payment_schedule1"
            }
          }
        }
      },
      "property": {
        "title": "property",
        "type": "object",
        "required": [
          "id",
          "property_name",
          "check_in_time",
          "address"
        ],
        "properties": {
          "id": {
            "description": "The ID of the property in the partner's system.",
            "examples": [
              "12345"
            ],
            "type": "string"
          },
          "property_name": {
            "description": "The name of the property.",
            "examples": [
              "Fairmont Copley Plaza Boston"
            ],
            "type": "string",
            "minLength": 1
          },
          "check_in_time": {
            "description": "The earliest local time the guest may check in.",
            "examples": [
              "16:00:00"
            ],
            "type": "string"
          },
          "chain_name": {
            "description": "The name of the property's chain.",
            "examples": [
              "Fairmont"
            ],
            "type": "string",
            "minLength": 1
          },
          "star_rating": {
            "description": "The property's star rating, 1 through 5.",
            "examples": [
              "4"
            ],
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/address"
          }
        }
      },
      "provided": {
        "title": "provided",
        "description": "\n The partner provides a detailed list of payment methods used for the booking.\n This is the standard flow where Hopper receives full payment details.\n ",
        "type": "object",
        "required": [
          "payment_methods",
          "type"
        ],
        "properties": {
          "type": {
            "examples": [
              "provided"
            ],
            "type": "string",
            "const": "provided",
            "description": "value: `provided`"
          },
          "payment_methods": {
            "description": "\n List of payment methods used to pay for the booking.\n ",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/provided_payment"
            }
          }
        }
      },
      "provided1": {
        "title": "provided",
        "description": "\n The partner provides a detailed list of payouts issued to the customer.\n This is the standard flow where Hopper receives full payout details.\n ",
        "type": "object",
        "required": [
          "payouts",
          "type"
        ],
        "properties": {
          "type": {
            "examples": [
              "provided"
            ],
            "type": "string",
            "const": "provided",
            "description": "value: `provided`"
          },
          "payouts": {
            "description": "\n List of payouts issued to the customer.\n ",
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/provided_refundable_payment"
            }
          }
        }
      },
      "provided_payment": {
        "title": "provided_payment",
        "oneOf": [
          {
            "$ref": "#/components/schemas/alternate_payment_method"
          },
          {
            "$ref": "#/components/schemas/loyalty_program"
          },
          {
            "$ref": "#/components/schemas/non_refundable_discounts"
          },
          {
            "$ref": "#/components/schemas/payment_card"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "alternate_payment_method": "#/components/schemas/alternate_payment_method",
            "loyalty_program": "#/components/schemas/loyalty_program",
            "non_refundable_discounts": "#/components/schemas/non_refundable_discounts",
            "payment_card": "#/components/schemas/payment_card"
          }
        }
      },
      "provided_refundable_payment": {
        "title": "provided_refundable_payment",
        "oneOf": [
          {
            "$ref": "#/components/schemas/alternate_payment_method"
          },
          {
            "$ref": "#/components/schemas/loyalty_program"
          },
          {
            "$ref": "#/components/schemas/payment_card"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "alternate_payment_method": "#/components/schemas/alternate_payment_method",
            "loyalty_program": "#/components/schemas/loyalty_program",
            "payment_card": "#/components/schemas/payment_card"
          }
        }
      },
      "purchase_cfar_order_error": {
        "title": "purchase_cfar_order_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/contract_not_found"
          },
          {
            "$ref": "#/components/schemas/offer_already_purchased1"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "contract_not_found": "#/components/schemas/contract_not_found",
            "offer_already_purchased": "#/components/schemas/offer_already_purchased1"
          }
        }
      },
      "purchase_cfar_order_request": {
        "title": "purchase_cfar_order_request",
        "type": "object",
        "required": [
          "booking_references"
        ],
        "properties": {
          "booking_references": {
            "$ref": "#/components/schemas/map_string",
            "description": "\n IDs that are relevant to the booking.\n It's a dictionary of key/value pairs. Check with HTS for examples of supported keys.\n "
          }
        }
      },
      "purchase_payments_not_on_contract": {
        "title": "purchase_payments_not_on_contract",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "purchase_payments_not_on_contract"
          }
        }
      },
      "quote_exercise_error": {
        "title": "quote_exercise_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/exercise_already_in_progress"
          },
          {
            "$ref": "#/components/schemas/expired"
          },
          {
            "$ref": "#/components/schemas/fully_exercised"
          },
          {
            "$ref": "#/components/schemas/fully_voided"
          },
          {
            "$ref": "#/components/schemas/not_purchased1"
          },
          {
            "$ref": "#/components/schemas/past_check_in"
          },
          {
            "$ref": "#/components/schemas/reservation_cancelled"
          },
          {
            "$ref": "#/components/schemas/reservation_error"
          },
          {
            "$ref": "#/components/schemas/void_window1"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "exercise_already_in_progress": "#/components/schemas/exercise_already_in_progress",
            "expired": "#/components/schemas/expired",
            "fully_exercised": "#/components/schemas/fully_exercised",
            "fully_voided": "#/components/schemas/fully_voided",
            "not_purchased": "#/components/schemas/not_purchased1",
            "past_check_in": "#/components/schemas/past_check_in",
            "reservation_cancelled": "#/components/schemas/reservation_cancelled",
            "reservation_error": "#/components/schemas/reservation_error",
            "void_window": "#/components/schemas/void_window1"
          }
        }
      },
      "quote_expired": {
        "title": "quote_expired",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "quote_expired"
          }
        }
      },
      "rate": {
        "title": "rate",
        "description": "A rate for a unit.",
        "type": "object",
        "required": [
          "id",
          "price",
          "cancellation_penalty"
        ],
        "properties": {
          "id": {
            "description": "The unique identifier for this rate.",
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/pricing"
          },
          "cancellation_penalty": {
            "$ref": "#/components/schemas/cancellation_penalty"
          }
        }
      },
      "reason": {
        "title": "reason",
        "description": "The reason for voiding the CFAR order.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/good_will"
          },
          {
            "$ref": "#/components/schemas/not_purchased"
          },
          {
            "$ref": "#/components/schemas/other1"
          },
          {
            "$ref": "#/components/schemas/void_window"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "good_will": "#/components/schemas/good_will",
            "not_purchased": "#/components/schemas/not_purchased",
            "other": "#/components/schemas/other1",
            "void_window": "#/components/schemas/void_window"
          }
        }
      },
      "reason1": {
        "title": "reason",
        "description": "The reason for cancelling the CFAR order.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/charge_back"
          },
          {
            "$ref": "#/components/schemas/other2"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "charge_back": "#/components/schemas/charge_back",
            "other": "#/components/schemas/other2"
          }
        }
      },
      "refundable": {
        "title": "refundable",
        "description": "A penalty for cancelling the reservation.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "refundable",
            "description": "value: `refundable`"
          },
          "penalties": {
            "description": "\n The cancellation penalties for this rate.\n If the rate is fully refundable until check-in, send an empty array.\n Otherwise, send a list of penalties that will be applied upon cancelling the reservation.\n\n For a list of penalties, they represent a timeline and the latest active penalty will be applied.\n e.g. on a $900 booking for 4 nights, with penalties:\n - PercentageNightly(01/01/2050, 25%)\n - PercentageNightly(01/05/2050, 50%)\n\n If the guest cancels on:\n - 01/03/2050, penalty is: $900 / 4 * 0.25 = $56.25  (user is refunded $843.75)\n - 01/05/2050, penalty is: $900 / 4 * 0.5 = $112.50 (user is refunded $787.50)\n ",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/penalty"
            }
          }
        }
      },
      "refundable1": {
        "title": "refundable",
        "description": "A penalty for cancelling the reservation.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "refundable",
            "description": "value: `refundable`"
          },
          "penalties": {
            "description": "\n The cancellation penalties for this rate.\n If the rate is fully refundable until check-in, send an empty array.\n Otherwise, send a list of penalties that will be applied upon cancelling the reservation.\n\n For a list of penalties, they represent a timeline and the latest active penalty will be applied.\n e.g. on a $900 booking for 4 nights, with penalties:\n - PercentageNightly(01/01/2050, 25%)\n - PercentageNightly(01/05/2050, 50%)\n\n If the guest cancels on:\n - 01/03/2050, penalty is: $900 / 4 * 0.25 = $56.25  (user is refunded $843.75)\n - 01/05/2050, penalty is: $900 / 4 * 0.5 = $112.50 (user is refunded $787.50)\n ",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/penalty1"
            }
          }
        }
      },
      "refundable_payment": {
        "title": "refundable_payment",
        "oneOf": [
          {
            "$ref": "#/components/schemas/alternate_payment_method"
          },
          {
            "$ref": "#/components/schemas/loyalty_program"
          },
          {
            "$ref": "#/components/schemas/not_provided2"
          },
          {
            "$ref": "#/components/schemas/payment_card"
          },
          {
            "$ref": "#/components/schemas/reseller_controlled"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "alternate_payment_method": "#/components/schemas/alternate_payment_method",
            "loyalty_program": "#/components/schemas/loyalty_program",
            "not_provided": "#/components/schemas/not_provided2",
            "payment_card": "#/components/schemas/payment_card",
            "reseller_controlled": "#/components/schemas/reseller_controlled"
          }
        }
      },
      "request_trigger": {
        "title": "request_trigger",
        "description": "What prompted the customer to request to view an offer.",
        "type": "object",
        "required": [
          "page",
          "entry_point"
        ],
        "properties": {
          "page": {
            "description": "The page where the request was triggered.",
            "examples": [
              "checkout"
            ],
            "type": "string",
            "minLength": 1
          },
          "entry_point": {
            "description": "The entry point of the flow where the request was triggered.",
            "examples": [
              "postbooking"
            ],
            "type": "string",
            "minLength": 1
          }
        }
      },
      "reseller_controlled": {
        "title": "reseller_controlled",
        "type": "object",
        "required": [
          "amount",
          "type"
        ],
        "properties": {
          "type": {
            "description": "The partner does not charge the user directly and thus does not have payment information.",
            "examples": [
              "alternate_payment_method"
            ],
            "type": "string",
            "const": "reseller_controlled"
          },
          "amount": {
            "examples": [
              "173.24"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "reservation_cancel_failed": {
        "title": "reservation_cancel_failed",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "reservation_cancel_failed"
          }
        }
      },
      "reservation_cancelled": {
        "title": "reservation_cancelled",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "reservation_cancelled"
          }
        }
      },
      "reservation_cancelled1": {
        "title": "reservation_cancelled",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "reservation_cancelled"
          }
        }
      },
      "reservation_cancelled2": {
        "title": "reservation_cancelled",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "reservation_cancelled"
          }
        }
      },
      "reservation_error": {
        "title": "reservation_error",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "reservation_error"
          }
        }
      },
      "schedule": {
        "title": "schedule",
        "description": "\n The schedule for when this payment will be collected. Use:\n - `pay_now`: for payments collected during booking\n - `pay_at_check_in`: for payments collected directly by the property at or after check-in time\n - `pay_later`: for anything in between\n ",
        "oneOf": [
          {
            "$ref": "#/components/schemas/pay_at_check_in"
          },
          {
            "$ref": "#/components/schemas/pay_later"
          },
          {
            "$ref": "#/components/schemas/pay_now"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "pay_at_check_in": "#/components/schemas/pay_at_check_in",
            "pay_later": "#/components/schemas/pay_later",
            "pay_now": "#/components/schemas/pay_now"
          }
        }
      },
      "schedule1": {
        "title": "schedule",
        "description": "\n The schedule for when this payment will be collected. Use:\n - `pay_now`: for payments collected during booking\n - `pay_at_check_in`: for payments collected directly by the property at or after check-in time\n - `pay_later`: for anything in between\n ",
        "oneOf": [
          {
            "$ref": "#/components/schemas/pay_at_check_in1"
          },
          {
            "$ref": "#/components/schemas/pay_later1"
          },
          {
            "$ref": "#/components/schemas/pay_now1"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "pay_at_check_in": "#/components/schemas/pay_at_check_in1",
            "pay_later": "#/components/schemas/pay_later1",
            "pay_now": "#/components/schemas/pay_now1"
          }
        }
      },
      "search_contracts_request": {
        "title": "search_contracts_request",
        "type": "object",
        "required": [
          "filter"
        ],
        "properties": {
          "filter": {
            "$ref": "#/components/schemas/search_filter"
          }
        }
      },
      "search_contracts_response": {
        "title": "search_contracts_response",
        "type": "object",
        "required": [
          "contracts"
        ],
        "properties": {
          "contracts": {
            "description": "The CFAR contracts associated with the given search parameter.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cfar_contract"
            }
          }
        }
      },
      "search_filter": {
        "title": "search_filter",
        "description": "Search filter for retrieving contracts.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/and1"
          },
          {
            "$ref": "#/components/schemas/field1"
          },
          {
            "$ref": "#/components/schemas/or1"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "and": "#/components/schemas/and1",
            "field": "#/components/schemas/field1",
            "or": "#/components/schemas/or1"
          }
        }
      },
      "search_orders_request": {
        "title": "search_orders_request",
        "type": "object",
        "required": [
          "filter"
        ],
        "properties": {
          "filter": {
            "$ref": "#/components/schemas/filter"
          }
        }
      },
      "search_orders_response": {
        "title": "search_orders_response",
        "type": "object",
        "required": [
          "orders"
        ],
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cfar_order"
            }
          }
        }
      },
      "send_event_request": {
        "title": "send_event_request",
        "oneOf": [
          {
            "$ref": "#/components/schemas/booking_confirmed"
          },
          {
            "$ref": "#/components/schemas/merchandising_displayed"
          },
          {
            "$ref": "#/components/schemas/merchandising_faq_clicked"
          },
          {
            "$ref": "#/components/schemas/merchandising_offer_attached"
          },
          {
            "$ref": "#/components/schemas/merchandising_offer_declined"
          },
          {
            "$ref": "#/components/schemas/offer_display_requested"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "booking_confirmed": "#/components/schemas/booking_confirmed",
            "merchandising_displayed": "#/components/schemas/merchandising_displayed",
            "merchandising_faq_clicked": "#/components/schemas/merchandising_faq_clicked",
            "merchandising_offer_attached": "#/components/schemas/merchandising_offer_attached",
            "merchandising_offer_declined": "#/components/schemas/merchandising_offer_declined",
            "offer_display_requested": "#/components/schemas/offer_display_requested"
          }
        }
      },
      "single_contract_exercise_request": {
        "title": "single_contract_exercise_request",
        "description": "\n DEPRECATED: send `contracts` instead.\n Read as `exercise_type: cfar`, `source: support_agent` with the given reason,\n and the order's single contract carrying `payout_information`.\n Fails on an order with several contracts.\n ",
        "deprecated": true,
        "type": "object",
        "required": [
          "reason",
          "payout_information",
          "currency"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "payouts": {
            "description": "DEPRECATED: Use payout_information instead. The payouts issued to the customer.",
            "deprecated": true,
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/provided_refundable_payment"
            }
          },
          "payout_information": {
            "$ref": "#/components/schemas/payout_information"
          },
          "currency": {
            "description": "Currency of all money values in this contract.",
            "examples": [
              "USD"
            ],
            "type": "string"
          }
        }
      },
      "source": {
        "title": "source",
        "description": "Who carried out the exercise.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/automation"
          },
          {
            "$ref": "#/components/schemas/support_agent"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "automation": "#/components/schemas/automation",
            "support_agent": "#/components/schemas/support_agent"
          }
        }
      },
      "status": {
        "title": "status",
        "description": "Current status of the contract.",
        "type": "string",
        "enum": [
          "drafted",
          "confirmed",
          "exercised",
          "voided",
          "canceled"
        ]
      },
      "support_agent": {
        "title": "support_agent",
        "description": "A person on the partner's side, outside the normal flow.",
        "type": "object",
        "required": [
          "agent_id",
          "reason",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "support_agent",
            "description": "value: `support_agent`"
          },
          "agent_id": {
            "description": "The partner's id for the agent.",
            "type": "string",
            "minLength": 1
          },
          "reason": {
            "description": "Why the agent exercised the contracts.",
            "type": "string",
            "minLength": 1
          }
        }
      },
      "synthetic_rate_offer": {
        "title": "synthetic_rate_offer",
        "type": "object",
        "required": [
          "id",
          "rate_id",
          "property_id",
          "unit_id",
          "price",
          "payout",
          "currency",
          "expires_at",
          "contract_expires_at",
          "priced"
        ],
        "properties": {
          "id": {
            "description": "ID of this CFAR offer.",
            "examples": [
              "AJsheH2bNOQkxlIgwWSAQlxTeNz0PuQI4JF173CQ8qrI3BFHomJrBkQgqD6n7b-T8XutyEjE7bbUocCcqL1WHt0CINBNotBQAS0QiKg"
            ],
            "type": "string"
          },
          "rate_id": {
            "description": "The rate this offer belongs to.",
            "type": "string"
          },
          "property_id": {
            "description": "The property this offer belongs to.",
            "type": "string"
          },
          "unit_id": {
            "description": "The unit this offer belongs to.",
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/fast_cfar_price"
          },
          "payout": {
            "$ref": "#/components/schemas/fast_payout"
          },
          "agent_commission": {
            "$ref": "#/components/schemas/agent_commission"
          },
          "currency": {
            "description": "Currency of all money values in this offer. 3-letter ISO 4217 code.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "expires_at": {
            "description": "The instant at which this offer expires as a UTC (RFC3339) datetime. After this time, a new offer must be created.",
            "type": "string",
            "format": "date-time"
          },
          "contract_expires_at": {
            "description": "If this offer is purchased, this is the instant the purchased contract will expire as a UTC (RFC3339) datetime.",
            "type": "string",
            "format": "date-time"
          },
          "priced": {
            "description": "Whether this is a priced offer or not. A priced offer is required to create an order.",
            "type": "boolean"
          }
        }
      },
      "tax": {
        "title": "tax",
        "type": "object",
        "required": [
          "code",
          "amount"
        ],
        "properties": {
          "code": {
            "description": "Code representing this tax.",
            "examples": [
              "VAT"
            ],
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "description": "Total amount of the tax.",
            "examples": [
              "20.00"
            ],
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "token": {
        "title": "token",
        "type": "object",
        "required": [
          "value",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "token",
            "description": "value: `token`"
          },
          "value": {
            "description": "\n The token representing a credit card or a debit card.\n Used to process refunds to the original form of payment.\n ",
            "type": "string",
            "minLength": 1
          }
        }
      },
      "transaction_type": {
        "title": "transaction_type",
        "description": "Whether this transaction is a charge or refund.",
        "type": "string",
        "enum": [
          "user_charge",
          "user_refund"
        ]
      },
      "unprocessable_entity_cancel_cfar_order_error": {
        "title": "unprocessable_entity_cancel_cfar_order_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/cancel_cfar_order_error"
        }
      },
      "unprocessable_entity_create_cfar_offer_error": {
        "title": "unprocessable_entity_create_cfar_offer_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/create_cfar_offer_error"
        }
      },
      "unprocessable_entity_create_cfar_order_error": {
        "title": "unprocessable_entity_create_cfar_order_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/create_cfar_order_error"
        }
      },
      "unprocessable_entity_fulfill_exercise_error": {
        "title": "unprocessable_entity_fulfill_exercise_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/fulfill_exercise_error"
        }
      },
      "unprocessable_entity_get_cfar_offer_error": {
        "title": "unprocessable_entity_get_cfar_offer_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/get_cfar_offer_error"
        }
      },
      "unprocessable_entity_manual_order_exercise_error": {
        "title": "unprocessable_entity_manual_order_exercise_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/manual_order_exercise_error"
        }
      },
      "unprocessable_entity_price_cfar_offer_error": {
        "title": "unprocessable_entity_price_cfar_offer_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/price_cfar_offer_error"
        }
      },
      "unprocessable_entity_purchase_cfar_order_error": {
        "title": "unprocessable_entity_purchase_cfar_order_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/purchase_cfar_order_error"
        }
      },
      "unprocessable_entity_quote_exercise_error": {
        "title": "unprocessable_entity_quote_exercise_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/quote_exercise_error"
        }
      },
      "unprocessable_entity_user_payouts_error": {
        "title": "unprocessable_entity_user_payouts_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/user_payouts_error"
        }
      },
      "unprocessable_entity_void_cfar_order_error": {
        "title": "unprocessable_entity_void_cfar_order_error",
        "type": "array",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/void_cfar_order_error"
        }
      },
      "user_outcome": {
        "title": "user_outcome",
        "type": "object",
        "required": [
          "total_payout_amount",
          "payouts_from_partner"
        ],
        "properties": {
          "total_payout_amount": {
            "description": "\n Total amount user will receive upon exercising CFAR.\n Sum of all other payments in this model.\n      ",
            "examples": [
              "173.24"
            ],
            "type": "string",
            "minimum": 0
          },
          "payouts_from_partner": {
            "description": "Payments that will be paid out by the partner.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/refundable_payment"
            }
          },
          "payout_from_hts": {
            "$ref": "#/components/schemas/payout_from_hts"
          },
          "payout_from_lodging": {
            "description": "\n Payment that will be paid out by the lodging property directly to the user.\n This may only be defined if `merchant_of_record_on_reservation` is `lodging`.\n      ",
            "type": "string",
            "exclusiveMinimum": 0
          }
        }
      },
      "user_payouts_error": {
        "title": "user_payouts_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/contract_exercised"
          },
          {
            "$ref": "#/components/schemas/expired1"
          },
          {
            "$ref": "#/components/schemas/fully_voided1"
          },
          {
            "$ref": "#/components/schemas/not_purchased3"
          },
          {
            "$ref": "#/components/schemas/purchase_payments_not_on_contract"
          },
          {
            "$ref": "#/components/schemas/reservation_cancelled2"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "contract_exercised": "#/components/schemas/contract_exercised",
            "expired": "#/components/schemas/expired1",
            "fully_voided": "#/components/schemas/fully_voided1",
            "not_purchased": "#/components/schemas/not_purchased3",
            "purchase_payments_not_on_contract": "#/components/schemas/purchase_payments_not_on_contract",
            "reservation_cancelled": "#/components/schemas/reservation_cancelled2"
          }
        }
      },
      "user_payouts_request": {
        "title": "user_payouts_request",
        "oneOf": [
          {
            "$ref": "#/components/schemas/by_contracts"
          },
          {
            "$ref": "#/components/schemas/full_order"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "by_contracts": "#/components/schemas/by_contracts",
            "full_order": "#/components/schemas/full_order"
          }
        }
      },
      "user_payouts_response": {
        "title": "user_payouts_response",
        "type": "object",
        "required": [
          "currency",
          "contract_ids",
          "user_outcome"
        ],
        "properties": {
          "currency": {
            "description": "The currency all payout amounts are in.",
            "examples": [
              "USD"
            ],
            "type": "string"
          },
          "contract_ids": {
            "description": "\n The contracts included in this projection. With `full_order`, contracts that cannot be projected\n (exercised, voided, cancelled, expired or not purchased) are left out.\n    ",
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "user_outcome": {
            "$ref": "#/components/schemas/user_outcome",
            "description": "\n The projected outcome for the user across all included contracts, in the same shape as an exercise quote's\n `user_outcome`. Legs refunded on the same payment method are combined into one entry, the same way the\n exercise quote combines them: a payment card is matched on its token, or on its last four digits and\n expiration if no token was given; a loyalty program on its name, with `units` summed; an alternate payment\n method on its method; reseller-controlled and not-provided legs are each combined into one entry.\n    "
          }
        }
      },
      "venmo": {
        "title": "venmo",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "venmo",
            "description": "value: `venmo`"
          }
        }
      },
      "verification_status": {
        "title": "verification_status",
        "description": "\n The partner's verification status for this agent. An opaque partner assertion: this API does not define\n what a partner must do to assert `verified`. Partners that run no verification programme send `not_supported`.\n ",
        "type": "string",
        "enum": [
          "verified",
          "unverified",
          "not_supported"
        ]
      },
      "void_cfar_order_error": {
        "title": "void_cfar_order_error",
        "oneOf": [
          {
            "$ref": "#/components/schemas/invalid_contract_status"
          },
          {
            "$ref": "#/components/schemas/invalid_order_status"
          },
          {
            "$ref": "#/components/schemas/negative_synthetic_rates_not_supported"
          },
          {
            "$ref": "#/components/schemas/void_expired"
          }
        ],
        "discriminator": {
          "propertyName": "code",
          "mapping": {
            "invalid_contract_status": "#/components/schemas/invalid_contract_status",
            "invalid_order_status": "#/components/schemas/invalid_order_status",
            "negative_synthetic_rates_not_supported": "#/components/schemas/negative_synthetic_rates_not_supported",
            "void_expired": "#/components/schemas/void_expired"
          }
        }
      },
      "void_cfar_order_request": {
        "title": "void_cfar_order_request",
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "$ref": "#/components/schemas/reason"
          }
        }
      },
      "void_expired": {
        "title": "void_expired",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "void_expired"
          }
        }
      },
      "void_window": {
        "title": "void_window",
        "description": "Customer wants to cancel their booking while the booking's void window is still active.",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "void_window",
            "description": "value: `void_window`"
          }
        }
      },
      "void_window1": {
        "title": "void_window",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "void_window"
          }
        }
      },
      "voided": {
        "title": "voided",
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "description": "A human-readable message describing the error",
            "type": "string"
          },
          "code": {
            "type": "string",
            "const": "voided"
          }
        }
      },
      "white_label": {
        "title": "white_label",
        "description": "The partner's channel that is interacting with the API.",
        "type": "object",
        "required": [
          "brand",
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "white_label",
            "description": "value: `white_label`"
          },
          "brand": {
            "description": "The brand name of the white label partner.",
            "examples": [
              "Bank XYZ"
            ],
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "securitySchemes": {
      "PartnerAuth": {
        "type": "apiKey",
        "description": "This API supports authentication via API Key. Clients should include their API key in every request using the `X-Api-Key` header.\n\n**Example Request**:\n\n```\ncurl --request GET --url https://api.hopper.com/v1/example --header 'X-Api-Key: <your-api-key>'\n```\n",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  }
}
