{
  "openapi": "3.1.0",
  "info": {
    "title": "Brek Hotel API",
    "version": "2026-09-01",
    "description": "Machine contract for Brek Hotel API v1, for agents and server applications. Agent Commerce is the partner program and console. The API key selects Test or Live; callers cannot choose the environment in a request. Test uses test-mode payment and simulated hotel fulfillment. Live can create, capture, cancel, and refund real transactions only when the corresponding capability flags are ready.",
    "termsOfService": "https://www.brek.com/terms",
    "contact": {
      "name": "Brek API Support",
      "url": "https://www.brek.com/developers/ai",
      "email": "support@reply.brek.com"
    },
    "license": {
      "name": "Proprietary",
      "identifier": "LicenseRef-Proprietary"
    }
  },
  "externalDocs": {
    "description": "Authoritative end-to-end Brek Hotel API runbook",
    "url": "https://www.brek.com/agent-commerce.md"
  },
  "x-brek-support": {
    "url": "https://partners.brek.com/support",
    "authentication": "Partner Console sign-in required",
    "safeEvidence": [
      "X-Request-Id or error.requestId",
      "redacted Brek checkout or booking reference when needed",
      "timestamp, environment, endpoint, HTTP status, and error code"
    ],
    "neverSend": [
      "API key or Authorization header",
      "signed hosted-checkout URL",
      "Stripe client secret or raw card data",
      "cancellation approval token",
      "full response body or unnecessary traveler PII"
    ]
  },
  "servers": [
    {
      "url": "https://api.brek.com",
      "description": "Brek Hotel API host for this documentation environment; the Bearer key determines Test or Live behavior."
    }
  ],
  "security": [
    {
      "bearerAgentApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Capabilities",
      "description": "Environment, readiness, limits, and commercial policy for the calling application."
    },
    {
      "name": "Shopping",
      "description": "Hotel discovery, room offers, and authoritative quote rechecks."
    },
    {
      "name": "Checkout",
      "description": "Application-authenticated payment and booking workflow."
    },
    {
      "name": "Bookings",
      "description": "Application-scoped booking retrieval and cancellation workflow."
    }
  ],
  "paths": {
    "/api/v1/agent-commerce/capabilities": {
      "get": {
        "operationId": "getAgentCommerceCapabilities",
        "externalDocs": {
          "description": "Capabilities contract",
          "url": "https://www.brek.com/developers/ai/api/capabilities.md"
        },
        "summary": "Read application capabilities",
        "description": "Returns the application identity, environment, limits, checkout modes, and fail-closed readiness for payment, hotel confirmation, and cancellation. Search can be called immediately after key creation; no bootstrap endpoint is required. Capabilities is recommended for every new or rotated key to verify the intended application and environment. Check the relevant readiness flags before transaction operations.",
        "tags": [
          "Capabilities"
        ],
        "responses": {
          "200": {
            "description": "Application capabilities",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                },
                "examples": {
                  "testReady": {
                    "$ref": "#/components/examples/TestCapabilities"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ]
      }
    },
    "/api/v1/agent-commerce/search": {
      "post": {
        "operationId": "searchAgentCommerceHotels",
        "externalDocs": {
          "description": "Exact-date hotel search contract",
          "url": "https://www.brek.com/developers/ai/api/search.md"
        },
        "summary": "Search hotels for exact dates",
        "description": "Returns one starting hotel card per property through the same exact-date shopping path used by Brek. Each card can carry both display lanes: left-side Expedia.com or Booking.com public comparisons and one right-side, unmasked Brek-bookable starting offer that already includes Brek's applicable final pricing; the caller must not add another markup. One request supports one to three rooms using the same Brek multi-room inventory path; each room requires an adult, and the published per-room and cross-room guest limits apply. The response declares inventorySource=brek_retail_exact_search as a source identifier, not a separate retail price tier, and repriceAt=hotel_offers. Search deliberately omits selectedOffer and brekRate.optionId because no Search option is quoteable. Carry propertyId into Hotel Offers, then Quote only an offers[].id from that response. pagination remains the upstream source total; omissions explains current-page rows absent from hotels, while identityResolution counts every source row on the page, including displayed public-only rows.",
        "tags": [
          "Shopping"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              },
              "examples": {
                "seattle": {
                  "$ref": "#/components/examples/SearchRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Hotel search results",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                },
                "examples": {
                  "results": {
                    "$ref": "#/components/examples/SearchResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The exact dates or room occupancy are invalid.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "invalidOccupancy": {
                    "value": {
                      "error": {
                        "code": "agent_commerce_invalid_occupancy",
                        "message": "Exact-date search supports 1 to 3 rooms.",
                        "status": 400,
                        "requestId": "req_...",
                        "retryable": false,
                        "details": []
                      }
                    }
                  },
                  "invalidRequest": {
                    "$ref": "#/components/examples/InvalidRequestError"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The canonical Brek retail search or its fail-closed inventory identity bridge is temporarily unavailable. Both failures are read-only and safe to retry with bounded backoff; do not show or act on stale or partially resolved prices.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "retailSearchUnavailable": {
                    "value": {
                      "error": {
                        "code": "agent_commerce_search_unavailable",
                        "message": "The Brek retail search is temporarily unavailable. Retry this exact search before showing prices.",
                        "status": 503,
                        "requestId": "req_...",
                        "retryable": true,
                        "details": []
                      }
                    }
                  },
                  "identityBridgeUnavailable": {
                    "value": {
                      "error": {
                        "code": "agent_commerce_identity_bridge_unavailable",
                        "message": "The Brek inventory identity bridge is temporarily unavailable. This request is safe to retry with backoff.",
                        "status": 503,
                        "requestId": "req_...",
                        "retryable": true,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ]
      }
    },
    "/api/v1/agent-commerce/search/flexible": {
      "post": {
        "operationId": "searchAgentCommerceHotelsFlexible",
        "externalDocs": {
          "description": "Flexible-date hotel search contract",
          "url": "https://www.brek.com/developers/ai/api/flexible-search.md"
        },
        "summary": "Search hotels across flexible dates",
        "description": "Expands and deduplicates accepted check-in options, deduplicates nights, pairs each unique date with each unique stay length, and returns each property once for its lowest displayed nightly itinerary. That product is the request cost against rateLimit.flexibleItineraryBudget: Standard permits 600 searched itineraries per minute per application, separate from the 60 HTTP requests per minute per application. For example, 14 × 1 costs 14 and the maximum 31 × 6 costs 186. A flexible request consumes both budgets; a rejected budget returns 429 with Retry-After. Shape requests to real traveler flexibility rather than maximizing both arrays. Flexible search does not accept radiusKm; use the optional explicit geo.boundingBox when the search must be constrained to a rectangular area. It forwards the documented filter and sortBy fields to the cache-only inventory request. Flexible search supports exactly one room, one or two adults, and no children. pagination remains the upstream candidate total; omissions explains current-page rows absent from hotels, while identityResolution counts every source row on the page, including displayed public-only rows.",
        "tags": [
          "Shopping"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FlexibleSearchRequest"
              },
              "examples": {
                "tomorrowTwoNights": {
                  "$ref": "#/components/examples/FlexibleSearchRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Flexible-date hotel results",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlexibleSearchResponse"
                },
                "examples": {
                  "results": {
                    "$ref": "#/components/examples/FlexibleSearchResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The cache-only flexible-search dependency is unavailable. Use exact-date Search now; a retry later is read-only.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "flexible_search_unavailable",
                    "message": "Flexible search is temporarily unavailable because the Brek cache-only inventory endpoint could not be reached. Use exact-date search and retry flexible search later.",
                    "status": 503,
                    "requestId": "req_...",
                    "retryable": true,
                    "details": []
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ]
      }
    },
    "/api/v1/agent-commerce/hotels/{propertyId}/offers": {
      "post": {
        "operationId": "getAgentCommerceHotelOffers",
        "externalDocs": {
          "description": "Hotel room offers contract",
          "url": "https://www.brek.com/developers/ai/api/hotel-offers.md"
        },
        "summary": "Get all bookable room offers for a hotel",
        "description": "Use the resolved opaque B2B commerce propertyId returned by Brek Hotel API search in the path. The body carries only the same stay, occupancies, and optional shopping context; never substitute hotel.hotelCode, an MCP, consumer-site, provider, or transient source identifier. The response preserves propertyId and returns the first quoteable option IDs. Search is a starting-price snapshot: when the selected hotel's rooms disappear before this reprice boundary, the API returns 409 hotel_offers_unavailable. Do not retry that stale propertyId; choose another untried brekRate row from the same Search response, or run Search again without silently changing traveler criteria.",
        "tags": [
          "Shopping"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PropertyId"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HotelOffersRequest"
              },
              "examples": {
                "selectedStay": {
                  "$ref": "#/components/examples/HotelOffersRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current room groups and offers",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HotelOffersResponse"
                },
                "examples": {
                  "rooms": {
                    "$ref": "#/components/examples/HotelOffersResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "The selected hotel's previously displayed rate is no longer available at the Hotel Offers reprice boundary.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "hotel_offers_unavailable",
                    "message": "The selected hotel's rates changed or are no longer available for this stay.",
                    "status": 409,
                    "requestId": "req_...",
                    "retryable": false,
                    "details": [
                      {
                        "reason": "Required action: choose another current brekRate row from the same Search response, or run Search again when no untried row remains. Do not alter traveler criteria without approval."
                      }
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/agent-commerce/hotels/{propertyId}/public-redirect": {
      "post": {
        "operationId": "resolveAgentCommercePublicRedirect",
        "externalDocs": {
          "description": "Public-provider redirect resolution contract",
          "url": "https://www.brek.com/developers/ai/api/public-redirect.md"
        },
        "summary": "Resolve a current public-provider redirect",
        "description": "Read-only provider recheck for a public comparison whose nextAction.type is resolve_public_redirect. Requires the effective shopping:read scope. Send the response-provided body with the response property's opaque propertyId. This operation does not charge, book, create checkout, or earn rev share. It is safe to retry as a fresh read, but each successful response replaces any older redirect URL.",
        "tags": [
          "Shopping"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PropertyId"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicRedirectRequest"
              },
              "examples": {
                "providerRecheck": {
                  "$ref": "#/components/examples/PublicRedirectRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A current allowlisted external-provider navigation action",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicRedirectResponse"
                },
                "examples": {
                  "resolved": {
                    "$ref": "#/components/examples/PublicRedirectResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The supplied public provider is unsupported, or the provider did not return a trusted HTTPS destination.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "examples": {
                  "unsupportedProvider": {
                    "value": {
                      "error": {
                        "code": "agent_commerce_public_provider_unsupported",
                        "message": "Only Expedia.com and Booking.com are supported.",
                        "status": 400,
                        "requestId": "req_...",
                        "retryable": false,
                        "details": []
                      }
                    }
                  },
                  "redirectUnavailable": {
                    "value": {
                      "error": {
                        "code": "agent_commerce_public_redirect_unavailable",
                        "message": "The selected public provider did not return a trusted HTTPS destination. Search again before redirecting the traveler.",
                        "status": 400,
                        "requestId": "req_...",
                        "retryable": false,
                        "details": []
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/agent-commerce/quote": {
      "post": {
        "operationId": "quoteAgentCommerceOffer",
        "externalDocs": {
          "description": "Quote contract",
          "url": "https://www.brek.com/developers/ai/api/quote.md"
        },
        "summary": "Recheck one selected room offer",
        "description": "Quote creates a short-lived stored quote but does not authorize payment or book a hotel.",
        "tags": [
          "Shopping"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              },
              "examples": {
                "selectedOffer": {
                  "$ref": "#/components/examples/QuoteRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Authoritative current quote",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponse"
                },
                "examples": {
                  "quote": {
                    "$ref": "#/components/examples/QuoteResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ]
      }
    },
    "/api/v1/agent-commerce/checkout-sessions": {
      "post": {
        "operationId": "createAgentCommerceCheckoutSession",
        "externalDocs": {
          "description": "Create checkout contract",
          "url": "https://www.brek.com/developers/ai/api/checkout-sessions.md"
        },
        "summary": "Create a checkout session",
        "description": "Creates the one hosted or native payment session reserved for this server-persisted Quote. A Quote can create exactly one checkout. The Idempotency-Key alone is not permission to replay: only after an ambiguous transport result or HTTP 502, 503, or 504 may trusted code recover with the same key and byte-identical retained body. A different logical create returns quote_checkout_conflict. To start another checkout, obtain a fresh Quote first. Creating checkout authorizes no payment and books no hotel by itself.",
        "tags": [
          "Checkout"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCheckoutSessionRequest"
              },
              "examples": {
                "hosted": {
                  "$ref": "#/components/examples/CreateCheckoutSessionRequest"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Checkout session created, or recovered by the documented same-key, byte-identical replay after an ambiguous transport result or HTTP 502, 503, or 504",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                },
                "examples": {
                  "hostedTest": {
                    "$ref": "#/components/examples/HostedCheckoutSession"
                  },
                  "nativeTest": {
                    "$ref": "#/components/examples/NativeCheckoutSession"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/agent-commerce/checkout-sessions/{checkoutSessionId}": {
      "get": {
        "operationId": "getAgentCommerceCheckoutSession",
        "externalDocs": {
          "description": "Retrieve checkout contract",
          "url": "https://www.brek.com/developers/ai/api/checkout-status.md"
        },
        "summary": "Retrieve a checkout session",
        "description": "Payment authorization is not a booking. A real hotel booking requires status=confirmed, environment=live, and isSimulation=false from Confirm or the recovered booking; a confirmed Test response is a simulation. This GET is the only checkout recovery operation after an indeterminate Confirm response, a typed confirmation 409, or expiry_requires_attention. For confirmation recovery, poll only while confirmation.nextAction.type is poll_checkout and stop all booking writes when it is contact_support or supplierStatus is unknown. For expiry recovery, follow expiration.nextAction; only status=expired, payment.status=voided, and expiration.phase=voided prove the hold was released. Never Confirm or create another checkout from this Quote while status=expiry_requires_attention. When status is confirmed, GET the returned bookingReference. Never create another checkout or reservation to recover an ambiguous outcome.",
        "tags": [
          "Checkout"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CheckoutSessionId"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current checkout session",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                },
                "examples": {
                  "authorized": {
                    "$ref": "#/components/examples/AuthorizedCheckoutSession"
                  },
                  "expiryRequiresAttention": {
                    "$ref": "#/components/examples/ExpiryRequiresAttentionCheckoutSession"
                  },
                  "confirmationPolling": {
                    "$ref": "#/components/examples/ConfirmationPollingCheckoutSession"
                  },
                  "confirmationOutcomeUnknown": {
                    "$ref": "#/components/examples/ConfirmationOutcomeUnknownCheckoutSession"
                  },
                  "confirmationRecovered": {
                    "$ref": "#/components/examples/ConfirmedCheckoutSession"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/agent-commerce/checkout-sessions/{checkoutSessionId}/abandon": {
      "post": {
        "operationId": "abandonTestAgentCommerceCheckoutSession",
        "externalDocs": {
          "description": "Abandon Test checkout contract",
          "url": "https://www.brek.com/developers/ai/api/abandon-checkout.md"
        },
        "summary": "Release and abandon a Test checkout",
        "description": "Test only. Use this operation when an unconfirmed Test checkout in awaiting_payment or payment_authorized will not continue and any Stripe Test authorization should be released before normal expiry. It is unavailable to Live applications and is rejected before any checkout, payment, or provider access for a Live key. The checkout itself is the idempotency record, so repeated calls return the same terminal or recovery state without an Idempotency-Key. A newly abandoned pre-expiry checkout records expiration.reason=test_checkout_abandoned. An already expired checkout is returned unchanged and preserves its first terminal reason: checkout_expired or quote_expired_or_changed. Terminal release proof is status=expired, payment.status=voided, expiration.phase=voided, an allowed expiration.reason, and action.type=stop. An ambiguous provider release returns expiry_requires_attention; follow expiration.nextAction and GET this same checkout until release is proven or support is required. Never Confirm or create another checkout from the Quote while release is unresolved.",
        "tags": [
          "Checkout"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CheckoutSessionId"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "Test checkout abandonment terminal or recovery state. Repeat this operation or retrieve the same checkout when release is still unresolved; do not create a replacement checkout.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                },
                "examples": {
                  "released": {
                    "$ref": "#/components/examples/AbandonedTestCheckoutSession"
                  },
                  "releaseRequiresAttention": {
                    "$ref": "#/components/examples/ExpiryRequiresAttentionCheckoutSession"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/agent-commerce/checkout-sessions/{checkoutSessionId}/confirm": {
      "post": {
        "operationId": "confirmAgentCommerceCheckoutSession",
        "externalDocs": {
          "description": "Confirm booking contract",
          "url": "https://www.brek.com/developers/ai/api/confirm.md"
        },
        "summary": "Confirm a booking",
        "description": "Transaction boundary. In Live this can create a real supplier reservation and capture a real payment. Call only after payment authorization and explicit traveler approval. Keep one Idempotency-Key for this logical confirmation. After a timeout, indeterminate response, or typed confirmation 409, make no further booking write: GET-poll only this same checkout. Continue confirmation recovery only while confirmation.nextAction.type is poll_checkout; stop and contact support when it is contact_support or supplierStatus is unknown. checkout_expiry_payment_release_pending and quote_expired_payment_release_pending mean the hold release is not proven: follow expiration.nextAction, never Confirm, and never create another checkout from this Quote. If GET returns status=confirmed with bookingReference, recover the booking with GET /bookings/{bookingReference}. Never create another checkout or reservation to recover an ambiguous outcome.",
        "tags": [
          "Checkout"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CheckoutSessionId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmCheckoutRequest"
              },
              "examples": {
                "humanApproval": {
                  "summary": "The source timestamp is a non-executable placeholder. Generate approvedAt at the actual human approval instant; never reuse a documentation timestamp.",
                  "value": {
                    "approval": {
                      "actorType": "human",
                      "approvedAt": "2026-11-15T09:47:50.937Z",
                      "source": "agent_ui",
                      "approvalRef": "approval-trip-456-001",
                      "receiptFingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Confirmed booking from the submitted logical confirmation. Recover an indeterminate response with GET checkout only; do not replay Confirm.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                },
                "examples": {
                  "confirmedLive": {
                    "$ref": "#/components/examples/ConfirmedBooking"
                  },
                  "confirmedTest": {
                    "$ref": "#/components/examples/TestConfirmedBooking"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ConfirmationBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ConfirmationConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/agent-commerce/bookings/{bookingReference}": {
      "get": {
        "operationId": "getAgentCommerceBooking",
        "externalDocs": {
          "description": "Retrieve booking contract",
          "url": "https://www.brek.com/developers/ai/api/bookings.md"
        },
        "summary": "Retrieve a booking",
        "description": "Returns the booking owned by the calling application, including confirmation delivery, commission, and cancellation state.",
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingReference"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current booking state",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                },
                "examples": {
                  "confirmed": {
                    "$ref": "#/components/examples/ConfirmedBooking"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/agent-commerce/bookings/{bookingReference}/cancellation-preview": {
      "get": {
        "operationId": "previewAgentCommerceCancellation",
        "externalDocs": {
          "description": "Cancellation preview contract",
          "url": "https://www.brek.com/developers/ai/api/cancellation-preview.md"
        },
        "summary": "Preview cancellation consequences",
        "description": "Read-only. Test returns simulated consequences and no approval token. A cancellable Live preview returns a sensitive five-minute approval token bound to the current consequences.",
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingReference"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current cancellation consequences",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancellationPreview"
                },
                "examples": {
                  "liveCancellable": {
                    "$ref": "#/components/examples/LiveCancellationPreview"
                  },
                  "testCancellable": {
                    "$ref": "#/components/examples/TestCancellationPreview"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/agent-commerce/bookings/{bookingReference}/cancel": {
      "post": {
        "operationId": "cancelAgentCommerceBooking",
        "externalDocs": {
          "description": "Cancel booking contract",
          "url": "https://www.brek.com/developers/ai/api/cancel.md"
        },
        "summary": "Cancel a booking",
        "description": "Irreversible transaction boundary. Live requires both approvalToken and a non-PII human approval attestation bound to approval.previewFingerprint from the immediately preceding cancellable preview. Test is simulated and may omit both. After Cancel is submitted, use GET booking only while its outcome is pending or unknown and never resubmit it. Only an error explicitly documented as occurring before supplier cancellation may start a new attempt, after a fresh preview, consequence presentation, and human approval.",
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingReference"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelBookingRequest"
              },
              "examples": {
                "liveApproved": {
                  "$ref": "#/components/examples/CancelBookingRequest"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Cancellation outcome from the submitted logical cancellation. Recover pending or unknown state with GET booking only; do not replay Cancel.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "X-RateLimit-Scope": {
                "$ref": "#/components/headers/XRateLimitScope"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                },
                "examples": {
                  "cancelledLive": {
                    "$ref": "#/components/examples/CancelledBooking"
                  },
                  "cancelledTest": {
                    "$ref": "#/components/examples/TestCancelledBooking"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAgentApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Brek Hotel API key",
        "description": "Application-scoped Brek Hotel API key. Keep it server-side. The key fixes the application, connection, pricing profile, checkout modes, partner agreement, and Test or Live environment."
      }
    },
    "parameters": {
      "PropertyId": {
        "name": "propertyId",
        "in": "path",
        "required": true,
        "description": "Resolved opaque B2B commerce propertyId from this Brek Hotel API search flow. Put it only in the request path and preserve it unchanged into Hotel Offers or a returned public-redirect action.",
        "schema": {
          "type": "string",
          "minLength": 1
        }
      },
      "CheckoutSessionId": {
        "name": "checkoutSessionId",
        "in": "path",
        "required": true,
        "description": "Checkout session id returned by create checkout session.",
        "schema": {
          "type": "string",
          "minLength": 1
        },
        "example": "acs_123"
      },
      "BookingReference": {
        "name": "bookingReference",
        "in": "path",
        "required": true,
        "description": "Brek booking reference returned by confirm.",
        "schema": {
          "type": "string",
          "minLength": 1
        },
        "example": "BREK-123"
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "Unique value whose trimmed length is at least eight characters and that identifies one logical write. The current contract publishes no maximum length or restricted character set. For portability, use a conservative ASCII UUID-like token without leading or trailing whitespace and retain its exact bytes. The key alone does not make a replay safe, and there is no universal retention promise: recovery lifetime and lookup scope are specific to the Quote, checkout session, booking, and operation. Follow the operation-specific recovery rule.",
        "schema": {
          "type": "string",
          "minLength": 8
        },
        "example": "trip-456-create-v1"
      },
      "XRequestId": {
        "name": "X-Request-Id",
        "in": "header",
        "required": false,
        "description": "Optional non-secret correlation id. Brek echoes a valid caller value or creates one.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      }
    },
    "headers": {
      "XRequestId": {
        "description": "Request correlation id. A caller-supplied X-Request-Id is preserved; otherwise Brek creates one.",
        "schema": {
          "type": "string"
        }
      },
      "XRateLimitLimit": {
        "description": "Application request limit for the active window.",
        "schema": {
          "type": "integer"
        }
      },
      "XRateLimitRemaining": {
        "description": "Requests remaining in the active window.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "XRateLimitReset": {
        "description": "ISO 8601 time at which the active window resets.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "XRateLimitScope": {
        "description": "Rate-limit owner scope.",
        "schema": {
          "type": "string",
          "const": "application"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying a rate-limited request.",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request, missing Idempotency-Key, expired checkout, declined Test payment, or payment not authorized.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "X-RateLimit-Scope": {
            "$ref": "#/components/headers/XRateLimitScope"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "invalidRequest": {
                "$ref": "#/components/examples/InvalidRequestError"
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, invalid, expired, or disabled Brek Hotel API key.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "invalidApiKey": {
                "$ref": "#/components/examples/InvalidApiKeyError"
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key is valid but the application, partner, mode, environment, or capability does not permit the operation.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "NotFound": {
        "description": "The application-scoped resource or tokenized hosted session was not found.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "X-RateLimit-Scope": {
            "$ref": "#/components/headers/XRateLimitScope"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Conflict": {
        "description": "Idempotency conflict, a Quote already reserved for its only checkout, Test checkout abandonment after the pre-booking boundary, invalid lifecycle transition, confirmation already in progress, stale cancellation preview, or ambiguous cancellation state.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "X-RateLimit-Scope": {
            "$ref": "#/components/headers/XRateLimitScope"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "idempotencyConflict": {
                "$ref": "#/components/examples/IdempotencyConflictError"
              },
              "quoteCheckoutConflict": {
                "$ref": "#/components/examples/QuoteCheckoutConflictError"
              },
              "checkoutAbandonNotAllowed": {
                "$ref": "#/components/examples/CheckoutAbandonNotAllowedError"
              },
              "checkoutExpiryPaymentReleasePending": {
                "$ref": "#/components/examples/CheckoutExpiryPaymentReleasePendingError"
              },
              "quoteExpiredPaymentReleasePending": {
                "$ref": "#/components/examples/QuoteExpiredPaymentReleasePendingError"
              }
            }
          }
        }
      },
      "ConfirmationBadRequest": {
        "description": "Invalid approval or a proven pre-dispatch validation failure. confirmation_preflight_failed means no supplier dispatch and a released payment authorization. GET the original checkout and verify status=failed and payment.status=voided; never retry Confirm or reuse this Quote. invalid_approval_attestation requires fresh approval only while checkout remains payment_authorized.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "X-RateLimit-Scope": {
            "$ref": "#/components/headers/XRateLimitScope"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "invalidRequest": {
                "$ref": "#/components/examples/InvalidRequestError"
              },
              "confirmationPreflightFailed": {
                "$ref": "#/components/examples/ConfirmationPreflightFailedError"
              }
            }
          }
        }
      },
      "ConfirmationConflict": {
        "description": "Typed confirmation recovery response. Do not retry with a new key and do not create another checkout or booking. GET-poll only the original checkout while confirmation.nextAction.type is poll_checkout. Stop all booking writes when it is contact_support or supplierStatus is unknown.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "X-RateLimit-Scope": {
            "$ref": "#/components/headers/XRateLimitScope"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "confirmationInProgress": {
                "$ref": "#/components/examples/ConfirmationInProgressError"
              },
              "confirmationPaymentPending": {
                "$ref": "#/components/examples/ConfirmationPaymentPendingError"
              },
              "confirmationOutcomeUnknown": {
                "$ref": "#/components/examples/ConfirmationOutcomeUnknownError"
              },
              "confirmationFailed": {
                "$ref": "#/components/examples/ConfirmationFailedError"
              },
              "confirmationPaymentVoidPending": {
                "$ref": "#/components/examples/ConfirmationPaymentVoidPendingError"
              },
              "checkoutExpiryPaymentReleasePending": {
                "$ref": "#/components/examples/CheckoutExpiryPaymentReleasePendingError"
              },
              "quoteExpiredPaymentReleasePending": {
                "$ref": "#/components/examples/QuoteExpiredPaymentReleasePendingError"
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "Application request limit exceeded.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "X-RateLimit-Scope": {
            "$ref": "#/components/headers/XRateLimitScope"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "A required transaction capability is fail-closed or an upstream dependency is unavailable.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "X-RateLimit-Scope": {
            "$ref": "#/components/headers/XRateLimitScope"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error": {
        "description": "Canonical Brek Hotel API error.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "X-RateLimit-Scope": {
            "$ref": "#/components/headers/XRateLimitScope"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "message",
              "status",
              "requestId",
              "retryable",
              "details"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable error code."
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "integer",
                "minimum": 400,
                "maximum": 599
              },
              "requestId": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean",
                "description": "True for rate limits and selected safe 5xx reads; transaction boundary failures are not automatically retryable."
              },
              "details": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ErrorDetail"
                }
              }
            }
          }
        }
      },
      "ErrorDetail": {
        "oneOf": [
          {
            "title": "Human-readable error detail",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "reason"
            ],
            "properties": {
              "reason": {
                "type": "string"
              }
            }
          },
          {
            "title": "Existing checkout recovery detail",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "reason",
              "checkoutSessionId",
              "nextAction"
            ],
            "properties": {
              "reason": {
                "type": "string"
              },
              "checkoutSessionId": {
                "type": "string",
                "pattern": "^acs_[A-Za-z0-9_-]{1,80}$"
              },
              "nextAction": {
                "$ref": "#/components/schemas/GetExistingCheckoutAction"
              }
            }
          }
        ]
      },
      "GetExistingCheckoutAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "checkoutSessionId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "get_checkout"
          },
          "checkoutSessionId": {
            "type": "string",
            "pattern": "^acs_[A-Za-z0-9_-]{1,80}$"
          }
        }
      },
      "Money": {
        "type": "object",
        "description": "A decimal amount in major currency units. The owning field defines whether it is nightly, full-stay, pay-now, or pay-at-property.",
        "additionalProperties": false,
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "description": "Decimal major-unit amount; for example 286.42 USD means 286 dollars and 42 cents."
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "description": "ISO 4217 currency code."
          }
        }
      },
      "Geo": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "lat",
          "lng"
        ],
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          },
          "radiusKm": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 100,
            "default": 20
          },
          "boundingBox": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "northeast",
              "southwest"
            ],
            "properties": {
              "northeast": {
                "$ref": "#/components/schemas/Coordinate"
              },
              "southwest": {
                "$ref": "#/components/schemas/Coordinate"
              }
            }
          }
        }
      },
      "FlexibleGeo": {
        "type": "object",
        "description": "Flexible search requires latitude and longitude and does not accept radiusKm. Optionally supply an explicit northeast/southwest boundingBox when the search must be constrained to a rectangular area.",
        "additionalProperties": false,
        "required": [
          "lat",
          "lng"
        ],
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "lng": {
            "type": "number",
            "minimum": -180,
            "maximum": 180
          },
          "boundingBox": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "northeast",
              "southwest"
            ],
            "properties": {
              "northeast": {
                "$ref": "#/components/schemas/Coordinate"
              },
              "southwest": {
                "$ref": "#/components/schemas/Coordinate"
              }
            }
          }
        }
      },
      "Coordinate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "lat",
          "lng"
        ],
        "properties": {
          "lat": {
            "type": "number"
          },
          "lng": {
            "type": "number"
          }
        }
      },
      "Pax": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "age"
        ],
        "properties": {
          "age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "nationality": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          }
        }
      },
      "NamedPax": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "age"
        ],
        "properties": {
          "age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "nationality": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "name": {
            "type": "string",
            "minLength": 2
          },
          "surName": {
            "type": "string",
            "minLength": 2
          }
        }
      },
      "Occupancy": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "paxes"
        ],
        "properties": {
          "occupancyId": {
            "type": "integer"
          },
          "paxes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 16,
            "items": {
              "$ref": "#/components/schemas/Pax"
            }
          }
        }
      },
      "ExactSearchOccupancy": {
        "type": "object",
        "description": "One exact-search room. Every room requires one to eight adults age 18–120 and accepts zero to eight children age 0–17.",
        "additionalProperties": false,
        "required": [
          "paxes"
        ],
        "properties": {
          "occupancyId": {
            "type": "integer"
          },
          "paxes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 16,
            "items": {
              "$ref": "#/components/schemas/Pax"
            },
            "allOf": [
              {
                "contains": {
                  "type": "object",
                  "required": [
                    "age"
                  ],
                  "properties": {
                    "age": {
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 120
                    }
                  }
                },
                "minContains": 1,
                "maxContains": 8
              },
              {
                "contains": {
                  "type": "object",
                  "required": [
                    "age"
                  ],
                  "properties": {
                    "age": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 17
                    }
                  }
                },
                "minContains": 0,
                "maxContains": 8
              }
            ]
          }
        }
      },
      "NamedOccupancy": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "paxes"
        ],
        "properties": {
          "occupancyId": {
            "type": "integer"
          },
          "paxes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 16,
            "items": {
              "$ref": "#/components/schemas/NamedPax"
            }
          }
        }
      },
      "ApprovalPax": {
        "type": "object",
        "description": "Traveler-party facts preserved in the immutable approval receipt. Guest names are intentionally excluded from this terms snapshot.",
        "additionalProperties": false,
        "properties": {
          "age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 120
          },
          "nationality": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          }
        }
      },
      "ApprovalOccupancy": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "paxes"
        ],
        "properties": {
          "occupancyId": {
            "type": "integer"
          },
          "paxes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 16,
            "items": {
              "$ref": "#/components/schemas/ApprovalPax"
            }
          }
        }
      },
      "SearchFilter": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "priceRange": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "minPrice": {
                "type": "number",
                "minimum": 0
              },
              "maxPrice": {
                "type": "number",
                "minimum": 0
              }
            }
          },
          "starRatings": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sr-1",
                "sr-2",
                "sr-3",
                "sr-4",
                "sr-5"
              ]
            }
          },
          "propertyTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^p-"
            }
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^f-"
            }
          }
        }
      },
      "SearchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "geo",
          "checkIn",
          "checkOut",
          "occupancies"
        ],
        "properties": {
          "geo": {
            "$ref": "#/components/schemas/Geo"
          },
          "checkIn": {
            "type": "string",
            "format": "date"
          },
          "checkOut": {
            "type": "string",
            "format": "date"
          },
          "occupancies": {
            "type": "array",
            "description": "One to three rooms. Each room requires 1–8 adults and accepts 0–8 children; the whole request accepts at most 10 adults and 10 children. Requests with multiple rooms use the same canonical Brek multi-room inventory search, not independent room searches.",
            "minItems": 1,
            "maxItems": 3,
            "x-cross-room-limits": {
              "maxAdults": 10,
              "maxChildren": 10
            },
            "items": {
              "$ref": "#/components/schemas/ExactSearchOccupancy"
            }
          },
          "filter": {
            "$ref": "#/components/schemas/SearchFilter"
          },
          "sortBy": {
            "type": "string",
            "enum": [
              "price_asc",
              "price_desc",
              "guest_rating_desc",
              "distance_asc"
            ]
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "default": 1
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          },
          "language": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        }
      },
      "FlexibleSearchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "geo",
          "checkinOptions",
          "nights",
          "occupancies"
        ],
        "properties": {
          "geo": {
            "$ref": "#/components/schemas/FlexibleGeo"
          },
          "checkinOptions": {
            "type": "array",
            "minItems": 1,
            "maxItems": 31,
            "items": {
              "type": "string",
              "pattern": "^(today|tomorrow|next-7-days|next-14-days|\\d{4}-\\d{2}-\\d{2})$"
            },
            "description": "Explicit dates must be destination-local today through 30 days ahead. Presets expand before overlapping dates are deduplicated."
          },
          "nights": {
            "type": "array",
            "minItems": 1,
            "maxItems": 6,
            "items": {
              "type": "integer",
              "enum": [
                1,
                2,
                7,
                14,
                21,
                28
              ]
            }
          },
          "occupancies": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Occupancy"
                },
                {
                  "properties": {
                    "paxes": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 2,
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Pax"
                          },
                          {
                            "properties": {
                              "age": {
                                "type": "integer",
                                "minimum": 18,
                                "maximum": 120
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              ]
            }
          },
          "filter": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchFilter"
              }
            ],
            "description": "Forwarded to every generated cache-only inventory search."
          },
          "sortBy": {
            "type": "string",
            "description": "Forwarded to every generated cache-only inventory search.",
            "enum": [
              "price_asc",
              "price_desc",
              "guest_rating_desc",
              "distance_asc"
            ]
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "default": 1
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20
          },
          "language": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        }
      },
      "HotelOffersRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "checkIn",
          "checkOut",
          "occupancies"
        ],
        "properties": {
          "checkIn": {
            "type": "string",
            "format": "date"
          },
          "checkOut": {
            "type": "string",
            "format": "date"
          },
          "occupancies": {
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/Occupancy"
            }
          },
          "language": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "staticImageEnrichmentProviders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PublicRedirectRequest": {
        "type": "object",
        "description": "Copy this body from the resolve_public_redirect action returned by the current shopping response. Do not reconstruct or edit provider, stay, occupancy, or currency values.",
        "additionalProperties": false,
        "required": [
          "provider",
          "checkIn",
          "checkOut",
          "occupancies"
        ],
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "expedia",
              "expedia.com",
              "booking",
              "booking.com"
            ],
            "description": "Opaque normalized provider label from the current public-rate action. Do not substitute another provider."
          },
          "checkIn": {
            "type": "string",
            "format": "date"
          },
          "checkOut": {
            "type": "string",
            "format": "date"
          },
          "occupancies": {
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/Occupancy"
            }
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        }
      },
      "QuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quoteCriteria"
        ],
        "properties": {
          "quoteCriteria": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "optionId",
              "accommodation",
              "occupancies",
              "checkIn",
              "checkOut"
            ],
            "properties": {
              "optionId": {
                "type": "string",
                "minLength": 1,
                "description": "Chosen offers[].id from Hotel Offers. Exact Search deliberately returns no quoteable option ID."
              },
              "accommodation": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "Hotel",
                    "default": "Hotel"
                  },
                  "code": {
                    "type": "string",
                    "description": "propertyId from the Hotel Offers response that produced this optionId. Never substitute hotel.hotelCode or an identifier from Search options, MCP, the consumer site, a provider, or a transient source."
                  }
                }
              },
              "occupancies": {
                "type": "array",
                "minItems": 1,
                "maxItems": 3,
                "items": {
                  "$ref": "#/components/schemas/Occupancy"
                }
              },
              "market": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "paymentType": {
                "type": "string",
                "const": "MerchantPay",
                "default": "MerchantPay"
              },
              "parameters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "value"
                  ],
                  "properties": {
                    "key": {
                      "type": "integer"
                    },
                    "value": {
                      "type": "string"
                    },
                    "parameterType": {
                      "type": "string"
                    },
                    "immutable": {
                      "type": "boolean"
                    },
                    "roomId": {
                      "type": "integer"
                    }
                  }
                }
              },
              "checkIn": {
                "type": "string",
                "format": "date"
              },
              "checkOut": {
                "type": "string",
                "format": "date"
              },
              "language": {
                "type": "string"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "nationality": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            }
          },
          "distributionContext": {
            "type": "object",
            "description": "Optional distribution context accepted by the underlying quote DTO."
          },
          "requestFromPortal": {
            "type": "boolean",
            "default": false
          },
          "checkoutAttemptId": {
            "type": "string"
          }
        }
      },
      "LoyaltyMembership": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "program",
          "number"
        ],
        "description": "Optional lead guest hotel membership. Omit the whole object when unused. Both values are trimmed strings. Saved with checkout and booking; hotel attachment is a manual support follow-up after confirmed Live booking, subject to hotel and program policy. It does not guarantee points, elite-night credits or status benefits. Test never sends a real support task.",
        "properties": {
          "program": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "pattern": "^[^\\u0000-\\u001f\\u007f]+$"
          },
          "number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[^\\u0000-\\u001f\\u007f]+$",
            "description": "Keep this as text, including any leading zeroes."
          }
        }
      },
      "CreateCheckoutSessionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quoteId",
          "mode",
          "holder",
          "occupancies",
          "customer"
        ],
        "properties": {
          "quoteId": {
            "type": "string",
            "minLength": 1,
            "description": "Short-lived Quote identifier. Each Quote is atomically reserved for one checkout. Only after an ambiguous transport result or HTTP 502, 503, or 504 may trusted code recover with the original Idempotency-Key and byte-identical retained body. The key alone is not replay permission; obtain a fresh Quote for every different checkout attempt."
          },
          "mode": {
            "type": "string",
            "enum": [
              "hosted",
              "native"
            ]
          },
          "holder": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "surName"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 2
              },
              "surName": {
                "type": "string",
                "minLength": 2
              }
            }
          },
          "occupancies": {
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/NamedOccupancy"
            }
          },
          "customer": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              }
            }
          },
          "loyaltyMembership": {
            "$ref": "#/components/schemas/LoyaltyMembership"
          },
          "partnerReference": {
            "type": "string",
            "maxLength": 120
          },
          "returnUrl": {
            "type": "string",
            "format": "uri",
            "description": "Shown as an explicit return button after hosted authorization; Brek does not redirect automatically."
          }
        }
      },
      "CancelBookingRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500
          },
          "approvalToken": {
            "type": "string",
            "maxLength": 2048,
            "writeOnly": true,
            "description": "Required in Live; optional in Test. Copy unchanged from the immediately preceding cancellable Live preview. Never log, persist, display, or expose it to a model."
          },
          "approval": {
            "$ref": "#/components/schemas/CancellationApprovalAttestationInput"
          }
        }
      },
      "CancellationApprovalAttestationInput": {
        "type": "object",
        "description": "Caller-supplied evidence that a human approved the exact Live cancellation preview. Required with approvalToken in Live and optional in Test. Send only a non-PII opaque reference.",
        "additionalProperties": false,
        "required": [
          "actorType",
          "approvedAt",
          "source",
          "approvalRef",
          "previewFingerprint"
        ],
        "properties": {
          "actorType": {
            "type": "string",
            "const": "human"
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Generate this value at the actual human approval instant after presenting the current cancellation preview. Never copy a documentation timestamp."
          },
          "source": {
            "type": "string",
            "enum": [
              "agent_ui",
              "hosted_checkout",
              "developer_console"
            ]
          },
          "approvalRef": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
          },
          "previewFingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "Copy approval.previewFingerprint from the immediately preceding preview."
          }
        }
      },
      "ApprovalAttestationInput": {
        "type": "object",
        "description": "Caller-supplied evidence that a human approved the exact checkout approvalReceipt. Send only an opaque internal reference; never send conversation text, names, email, or other PII.",
        "additionalProperties": false,
        "required": [
          "actorType",
          "approvedAt",
          "source",
          "approvalRef",
          "receiptFingerprint"
        ],
        "properties": {
          "actorType": {
            "type": "string",
            "const": "human"
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Generate this value at the actual human approval instant after presenting the current approvalReceipt. Never copy a documentation timestamp."
          },
          "source": {
            "type": "string",
            "enum": [
              "agent_ui",
              "hosted_checkout",
              "developer_console"
            ]
          },
          "approvalRef": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
            "description": "Opaque caller audit reference without PII or conversation text."
          },
          "receiptFingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "Copy approvalReceipt.fingerprint unchanged."
          }
        }
      },
      "ConfirmCheckoutRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "approval"
        ],
        "properties": {
          "approval": {
            "$ref": "#/components/schemas/ApprovalAttestationInput"
          }
        }
      },
      "CancellationPenalty": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "effectiveAt",
          "effectiveAtTimezone",
          "amount"
        ],
        "properties": {
          "effectiveAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "UTC instant when this monetary penalty begins. Null means the penalty applies immediately."
          },
          "effectiveAtTimezone": {
            "type": "string",
            "const": "UTC"
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          }
        }
      },
      "CancellationPolicy": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "refundable",
          "currency",
          "deadlineTimezone",
          "cancelPenalties",
          "summary"
        ],
        "properties": {
          "refundable": {
            "type": "boolean"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "deadlineTimezone": {
            "type": "string",
            "const": "UTC"
          },
          "cancelPenalties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CancellationPenalty"
            }
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "RevShare": {
        "type": "object",
        "description": "Private partner-program policy metadata. It is never traveler-facing; remove it from every traveler projection and use an explicit traveler-safe allowlist.",
        "additionalProperties": false,
        "required": [
          "eligible",
          "basis",
          "reason"
        ],
        "properties": {
          "eligible": {
            "type": "boolean"
          },
          "basis": {
            "type": "string",
            "enum": [
              "realized_brek_profit",
              "none"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "partner_agreement",
              "external_provider_checkout",
              "partner_not_enrolled"
            ]
          },
          "shareRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Decimal rate; 0.1 means 10%."
          }
        }
      },
      "ExternalProviderRevShare": {
        "type": "object",
        "description": "Private partner-program policy metadata for an external redirect. It is never traveler-facing; remove it from every traveler projection.",
        "additionalProperties": false,
        "required": [
          "eligible",
          "basis",
          "reason"
        ],
        "properties": {
          "eligible": {
            "type": "boolean",
            "const": false
          },
          "basis": {
            "type": "string",
            "const": "none"
          },
          "reason": {
            "type": "string",
            "const": "external_provider_checkout"
          }
        }
      },
      "PartnerEconomics": {
        "type": "object",
        "description": "Private server-side partner economics. It is never traveler-facing; remove it from every traveler projection and use an explicit traveler-safe allowlist.",
        "additionalProperties": false,
        "required": [
          "visibility",
          "displayToTraveler",
          "stage",
          "estimateAvailable"
        ],
        "properties": {
          "visibility": {
            "type": "string",
            "const": "private_api_key"
          },
          "displayToTraveler": {
            "type": "boolean",
            "const": false
          },
          "stage": {
            "type": "string",
            "enum": [
              "search",
              "offers",
              "quote"
            ]
          },
          "estimateAvailable": {
            "type": "boolean",
            "const": false,
            "description": "Shopping responses do not return estimated partner-economics amounts because realized profit is not known before booking."
          }
        }
      },
      "SearchPartnerEconomics": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "visibility",
          "displayToTraveler",
          "stage",
          "estimateAvailable"
        ],
        "properties": {
          "visibility": {
            "type": "string",
            "const": "private_api_key"
          },
          "displayToTraveler": {
            "type": "boolean",
            "const": false
          },
          "stage": {
            "type": "string",
            "const": "search"
          },
          "estimateAvailable": {
            "type": "boolean",
            "const": false,
            "description": "Exact Search does not calculate partner economics. Realized amounts are returned only in booking.commission after booking profit is realized; there is no separate Commission endpoint."
          }
        }
      },
      "TravelerDisplayPolicy": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "travelerFieldsSafeToDisplay",
          "excludesPartnerEconomics",
          "privateFieldsExcluded"
        ],
        "properties": {
          "travelerFieldsSafeToDisplay": {
            "type": "boolean",
            "const": true
          },
          "excludesPartnerEconomics": {
            "type": "boolean",
            "const": true,
            "description": "partnerEconomics and revShare are private business data and must not be rendered to the traveler."
          },
          "privateFieldsExcluded": {
            "type": "array",
            "description": "Exact sibling fields that must be removed from every traveler-facing projection. Build traveler output from an explicit allowlist; partnerEconomics and revShare are never traveler-facing.",
            "minItems": 5,
            "maxItems": 5,
            "prefixItems": [
              {
                "type": "string",
                "const": "partnerEconomics"
              },
              {
                "type": "string",
                "const": "revShare"
              },
              {
                "type": "string",
                "const": "supplierInfo"
              },
              {
                "type": "string",
                "const": "rawRate"
              },
              {
                "type": "string",
                "const": "wholesaleCost"
              }
            ],
            "items": false
          }
        }
      },
      "BrekRate": {
        "type": "object",
        "description": "Right-side, Brek-bookable starting offer returned in full after Brek's applicable final pricing. The caller must not add another markup. It is not raw supplier net cost or a separate retail tier. Continue to Hotel Offers before selecting a room.",
        "additionalProperties": false,
        "required": [
          "offerType",
          "price",
          "payNow",
          "travelerTotal",
          "partnerEconomics",
          "travelerDisplay",
          "nextAction",
          "revShare"
        ],
        "properties": {
          "offerType": {
            "type": "string",
            "const": "brek_rate"
          },
          "price": {
            "$ref": "#/components/schemas/TravelerPrice"
          },
          "payNow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Current Brek-collected amount for the complete stay and all requested rooms, including known online-collected taxes and mandatory fees."
          },
          "payAtProperty": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Deprecated compatibility alias for canonical price.payAtProperty. If this optional alias is absent, read price.payAtProperty; never infer zero."
          },
          "travelerTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Complete total for this Brek-bookable offer for the complete stay and all requested rooms: payNow when payAtProperty is zero, otherwise payNow plus payAtProperty. Not a nightly or per-room amount."
          },
          "partnerEconomics": {
            "$ref": "#/components/schemas/SearchPartnerEconomics"
          },
          "travelerDisplay": {
            "$ref": "#/components/schemas/TravelerDisplayPolicy"
          },
          "cancellationPolicy": {
            "$ref": "#/components/schemas/CancellationPolicy"
          },
          "refundable": {
            "type": "boolean"
          },
          "nextAction": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "propertyId"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "get_hotel_offers"
              },
              "propertyId": {
                "type": "string",
                "description": "Exactly the enclosing Search hotel's propertyId. Use it only as the Hotel Offers path parameter."
              }
            }
          },
          "revShare": {
            "$ref": "#/components/schemas/RevShare"
          }
        }
      },
      "ResolvedPublicRedirectAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "url",
          "termsOwner"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "redirect"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://",
            "description": "Current allowlisted Expedia.com or Booking.com HTTPS navigation URL. Treat it as opaque and untrusted, do not log or modify it, and open it only after traveler approval."
          },
          "termsOwner": {
            "type": "string"
          }
        }
      },
      "PublicRedirectResolutionAction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "method",
          "endpoint",
          "body",
          "termsOwner"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "resolve_public_redirect"
          },
          "method": {
            "type": "string",
            "const": "POST"
          },
          "endpoint": {
            "type": "string",
            "const": "/api/v1/agent-commerce/hotels/{propertyId}/public-redirect",
            "description": "Replace {propertyId} only with the opaque propertyId on the same hotel result."
          },
          "body": {
            "$ref": "#/components/schemas/PublicRedirectRequest"
          },
          "termsOwner": {
            "type": "string"
          }
        }
      },
      "PublicRedirectNextAction": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ResolvedPublicRedirectAction"
          },
          {
            "$ref": "#/components/schemas/PublicRedirectResolutionAction"
          }
        ]
      },
      "PublicRate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "offerType",
          "provider",
          "total",
          "priceBasis",
          "nextAction",
          "revShare"
        ],
        "properties": {
          "offerType": {
            "type": "string",
            "const": "public_rate"
          },
          "provider": {
            "type": "string",
            "description": "Named external checkout owner. v1 allows safe HTTPS public comparisons from Expedia.com and Booking.com, including their normalized provider aliases. Neither provider is guaranteed to appear."
          },
          "nightly": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Provider-reported nightly display amount. Tax and fee completeness is not standardized or verified by Brek."
          },
          "total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Provider-reported display total for the requested stay and rooms. Recheck room, tax, fee, payment-timing, and cancellation coverage on the provider site."
          },
          "priceBasis": {
            "$ref": "#/components/schemas/PublicPriceBasis"
          },
          "nextAction": {
            "$ref": "#/components/schemas/PublicRedirectNextAction"
          },
          "revShare": {
            "$ref": "#/components/schemas/ExternalProviderRevShare"
          }
        }
      },
      "PublicRedirectResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "propertyId",
          "provider",
          "nextAction",
          "revShare"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.public_redirect"
          },
          "propertyId": {
            "type": "string",
            "description": "The unchanged opaque commerce propertyId from the resolver request path."
          },
          "provider": {
            "type": "string"
          },
          "nextAction": {
            "$ref": "#/components/schemas/ResolvedPublicRedirectAction"
          },
          "revShare": {
            "$ref": "#/components/schemas/ExternalProviderRevShare"
          }
        }
      },
      "PublicPriceBasis": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source",
          "taxAndFeeInclusion"
        ],
        "properties": {
          "source": {
            "type": "string",
            "const": "provider_reported",
            "description": "Brek relays this public display amount from the named external provider."
          },
          "taxAndFeeInclusion": {
            "type": "string",
            "const": "unverified",
            "description": "The provider does not expose a normalized tax-and-fee completeness signal to Brek. Recheck on the provider site."
          }
        }
      },
      "Comparison": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "confidence",
          "safeToClaimSavings",
          "disclosure"
        ],
        "properties": {
          "confidence": {
            "type": "string",
            "enum": [
              "indicative",
              "unavailable"
            ],
            "description": "indicative does not establish like-for-like tax, fee, room, cancellation, or payment coverage and must not support a definitive cheaper-price claim."
          },
          "safeToClaimSavings": {
            "type": "boolean",
            "const": false,
            "description": "Always false for the current indicative and unavailable confidence levels. Do not calculate or display a savings amount or percentage from these totals."
          },
          "comparisonSource": {
            "type": "string",
            "enum": [
              "public_provider",
              "brek_retail_reference"
            ],
            "description": "public_provider compares against an external publicRates candidate. brek_retail_reference is a compatibility label for Brek.com comparison metadata, not a separate sell-price tier or external redirect offer."
          },
          "publicProvider": {
            "type": "string",
            "enum": [
              "Expedia.com",
              "Booking.com",
              "Brek.com retail"
            ],
            "description": "Canonical provider label for comparison metadata. Expedia.com or Booking.com appears with comparisonSource=public_provider. Brek.com retail appears only with comparisonSource=brek_retail_reference and never represents a publicRates redirect."
          },
          "brekTravelerTotal": {
            "$ref": "#/components/schemas/Money"
          },
          "publicTotal": {
            "$ref": "#/components/schemas/Money"
          },
          "disclosure": {
            "type": "string",
            "description": "Must accompany any displayed price comparison. Current indicative comparisons explicitly state that public tax and fee inclusion is unverified and that no savings claim is permitted."
          }
        }
      },
      "HotelSummary": {
        "type": "object",
        "description": "Price-free hotel facts. Use brekRate and publicRates as the only Search price sources; optional enrichment fields can grow without changing the transaction contract.",
        "required": [
          "hotelCode",
          "hotelName"
        ],
        "properties": {
          "hotelCode": {
            "type": "string",
            "description": "For an exact Search row with brekRate or resolve_public_redirect, this equals the enclosing HotelCard.propertyId for display compatibility. Integrations must carry HotelCard.propertyId rather than reading identity from hotel metadata. A public-only direct-redirect row is non-transactional."
          },
          "hotelName": {
            "type": "string"
          },
          "propertyType": {
            "type": "string"
          },
          "location": {
            "type": "object",
            "additionalProperties": true
          },
          "starRating": {
            "type": "number"
          },
          "amenities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "imageUrl": {
            "type": "string",
            "format": "uri"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "distanceKm": {
            "type": "number"
          },
          "available": {
            "type": "boolean"
          },
          "isRefundable": {
            "type": "boolean"
          },
          "cancelPolicy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CancellationPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "rooms": {
            "type": "array",
            "description": "Price-free room facts for the selected starting option.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "code"
              ],
              "properties": {
                "occupancyRefId": {
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "cancelPolicy": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CancellationPolicy"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "highlightFeatures": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "dynamicFeatures": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reviews": {
            "type": "object",
            "additionalProperties": true
          },
          "intentScore": {
            "type": "number"
          },
          "facetComponent": {
            "type": "number"
          },
          "semanticComponent": {
            "type": "number"
          },
          "intentExplanations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "intentReviewEvidence": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      },
      "HotelCard": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "propertyId",
          "hotel",
          "publicRates",
          "comparison"
        ],
        "properties": {
          "propertyId": {
            "type": "string",
            "description": "For every row with brekRate or resolve_public_redirect, this is the resolved B2B commerce property identifier and equals hotel.hotelCode and each returned action.propertyId. Carry it unchanged into Hotel Offers or the returned resolver action. A public-only row may retain a non-transactional opaque identifier only when it already has a trusted direct redirect; never use that row's identifier for Offers, Quote, or the resolver."
          },
          "hotel": {
            "$ref": "#/components/schemas/HotelSummary"
          },
          "brekRate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BrekRate"
              }
            ],
            "description": "Optional. Present only when this row can continue through Brek Hotel Offers, Quote, and checkout. A row without brekRate is public-only and its propertyId must not be sent to Brek transaction endpoints."
          },
          "publicRates": {
            "type": "array",
            "description": "External comparisons are ordered with Expedia before Booking; entries from the same provider are ordered by provider-reported total. This presentation priority is not a like-for-like price claim.",
            "items": {
              "$ref": "#/components/schemas/PublicRate"
            }
          },
          "comparison": {
            "$ref": "#/components/schemas/Comparison"
          }
        }
      },
      "Pagination": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "page",
          "pageSize",
          "total",
          "totalPages"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total rows reported by the upstream Brek retail source. It is not reduced by current-page omissions and can exceed the sum of returned hotels arrays."
          },
          "totalPages": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of upstream source pages. It is not recomputed from hotels or omissions; traverse explicitly through this page even when a returned hotels array is shorter than pageSize."
          }
        }
      },
      "SearchOmissionReason": {
        "type": "object",
        "description": "One non-zero, mutually exclusive reason for source rows absent from hotels on this page. Identity reasons take precedence over not_displayable. The entry contains an aggregate count only, never an inventory identifier.",
        "additionalProperties": false,
        "required": [
          "code",
          "count"
        ],
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "identity_ambiguous",
              "identity_not_found",
              "identity_target_non_unique",
              "not_displayable"
            ],
            "description": "identity_ambiguous means the bridge found multiple candidates; identity_not_found means it found no match; identity_target_non_unique means multiple source rows resolved to one commerce target; not_displayable means an otherwise evaluated row produced no safe Brek or public card."
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of omitted current-page source rows with this reason."
          }
        }
      },
      "SearchOmissions": {
        "type": "object",
        "description": "Counts only upstream source rows from the current page that are absent from hotels. reasons contains non-zero, mutually exclusive counts whose sum equals total. This aggregate contains no inventory identifiers.",
        "additionalProperties": false,
        "required": [
          "scope",
          "total",
          "reasons"
        ],
        "properties": {
          "scope": {
            "type": "string",
            "const": "current_page",
            "description": "Counts apply only to source rows evaluated on this response page."
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of current-page source rows absent from hotels."
          },
          "reasons": {
            "type": "array",
            "maxItems": 4,
            "uniqueItems": true,
            "description": "Non-zero reason counts in stable precedence order. Their counts sum to total; an empty array means total is zero.",
            "items": {
              "$ref": "#/components/schemas/SearchOmissionReason"
            }
          }
        }
      },
      "SearchIdentityResolution": {
        "type": "object",
        "description": "Aggregate identity outcomes for every upstream source row evaluated on the current page, including unresolved public-only rows that remain in hotels through a safe direct redirect. A non-zero unresolved count does not by itself mean a row was omitted; use omissions for rows absent from hotels. This aggregate contains no inventory identifiers.",
        "additionalProperties": false,
        "required": [
          "scope",
          "resolved",
          "ambiguous",
          "notFound",
          "targetNonUnique",
          "notEvaluated"
        ],
        "properties": {
          "scope": {
            "type": "string",
            "const": "current_page",
            "description": "Counts apply only to source rows evaluated on this response page."
          },
          "resolved": {
            "type": "integer",
            "minimum": 0,
            "description": "Source rows with one unique Agent Commerce identity."
          },
          "ambiguous": {
            "type": "integer",
            "minimum": 0,
            "description": "Source rows the identity bridge reported as ambiguous."
          },
          "notFound": {
            "type": "integer",
            "minimum": 0,
            "description": "Source rows the identity bridge could not match. A row can still appear as public-only when it already has a safe direct redirect."
          },
          "targetNonUnique": {
            "type": "integer",
            "minimum": 0,
            "description": "Source rows whose resolved commerce target was also resolved from another source row."
          },
          "notEvaluated": {
            "type": "integer",
            "minimum": 0,
            "description": "Malformed source rows that carried no identity to evaluate."
          }
        }
      },
      "SearchResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "inventoryProfile",
          "inventorySource",
          "repriceAt",
          "hotels",
          "pagination",
          "omissions",
          "identityResolution"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.search"
          },
          "inventoryProfile": {
            "type": "string",
            "const": "brek_retail"
          },
          "inventorySource": {
            "type": "string",
            "const": "brek_retail_exact_search",
            "description": "Wire identifier for the canonical Brek /v2/inventory/listings exact-date shopping source. It indicates parity with the Brek.com search path, not a separate retail price tier."
          },
          "repriceAt": {
            "type": "string",
            "const": "hotel_offers",
            "description": "Load Hotel room offers to reprice the selected property before Quote."
          },
          "hotels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HotelCard"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "omissions": {
            "$ref": "#/components/schemas/SearchOmissions"
          },
          "identityResolution": {
            "$ref": "#/components/schemas/SearchIdentityResolution"
          },
          "requestId": {
            "type": "string"
          },
          "responseTime": {
            "type": "number",
            "description": "Response time in milliseconds."
          }
        }
      },
      "FlexibleHotelSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "hotelName"
        ],
        "properties": {
          "hotelName": {
            "type": "string"
          },
          "starRating": {
            "type": "number"
          },
          "location": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "lat": {
                "type": "number",
                "minimum": -90,
                "maximum": 90
              },
              "lng": {
                "type": "number",
                "minimum": -180,
                "maximum": 180
              },
              "address": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "stateCode": {
                "type": "string"
              }
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      },
      "FlexibleStay": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "checkIn",
          "checkOut",
          "nights"
        ],
        "properties": {
          "checkIn": {
            "type": "string",
            "format": "date"
          },
          "checkOut": {
            "type": "string",
            "format": "date"
          },
          "nights": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "FlexiblePriceBreakdownItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "description",
          "amount"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/Money"
          }
        }
      },
      "TravelerPrice": {
        "type": "object",
        "description": "Complete, unmasked price breakdown for the returned right-side Brek-bookable offer and supported occupancy after Brek's applicable final pricing. The caller must not add another markup. travelerTotal is payNow when there is no mandatory pay-at-property amount; otherwise it is payNow plus payAtProperty. It never contains raw supplier net cost, baseRate, nightlyBaseRate, roomRateBeforeMarkupNumber, the markup calculation, or internal shopping P&L. Read sourceCompleteness before describing optional source components.",
        "additionalProperties": false,
        "required": [
          "taxesAndFeesBreakdown",
          "payNow",
          "payAtProperty",
          "payAtPropertyBreakdown",
          "travelerTotal",
          "sourceCompleteness"
        ],
        "properties": {
          "nightly": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Optional rounded display amount per night for the right-side Brek-bookable offer and complete requested occupancy (all requested rooms), not a per-room amount. It can exclude separately reported taxes, fees, or pay-at-property charges. Never multiply or otherwise reconstruct totals from nightly: rounding can differ by cents. Quote payNow, payAtProperty, and travelerTotal are the authoritative complete-stay amounts."
          },
          "taxesAndFees": {
            "$ref": "#/components/schemas/Money"
          },
          "taxesAndFeesBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlexiblePriceBreakdownItem"
            }
          },
          "payNow": {
            "$ref": "#/components/schemas/Money"
          },
          "payAtProperty": {
            "$ref": "#/components/schemas/Money"
          },
          "payAtPropertyBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlexiblePriceBreakdownItem"
            }
          },
          "travelerTotal": {
            "$ref": "#/components/schemas/Money"
          },
          "sourceCompleteness": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "nightly",
              "taxesAndFees",
              "taxesAndFeesBreakdown",
              "payAtPropertyBreakdown"
            ],
            "properties": {
              "nightly": {
                "type": "boolean"
              },
              "taxesAndFees": {
                "type": "boolean"
              },
              "taxesAndFeesBreakdown": {
                "type": "boolean"
              },
              "payAtPropertyBreakdown": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "FlexibleBrekRate": {
        "type": "object",
        "description": "Cache-derived Brek starting rate for the exact returned stay. It deliberately has no optionId and cannot be quoted directly; first call the returned get_hotel_offers action.",
        "additionalProperties": false,
        "required": [
          "offerType",
          "price",
          "payNow",
          "payAtProperty",
          "travelerTotal",
          "partnerEconomics",
          "travelerDisplay",
          "nextAction",
          "revShare"
        ],
        "properties": {
          "offerType": {
            "type": "string",
            "const": "brek_rate"
          },
          "nightly": {
            "$ref": "#/components/schemas/Money"
          },
          "price": {
            "$ref": "#/components/schemas/TravelerPrice"
          },
          "payNow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Compatibility alias for price.payNow. Prefer price.payNow."
          },
          "payAtProperty": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Compatibility alias for price.payAtProperty. Prefer price.payAtProperty."
          },
          "travelerTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Compatibility alias for price.travelerTotal. Prefer price.travelerTotal."
          },
          "partnerEconomics": {
            "$ref": "#/components/schemas/PartnerEconomics"
          },
          "travelerDisplay": {
            "$ref": "#/components/schemas/TravelerDisplayPolicy"
          },
          "nextAction": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "propertyId"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "get_hotel_offers"
              },
              "propertyId": {
                "type": "string"
              }
            }
          },
          "revShare": {
            "$ref": "#/components/schemas/RevShare"
          }
        }
      },
      "FlexibleHotelCard": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "propertyId",
          "hotel",
          "stay",
          "publicRates",
          "comparison"
        ],
        "properties": {
          "propertyId": {
            "type": "string"
          },
          "hotel": {
            "$ref": "#/components/schemas/FlexibleHotelSummary"
          },
          "stay": {
            "$ref": "#/components/schemas/FlexibleStay"
          },
          "brekRate": {
            "$ref": "#/components/schemas/FlexibleBrekRate"
          },
          "publicRates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicRate"
            }
          },
          "comparison": {
            "$ref": "#/components/schemas/Comparison"
          }
        }
      },
      "FlexibleSearchResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "inventoryProfile",
          "inventorySource",
          "hotels",
          "searchedItineraries",
          "pagination",
          "omissions",
          "identityResolution"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.flexible_search"
          },
          "inventoryProfile": {
            "type": "string",
            "const": "brek_retail"
          },
          "inventorySource": {
            "type": "string",
            "const": "brek_cache_only",
            "description": "Results come from the cache-only flexible-listings surface and contain starting rates, not quoteable room options."
          },
          "hotels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlexibleHotelCard"
            }
          },
          "searchedItineraries": {
            "type": "integer",
            "minimum": 1
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "omissions": {
            "$ref": "#/components/schemas/SearchOmissions"
          },
          "identityResolution": {
            "$ref": "#/components/schemas/SearchIdentityResolution"
          }
        }
      },
      "HotelOffer": {
        "type": "object",
        "description": "Authenticated right-side Brek-bookable room offer containing the complete, unmasked final amounts after Brek's applicable final pricing. The caller must not add another markup. Build traveler output from an explicit allowlist and remove every travelerDisplay.privateFieldsExcluded sibling, including partnerEconomics and revShare. Raw supplier net cost, pre-markup fields, the markup calculation, and internal shopping P&L are never exposed here.",
        "additionalProperties": false,
        "required": [
          "id",
          "typeCode",
          "descriptions",
          "skuDisplayTitleString",
          "offerType",
          "price",
          "payNow",
          "payAtProperty",
          "travelerTotal",
          "cancellationPolicy",
          "partnerEconomics",
          "travelerDisplay",
          "nextAction",
          "revShare"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "typeCode": {
            "type": "string"
          },
          "descriptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "skuDisplayTitleString": {
            "type": "string"
          },
          "rooms": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "code",
                "description"
              ],
              "properties": {
                "occupancyRefId": {
                  "type": "number"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                }
              }
            }
          },
          "offerType": {
            "type": "string",
            "const": "brek_rate"
          },
          "price": {
            "$ref": "#/components/schemas/TravelerPrice"
          },
          "payNow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Compatibility alias for price.payNow. Prefer price.payNow."
          },
          "payAtProperty": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Compatibility alias for price.payAtProperty. Prefer price.payAtProperty."
          },
          "travelerTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "deprecated": true,
            "description": "Compatibility alias for price.travelerTotal. Prefer price.travelerTotal."
          },
          "cancellationPolicy": {
            "$ref": "#/components/schemas/CancellationPolicy"
          },
          "partnerEconomics": {
            "$ref": "#/components/schemas/PartnerEconomics"
          },
          "travelerDisplay": {
            "$ref": "#/components/schemas/TravelerDisplayPolicy"
          },
          "nextAction": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "optionId",
              "propertyId"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "quote"
              },
              "optionId": {
                "type": "string"
              },
              "propertyId": {
                "type": "string"
              }
            }
          },
          "revShare": {
            "$ref": "#/components/schemas/RevShare"
          }
        }
      },
      "PublicRoomComparison": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "offerType",
          "provider",
          "type",
          "scope",
          "device",
          "matchType",
          "roomName",
          "total",
          "priceBasis",
          "nextAction",
          "revShare"
        ],
        "properties": {
          "offerType": {
            "type": "string",
            "const": "public_rate"
          },
          "provider": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "const": "metasearch"
          },
          "scope": {
            "type": "string",
            "const": "room_type",
            "description": "The public result was matched to this Brek room group; it is still an external provider display price."
          },
          "device": {
            "type": "string",
            "const": "desktop"
          },
          "matchType": {
            "type": "string",
            "const": "giata_rtm"
          },
          "roomTypeId": {
            "type": "string"
          },
          "roomName": {
            "type": "string"
          },
          "nightly": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Provider-reported nightly display amount with unverified tax-and-fee completeness."
          },
          "total": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Provider-reported room-type display total for the requested stay, with unverified tax-and-fee completeness."
          },
          "priceBasis": {
            "$ref": "#/components/schemas/PublicPriceBasis"
          },
          "nextAction": {
            "$ref": "#/components/schemas/PublicRedirectNextAction"
          },
          "revShare": {
            "$ref": "#/components/schemas/ExternalProviderRevShare"
          }
        }
      },
      "HotelOfferGroup": {
        "type": "object",
        "required": [
          "names",
          "images",
          "offers"
        ],
        "properties": {
          "names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "bedsDisplay": {
            "type": "string"
          },
          "sizeDisplay": {
            "type": "string"
          },
          "occupancyMax": {
            "type": "integer"
          },
          "amenities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "amenityGroups": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "title",
                "features"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "features": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "referencePricing": {
            "$ref": "#/components/schemas/PublicRoomComparison"
          },
          "offers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HotelOffer"
            }
          }
        },
        "additionalProperties": false
      },
      "HotelOffersResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "inventoryProfile",
          "propertyId",
          "groups"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.hotel_offers"
          },
          "inventoryProfile": {
            "type": "string",
            "const": "brek_retail"
          },
          "propertyId": {
            "type": "string",
            "description": "The unchanged opaque commerce propertyId from the request path. Use this value as Quote accommodation.code for an offer from this response."
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HotelOfferGroup"
            }
          },
          "cheapestOffer": {
            "$ref": "#/components/schemas/HotelOffer"
          },
          "requestId": {
            "type": "string"
          },
          "responseTime": {
            "type": "number"
          }
        }
      },
      "Quote": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "accommodation",
          "occupancies",
          "checkIn",
          "checkOut"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "accommodation": {
            "type": "object",
            "required": [
              "accommodationCode",
              "accommodationName"
            ],
            "properties": {
              "accommodationCode": {
                "type": "string"
              },
              "accommodationName": {
                "type": "string"
              },
              "accommodationType": {
                "type": "string",
                "description": "Opaque provider-supplied display label. Current responses use lowercase values such as hotel; do not treat its casing as an enum or copy it into the Quote request's accommodation.type field.",
                "example": "hotel"
              },
              "location": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "additionalProperties": false
          },
          "occupancies": {
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/Occupancy"
            }
          },
          "checkIn": {
            "type": "string",
            "format": "date"
          },
          "checkOut": {
            "type": "string",
            "format": "date"
          },
          "roomCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "roomNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "boardCode": {
            "type": "string"
          },
          "boardName": {
            "type": "string"
          },
          "isRefundable": {
            "type": "boolean"
          },
          "rooms": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "code"
              ],
              "properties": {
                "occupancyRefId": {
                  "type": "number"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                }
              }
            }
          },
          "requestId": {
            "type": "string"
          },
          "responseTime": {
            "type": "number"
          }
        }
      },
      "QuoteResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "offerType",
          "quote",
          "price",
          "cancellationPolicy",
          "partnerEconomics",
          "travelerDisplay",
          "expiresAt",
          "revShare",
          "nextAction"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.quote"
          },
          "offerType": {
            "type": "string",
            "const": "brek_rate"
          },
          "quote": {
            "$ref": "#/components/schemas/Quote"
          },
          "price": {
            "$ref": "#/components/schemas/TravelerPrice"
          },
          "cancellationPolicy": {
            "$ref": "#/components/schemas/CancellationPolicy"
          },
          "partnerEconomics": {
            "$ref": "#/components/schemas/PartnerEconomics"
          },
          "travelerDisplay": {
            "$ref": "#/components/schemas/TravelerDisplayPolicy"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "revShare": {
            "$ref": "#/components/schemas/RevShare"
          },
          "nextAction": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "availableModes"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "create_checkout_session"
              },
              "availableModes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "hosted",
                    "native"
                  ]
                }
              }
            }
          }
        }
      },
      "CheckoutPrice": {
        "type": "object",
        "description": "Complete, unmasked final price for the selected right-side Brek-bookable offer and all requested rooms after Brek's applicable final pricing. The caller must not add another markup. travelerTotal is payNow when payAtProperty is zero; otherwise travelerTotal equals payNow plus payAtProperty. All three values use the same currency; sourceCompleteness says which optional source components were supplied. Raw supplier net cost, pre-markup fields, the markup calculation, and internal shopping P&L are not returned.",
        "additionalProperties": false,
        "required": [
          "payNow",
          "payAtProperty",
          "travelerTotal"
        ],
        "properties": {
          "nightly": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Optional rounded display amount per night for the complete requested occupancy. Never multiply it to reconstruct a total; rounding can differ by cents. Quote payNow, payAtProperty, and travelerTotal are the authoritative complete-stay amounts."
          },
          "taxesAndFees": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Complete-stay online taxes and mandatory fees when the source supplied an explicit amount."
          },
          "taxesAndFeesBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlexiblePriceBreakdownItem"
            }
          },
          "payNow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Amount Brek authorizes and captures through Stripe, including known online-collected taxes and mandatory fees."
          },
          "payAtProperty": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Known mandatory amount paid directly to the hotel and not charged by Brek."
          },
          "payAtPropertyBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlexiblePriceBreakdownItem"
            }
          },
          "travelerTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Complete selected Brek-bookable total for the complete stay and every requested room: payNow when payAtProperty is zero, otherwise payNow plus payAtProperty. Excludes optional incidentals, deposits, and charges not returned by the API."
          },
          "sourceCompleteness": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "nightly",
              "taxesAndFees",
              "taxesAndFeesBreakdown",
              "payAtPropertyBreakdown"
            ],
            "properties": {
              "nightly": {
                "type": "boolean"
              },
              "taxesAndFees": {
                "type": "boolean"
              },
              "taxesAndFeesBreakdown": {
                "type": "boolean"
              },
              "payAtPropertyBreakdown": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "BookingPrice": {
        "type": "object",
        "description": "Complete post-booking price summary. The legacy amount and currency fields mirror payNow for backward compatibility.",
        "additionalProperties": false,
        "required": [
          "amount",
          "currency",
          "payNow",
          "payAtProperty",
          "travelerTotal"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "description": "Legacy alias for payNow.amount."
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "description": "Legacy alias for payNow.currency."
          },
          "nightly": {
            "$ref": "#/components/schemas/Money"
          },
          "taxesAndFees": {
            "$ref": "#/components/schemas/Money"
          },
          "taxesAndFeesBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlexiblePriceBreakdownItem"
            }
          },
          "payNow": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Amount captured by Brek through Stripe."
          },
          "payAtProperty": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Known mandatory amount paid directly to the hotel and not charged by Brek."
          },
          "payAtPropertyBreakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlexiblePriceBreakdownItem"
            }
          },
          "travelerTotal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "payNow plus payAtProperty. Excludes optional incidentals, deposits, and charges not returned by the API."
          },
          "sourceCompleteness": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "nightly",
              "taxesAndFees",
              "taxesAndFeesBreakdown",
              "payAtPropertyBreakdown"
            ],
            "properties": {
              "nightly": {
                "type": "boolean"
              },
              "taxesAndFees": {
                "type": "boolean"
              },
              "taxesAndFeesBreakdown": {
                "type": "boolean"
              },
              "payAtPropertyBreakdown": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "PaymentHold": {
        "type": "object",
        "description": "Current state of the Stripe authorization or capture plus Brek's release policy. The policy booleans are not proof that a specific hold has been released. For an expired checkout, only payment.status=voided together with expiration.phase=voided proves release.",
        "additionalProperties": false,
        "required": [
          "state",
          "captureBoundary",
          "releasedOnQuoteExpiry",
          "releasedOnPreBookingFailure"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "not_authorized",
              "authorized_hold",
              "captured",
              "voided",
              "refunded",
              "failed"
            ]
          },
          "captureBoundary": {
            "type": "string",
            "const": "after_supplier_confirmation"
          },
          "releasedOnQuoteExpiry": {
            "type": "boolean",
            "const": true,
            "description": "Policy guarantee that Brek releases uncaptured holds on Quote expiry; not evidence that this checkout's provider release has completed."
          },
          "releasedOnPreBookingFailure": {
            "type": "boolean",
            "const": true,
            "description": "Policy guarantee for pre-booking failures; inspect payment.status and any recovery journal for the actual provider outcome."
          }
        }
      },
      "CheckoutPayment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "provider",
          "status",
          "livemode",
          "publishableKey",
          "authorizationOwner"
        ],
        "properties": {
          "provider": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "requires_payment_method",
              "authorized",
              "captured",
              "voided",
              "refunded",
              "failed"
            ]
          },
          "livemode": {
            "type": "boolean",
            "description": "Must be false for Test and true for Live."
          },
          "publishableKey": {
            "type": "string"
          },
          "authorizationOwner": {
            "type": "string",
            "const": "calling_agent_or_traveler",
            "description": "Legacy wire value for integration-side payment authorization responsibility. It means trusted application code must hand the hosted URL or native Stripe inputs directly to a secure human-facing payment UI. It never authorizes an LLM or model to inspect card data, receive payment secrets, or authorize payment."
          },
          "hold": {
            "$ref": "#/components/schemas/PaymentHold"
          },
          "clientSecret": {
            "type": "string",
            "readOnly": true,
            "description": "Sensitive Stripe client secret returned only by POST checkout creation for a native checkout awaiting payment. Only after an ambiguous transport result or HTTP 502, 503, or 504 may the same Idempotency-Key and byte-identical retained body recover it. Ordinary GET/status, authorization, abandonment, and later lifecycle responses omit it. Use it only in the traveler's secure payment UI; never place it in model context or logs."
          }
        }
      },
      "CheckoutAction": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "url"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "open_hosted_checkout"
              },
              "url": {
                "type": "string",
                "format": "uri",
                "readOnly": true,
                "description": "Sensitive signed hosted checkout URL. The Brek page consumes its token, removes it from the browser address bar, and retains it only in page memory."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "confirm_payment_natively_then_confirm_booking"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "requiresHumanApproval",
              "requiresApprovalAttestation",
              "requiresIdempotencyKey"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "review_approval_receipt_then_confirm_booking"
              },
              "requiresHumanApproval": {
                "type": "boolean",
                "const": true
              },
              "requiresApprovalAttestation": {
                "type": "boolean",
                "const": true
              },
              "requiresIdempotencyKey": {
                "type": "boolean",
                "const": true
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "poll_checkout",
                  "contact_support"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "bookingReference"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "get_booking"
              },
              "bookingReference": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "reason",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "stop"
              },
              "reason": {
                "type": "string",
                "enum": [
                  "failed",
                  "cancelled",
                  "expired"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        ]
      },
      "ApprovalReceipt": {
        "type": "object",
        "description": "Server-generated, immutable snapshot of the Quote terms bound to this checkout. It is safe to show to the traveler because it excludes partner economics. By itself it proves which terms were frozen, not that a human approved them; use the typed confirm-time approval attestation documented by Confirm for that evidence.",
        "additionalProperties": false,
        "required": [
          "object",
          "version",
          "hotel",
          "stay",
          "price",
          "cancellationPolicy",
          "travelerSafe",
          "partnerEconomicsIncluded"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.approval_receipt"
          },
          "version": {
            "type": "integer",
            "const": 1
          },
          "quoteId": {
            "type": "string"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Server time when these immutable terms were frozen."
          },
          "validUntil": {
            "type": "string",
            "format": "date-time"
          },
          "hotel": {
            "type": "object",
            "properties": {
              "propertyId": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "const": "Hotel"
              },
              "location": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "longitude": {
                    "type": "number"
                  },
                  "latitude": {
                    "type": "number"
                  }
                }
              }
            },
            "additionalProperties": false
          },
          "stay": {
            "type": "object",
            "properties": {
              "checkIn": {
                "type": "string",
                "format": "date"
              },
              "checkOut": {
                "type": "string",
                "format": "date"
              },
              "occupancies": {
                "type": "array",
                "minItems": 1,
                "maxItems": 3,
                "items": {
                  "$ref": "#/components/schemas/ApprovalOccupancy"
                }
              },
              "roomCodes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "roomNames": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "boardCode": {
                "type": "string"
              },
              "boardName": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CheckoutPrice"
              }
            ],
            "description": "Authoritative approved Quote tax-and-fee breakdown frozen for this checkout. When checkout's top-level price.sourceCompleteness is false for an optional component, present this approvalReceipt.price value rather than inferring zero or reconstructing it."
          },
          "cancellationPolicy": {
            "$ref": "#/components/schemas/CancellationPolicy"
          },
          "travelerSafe": {
            "type": "boolean",
            "const": true
          },
          "partnerEconomicsIncluded": {
            "type": "boolean",
            "const": false
          },
          "sourceQuoteFingerprint": {
            "type": "string"
          },
          "fingerprint": {
            "type": "string",
            "description": "Optional opaque server token bound to Brek's authoritative stored approval terms. Newly created receipts use a 64-character lowercase hexadecimal SHA-256 fingerprint, while legacy stored receipts may omit this field. It is not a hash the caller should recompute from this safe presentation; when returned, copy it unchanged when an endpoint asks for it."
          }
        }
      },
      "ApprovalAttestation": {
        "type": "object",
        "description": "Brek's persisted, non-PII audit record of the confirm-time human approval supplied by the caller.",
        "additionalProperties": false,
        "required": [
          "object",
          "version",
          "checkoutSessionId",
          "quoteId",
          "receiptFingerprint",
          "actorType",
          "approvedAt",
          "source",
          "approvalRef",
          "recordedAt",
          "containsPii"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.approval_attestation"
          },
          "version": {
            "type": "integer",
            "const": 1
          },
          "checkoutSessionId": {
            "type": "string"
          },
          "quoteId": {
            "type": "string"
          },
          "receiptFingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "actorType": {
            "type": "string",
            "const": "human"
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "enum": [
              "agent_ui",
              "hosted_checkout",
              "developer_console"
            ]
          },
          "approvalRef": {
            "type": "string"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          },
          "containsPii": {
            "type": "boolean",
            "const": false
          }
        }
      },
      "CheckoutSession": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "mode",
          "environment",
          "status",
          "expiresAt",
          "price",
          "payment",
          "approvalReceipt",
          "action"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.checkout_session"
          },
          "loyaltyMembership": {
            "$ref": "#/components/schemas/LoyaltyMembership"
          },
          "id": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "hosted",
              "native"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "live"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting_payment",
              "payment_authorized",
              "expiry_requires_attention",
              "booking",
              "confirmed",
              "failed",
              "cancelled",
              "expired"
            ]
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "bookingReference": {
            "type": "string",
            "description": "Present when status is confirmed. After an indeterminate Confirm response, use it only with GET /bookings/{bookingReference}; do not submit another confirmation write."
          },
          "confirmation": {
            "$ref": "#/components/schemas/CheckoutConfirmationRecovery"
          },
          "expiration": {
            "$ref": "#/components/schemas/CheckoutExpirationRecovery"
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CheckoutPrice"
              }
            ],
            "description": "Current checkout price projection. When sourceCompleteness is false for an optional component, approvalReceipt.price is the authoritative approved Quote tax-and-fee breakdown; do not infer zero or reconstruct a missing value."
          },
          "payment": {
            "$ref": "#/components/schemas/CheckoutPayment"
          },
          "approvalReceipt": {
            "$ref": "#/components/schemas/ApprovalReceipt"
          },
          "approvalAttestation": {
            "$ref": "#/components/schemas/ApprovalAttestation"
          },
          "action": {
            "$ref": "#/components/schemas/CheckoutAction"
          }
        },
        "oneOf": [
          {
            "title": "Test checkout",
            "required": [
              "environment",
              "payment"
            ],
            "properties": {
              "environment": {
                "const": "test"
              },
              "payment": {
                "required": [
                  "livemode"
                ],
                "properties": {
                  "livemode": {
                    "const": false
                  }
                }
              }
            }
          },
          {
            "title": "Live checkout",
            "required": [
              "environment",
              "payment"
            ],
            "properties": {
              "environment": {
                "const": "live"
              },
              "payment": {
                "required": [
                  "livemode"
                ],
                "properties": {
                  "livemode": {
                    "const": true
                  }
                }
              }
            }
          }
        ]
      },
      "CheckoutConfirmationRecovery": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "phase",
          "supplierStatus",
          "paymentStatus",
          "updatedAt"
        ],
        "properties": {
          "phase": {
            "type": "string",
            "enum": [
              "supplier_started",
              "supplier_succeeded",
              "supplier_outcome_unknown",
              "capture_started",
              "capture_succeeded",
              "finalizing",
              "confirmed",
              "failed"
            ]
          },
          "supplierStatus": {
            "type": "string",
            "enum": [
              "started",
              "succeeded",
              "unknown",
              "failed"
            ]
          },
          "paymentStatus": {
            "type": "string",
            "enum": [
              "authorized",
              "capturing",
              "captured",
              "unknown"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nextAction": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "poll_checkout",
                  "contact_support"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "CheckoutExpirationRecovery": {
        "type": "object",
        "description": "Durable payment-hold release state created when a checkout or its Quote expires, or when a Test checkout is explicitly abandoned before Confirm. expiration.phase=voided together with payment.status=voided proves release. expiry_requires_attention or any other phase does not prove release: follow nextAction, never Confirm, and never create another checkout from this Quote.",
        "additionalProperties": false,
        "required": [
          "reason",
          "phase",
          "updatedAt"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "enum": [
              "checkout_expired",
              "quote_expired_or_changed",
              "test_checkout_abandoned"
            ]
          },
          "phase": {
            "type": "string",
            "enum": [
              "void_started",
              "voided",
              "void_outcome_unknown"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nextAction": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "poll_checkout",
                  "contact_support"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "CancellationPreview": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "object",
          "bookingReference",
          "environment",
          "cancellable",
          "reason",
          "isSimulation",
          "calculatedAt",
          "price",
          "approval"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.cancellation_preview"
          },
          "bookingReference": {
            "type": "string"
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "live"
            ]
          },
          "cancellable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "enum": [
              "cancellable",
              "non_refundable",
              "policy_unavailable",
              "stay_started"
            ]
          },
          "isSimulation": {
            "type": "boolean"
          },
          "calculatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "price": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "originalTotal",
              "refundableAmount",
              "cancellationPenalty"
            ],
            "properties": {
              "originalTotal": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  }
                ],
                "description": "Original Brek-collected payNow amount. It excludes payAtProperty and hotel-collected charges."
              },
              "refundableAmount": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  }
                ],
                "description": "Portion of originalTotal currently calculated for refund. It never includes payAtProperty."
              },
              "cancellationPenalty": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  }
                ],
                "description": "Non-refundable Brek-collected difference: originalTotal minus refundableAmount."
              }
            }
          },
          "approval": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "required",
              "instruction"
            ],
            "properties": {
              "required": {
                "type": "boolean",
                "description": "False in Test and true in Live."
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "description": "Present only for a cancellable Live preview; five minutes after issue."
              },
              "token": {
                "type": "string",
                "readOnly": true,
                "description": "Sensitive approval token present only for a cancellable Live preview. Never log, persist, display, or expose it to a model."
              },
              "previewFingerprint": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$",
                "description": "Non-secret fingerprint of the exact cancellation consequences. Copy into Cancel approval.previewFingerprint after human approval."
              },
              "instruction": {
                "type": "string"
              }
            }
          }
        },
        "oneOf": [
          {
            "title": "Test cancellation preview",
            "required": [
              "environment",
              "isSimulation",
              "approval"
            ],
            "properties": {
              "environment": {
                "const": "test"
              },
              "isSimulation": {
                "const": true
              },
              "approval": {
                "required": [
                  "required"
                ],
                "properties": {
                  "required": {
                    "const": false
                  }
                }
              }
            }
          },
          {
            "title": "Live cancellation preview",
            "required": [
              "environment",
              "isSimulation",
              "approval"
            ],
            "properties": {
              "environment": {
                "const": "live"
              },
              "isSimulation": {
                "const": false
              },
              "approval": {
                "required": [
                  "required"
                ],
                "properties": {
                  "required": {
                    "const": true
                  }
                }
              }
            }
          }
        ]
      },
      "Commission": {
        "type": "object",
        "description": "Private application-scoped revenue-share ledger. It may expose the aggregate realized-profit basis required to verify commissionAmount = realizedProfit × shareRate, but never Brek's residual profit, supplier net cost, markup, or itemized P&L. Do not display this object to the traveler.",
        "required": [
          "ledgerId",
          "status",
          "environment",
          "isSimulation"
        ],
        "properties": {
          "ledgerId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "available",
              "reversed",
              "paid"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "live"
            ]
          },
          "isSimulation": {
            "type": "boolean"
          },
          "basis": {
            "type": "string",
            "const": "realized_brek_profit"
          },
          "realizedProfit": {
            "type": "number",
            "description": "Aggregate contractual settlement basis for this commission, not a traveler price or itemized cost stack."
          },
          "shareRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "commissionAmount": {
            "type": "number",
            "minimum": 0
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "checkOut": {
            "type": "string",
            "format": "date"
          },
          "holdDays": {
            "type": "integer",
            "minimum": 0
          },
          "eligibleAt": {
            "type": "string",
            "format": "date-time"
          },
          "pendingReason": {
            "type": "string",
            "description": "Reason a pending ledger is not yet available. Reversal clears this field.",
            "enum": [
              "stay_completion_hold",
              "profit_not_ready",
              "checkout_date_missing",
              "booking_not_settled",
              "test_simulation_only"
            ]
          },
          "profitSource": {
            "type": "string",
            "enum": [
              "test_simulation",
              "booking_pricing_snapshot",
              "booking_pnl"
            ]
          },
          "profitAsOf": {
            "type": "string",
            "format": "date-time"
          },
          "availableAt": {
            "type": "string",
            "format": "date-time"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time"
          },
          "payoutReference": {
            "type": "string",
            "description": "Verified external payout reference. Present when status is paid."
          },
          "clawbackStatus": {
            "type": "string",
            "enum": [
              "required",
              "recovered",
              "waived"
            ],
            "description": "Post-payout recovery state. A paid commission with clawbackStatus=required must not be presented as clean paid earnings."
          },
          "clawbackRequiredAt": {
            "type": "string",
            "format": "date-time"
          },
          "clawbackReason": {
            "type": "string"
          },
          "reversedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reversalReason": {
            "type": "string"
          }
        },
        "examples": [
          {
            "ledgerId": "acl_test_pending",
            "status": "pending",
            "environment": "test",
            "isSimulation": true,
            "basis": "realized_brek_profit",
            "realizedProfit": 20,
            "shareRate": 0.1,
            "commissionAmount": 2,
            "currency": "USD",
            "checkOut": "2026-11-28",
            "holdDays": 21,
            "pendingReason": "test_simulation_only",
            "profitSource": "test_simulation"
          },
          {
            "ledgerId": "acl_live_paid_clawback",
            "status": "paid",
            "environment": "live",
            "isSimulation": false,
            "basis": "realized_brek_profit",
            "realizedProfit": 20,
            "shareRate": 0.1,
            "commissionAmount": 2,
            "currency": "USD",
            "profitSource": "booking_pnl",
            "availableAt": "2026-12-19T21:47:50.937Z",
            "paidAt": "2026-12-20T21:47:50.937Z",
            "payoutReference": "payout_123",
            "clawbackStatus": "required",
            "clawbackRequiredAt": "2026-12-24T21:47:50.937Z",
            "clawbackReason": "post_payout_refund"
          },
          {
            "ledgerId": "acl_test_reversed",
            "status": "reversed",
            "environment": "test",
            "isSimulation": true,
            "basis": "realized_brek_profit",
            "realizedProfit": 20,
            "shareRate": 0.1,
            "commissionAmount": 2,
            "currency": "USD",
            "profitSource": "test_simulation",
            "reversedAt": "2026-11-16T09:47:50.937Z",
            "reversalReason": "booking_cancelled_and_refunded"
          }
        ],
        "oneOf": [
          {
            "title": "Test pending commission",
            "required": [
              "environment",
              "isSimulation",
              "status",
              "pendingReason",
              "profitSource"
            ],
            "properties": {
              "environment": {
                "const": "test"
              },
              "isSimulation": {
                "const": true
              },
              "status": {
                "const": "pending"
              },
              "pendingReason": {
                "const": "test_simulation_only"
              },
              "profitSource": {
                "const": "test_simulation"
              }
            }
          },
          {
            "title": "Test reversed commission",
            "required": [
              "environment",
              "isSimulation",
              "status",
              "profitSource",
              "reversedAt",
              "reversalReason"
            ],
            "not": {
              "required": [
                "pendingReason"
              ],
              "properties": {
                "pendingReason": {
                  "type": "string"
                }
              }
            },
            "properties": {
              "environment": {
                "const": "test"
              },
              "isSimulation": {
                "const": true
              },
              "status": {
                "const": "reversed"
              },
              "profitSource": {
                "const": "test_simulation"
              }
            }
          },
          {
            "title": "Live pending commission",
            "required": [
              "environment",
              "isSimulation",
              "status",
              "pendingReason"
            ],
            "properties": {
              "environment": {
                "const": "live"
              },
              "isSimulation": {
                "const": false
              },
              "status": {
                "const": "pending"
              }
            }
          },
          {
            "title": "Live available commission",
            "required": [
              "environment",
              "isSimulation",
              "status"
            ],
            "not": {
              "required": [
                "pendingReason"
              ],
              "properties": {
                "pendingReason": {
                  "type": "string"
                }
              }
            },
            "properties": {
              "environment": {
                "const": "live"
              },
              "isSimulation": {
                "const": false
              },
              "status": {
                "const": "available"
              }
            }
          },
          {
            "title": "Live reversed commission",
            "required": [
              "environment",
              "isSimulation",
              "status",
              "reversedAt",
              "reversalReason"
            ],
            "not": {
              "required": [
                "pendingReason"
              ],
              "properties": {
                "pendingReason": {
                  "type": "string"
                }
              }
            },
            "properties": {
              "environment": {
                "const": "live"
              },
              "isSimulation": {
                "const": false
              },
              "status": {
                "const": "reversed"
              }
            }
          },
          {
            "title": "Live paid commission",
            "required": [
              "environment",
              "isSimulation",
              "status"
            ],
            "not": {
              "required": [
                "pendingReason"
              ],
              "properties": {
                "pendingReason": {
                  "type": "string"
                }
              }
            },
            "properties": {
              "environment": {
                "const": "live"
              },
              "isSimulation": {
                "const": false
              },
              "status": {
                "const": "paid"
              }
            }
          }
        ],
        "additionalProperties": false
      },
      "CancellationState": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "requires_attention",
              "cancelled"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "pending",
              "unknown",
              "succeeded"
            ]
          },
          "phase": {
            "type": "string",
            "enum": [
              "supplier_started",
              "supplier_outcome_unknown",
              "refund_started",
              "refund_pending",
              "reconciled"
            ]
          },
          "reason": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "retryable": {
            "type": "boolean",
            "const": false
          },
          "nextAction": {
            "type": "object",
            "required": [
              "type",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "poll_booking",
                  "contact_support"
                ]
              },
              "message": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "approvalAttestation": {
            "type": [
              "object",
              "null"
            ],
            "description": "Persisted Live human-approval evidence. Test cancellation returns null because no approval token is required.",
            "additionalProperties": false,
            "required": [
              "object",
              "version",
              "bookingReference",
              "previewFingerprint",
              "approvalTokenFingerprint",
              "actorType",
              "approvedAt",
              "source",
              "approvalRef",
              "recordedAt",
              "containsPii"
            ],
            "properties": {
              "object": {
                "type": "string",
                "const": "agent_commerce.cancellation_approval_attestation"
              },
              "version": {
                "type": "integer",
                "const": 1
              },
              "bookingReference": {
                "type": "string"
              },
              "previewFingerprint": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "approvalTokenFingerprint": {
                "type": "string"
              },
              "actorType": {
                "type": "string",
                "const": "human"
              },
              "approvedAt": {
                "type": "string",
                "format": "date-time"
              },
              "source": {
                "type": "string",
                "enum": [
                  "agent_ui",
                  "hosted_checkout",
                  "developer_console"
                ]
              },
              "approvalRef": {
                "type": "string"
              },
              "recordedAt": {
                "type": "string",
                "format": "date-time"
              },
              "containsPii": {
                "type": "boolean",
                "const": false
              }
            }
          },
          "approvedPreview": {
            "type": "object",
            "description": "Durable snapshot of the cancellation consequences approved for this operation.",
            "additionalProperties": false,
            "required": [
              "cancellable",
              "reason",
              "totalCharge",
              "refundableAmount",
              "currency",
              "policyFingerprint",
              "calculatedAt",
              "isSimulation"
            ],
            "properties": {
              "cancellable": {
                "type": "boolean"
              },
              "reason": {
                "type": "string"
              },
              "totalCharge": {
                "type": "number"
              },
              "refundableAmount": {
                "type": "number"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "policyFingerprint": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "calculatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "isSimulation": {
                "type": "boolean"
              }
            }
          },
          "supplier": {
            "type": "object",
            "description": "Traveler-safe supplier execution status. Raw supplier responses, identifiers, and error payloads remain internal.",
            "additionalProperties": false,
            "required": [
              "status"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "started",
                  "succeeded",
                  "unknown"
                ]
              }
            }
          },
          "refundableAmount": {
            "type": "number",
            "description": "Legacy numeric portion of the Brek-collected payNow amount calculated for refund. It excludes payAtProperty."
          },
          "refund": {
            "type": "object",
            "required": [
              "status",
              "amount"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "not_required",
                  "pending",
                  "succeeded",
                  "failed"
                ]
              },
              "amount": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  }
                ],
                "description": "Refund of the Brek-collected payNow amount. It does not represent a hotel refund of payAtProperty."
              },
              "estimatedArrival": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "additionalProperties": false
          },
          "isSimulation": {
            "type": "boolean"
          }
        },
        "examples": [
          {
            "status": "cancelled",
            "outcome": "succeeded",
            "phase": "reconciled",
            "reason": "Simulated Test lifecycle audit",
            "startedAt": "2027-01-02T12:00:00.000Z",
            "updatedAt": "2027-01-02T12:00:02.000Z",
            "retryable": false,
            "approvalAttestation": null,
            "approvedPreview": {
              "cancellable": true,
              "reason": "cancellable",
              "totalCharge": 231.71,
              "refundableAmount": 231.71,
              "currency": "USD",
              "policyFingerprint": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
              "calculatedAt": "2027-01-02T11:59:59.000Z",
              "isSimulation": true
            },
            "supplier": {
              "status": "succeeded"
            },
            "refund": {
              "status": "succeeded",
              "amount": {
                "amount": 231.71,
                "currency": "USD"
              },
              "estimatedArrival": null
            },
            "completedAt": "2027-01-02T12:00:01.000Z",
            "refundableAmount": 231.71,
            "isSimulation": true
          }
        ],
        "additionalProperties": false
      },
      "BookingGuest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "surName",
          "ageCategory"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "surName": {
            "type": [
              "string",
              "null"
            ]
          },
          "ageCategory": {
            "type": "string",
            "enum": [
              "adult",
              "child"
            ]
          }
        }
      },
      "Booking": {
        "type": "object",
        "description": "Structured post-confirmation booking state. A real supplier reservation requires status=confirmed, environment=live, and isSimulation=false. A confirmed Test booking is a simulation and never triggers a supplier reservation or traveler email.",
        "required": [
          "object",
          "bookingReference",
          "status",
          "environment",
          "isSimulation",
          "price",
          "accommodation",
          "stay",
          "guests",
          "propertyDetails",
          "customer",
          "approvalReceipt",
          "approvalAttestation",
          "confirmation"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.booking"
          },
          "loyaltyMembership": {
            "$ref": "#/components/schemas/LoyaltyMembership"
          },
          "bookingReference": {
            "type": "string"
          },
          "providerBookingReference": {
            "type": "string"
          },
          "management": {
            "type": "object",
            "description": "Private traveler-only View / Manage My Booking capability. Deliver directly to the traveler using trusted code; never log or publish this URL. It requires no Partner Console login, carries a token in the URL fragment, and expires 180 days after check-out. Omitted when the email or stay date is unavailable. Cancellation still requires a fresh preview and explicit human approval.",
            "additionalProperties": false,
            "required": [
              "url",
              "expiresAt"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "hotelConfirmationNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Current booking or cancellation state. status=confirmed proves a real hotel reservation only together with environment=live and isSimulation=false.",
            "enum": [
              "confirmed",
              "cancellation_in_progress",
              "cancellation_requires_attention",
              "cancelled",
              "failed"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "live"
            ],
            "description": "Test runs the guarded simulation path; Live may create a real supplier reservation."
          },
          "isSimulation": {
            "type": "boolean",
            "description": "True for Test simulations and false for Live supplier bookings."
          },
          "price": {
            "$ref": "#/components/schemas/BookingPrice"
          },
          "accommodation": {
            "type": "object",
            "additionalProperties": true
          },
          "stay": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "rooms",
              "roomNames",
              "cancelPolicy"
            ],
            "properties": {
              "checkIn": {
                "type": "string",
                "format": "date"
              },
              "checkOut": {
                "type": "string",
                "format": "date"
              },
              "rooms": {
                "type": "array",
                "description": "Traveler-safe room identity and display fields only. Supplier rate, base-rate, markup, exchange, and raw pricing metadata are never returned here; use Booking.price for totals.",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "occupancyRefId": {
                      "type": "number"
                    },
                    "code": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    }
                  }
                }
              },
              "roomNames": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "boardName": {
                "type": "string"
              },
              "cancelPolicy": {
                "$ref": "#/components/schemas/CancellationPolicy"
              }
            }
          },
          "guests": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "holder",
              "occupancies"
            ],
            "properties": {
              "holder": {
                "$ref": "#/components/schemas/BookingGuest"
              },
              "occupancies": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "occupancyId",
                    "guests"
                  ],
                  "properties": {
                    "occupancyId": {
                      "type": [
                        "integer",
                        "string"
                      ]
                    },
                    "guests": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BookingGuest"
                      }
                    }
                  }
                }
              }
            }
          },
          "propertyDetails": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "available",
              "address",
              "checkInInstructions",
              "notices",
              "deposit"
            ],
            "properties": {
              "available": {
                "type": "boolean"
              },
              "address": {
                "description": "Upstream address value, or null when absent."
              },
              "checkInInstructions": {
                "description": "Upstream check-in instructions, or null when absent."
              },
              "notices": {
                "description": "Upstream property notices, or null when absent."
              },
              "deposit": {
                "description": "Upstream deposit information, or null when absent."
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              }
            },
            "additionalProperties": false
          },
          "approvalReceipt": {
            "$ref": "#/components/schemas/ApprovalReceipt"
          },
          "approvalAttestation": {
            "$ref": "#/components/schemas/ApprovalAttestation"
          },
          "confirmation": {
            "type": "object",
            "required": [
              "deliveryStatus"
            ],
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              },
              "deliveryStatus": {
                "type": "string",
                "enum": [
                  "pending",
                  "sent",
                  "failed",
                  "suppressed_in_test"
                ],
                "description": "Traveler-email handoff state, separate from the booking outcome. pending means Brek is preparing the email; sent means the email provider accepted it for delivery, not that it reached the inbox; failed means delivery handoff failed; suppressed_in_test is the expected Test state and no email was sent. Email failure never changes booking status. Never repeat Confirm to resend an email."
              }
            },
            "additionalProperties": false
          },
          "cancellation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CancellationState"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "commission": {
            "$ref": "#/components/schemas/Commission"
          }
        },
        "oneOf": [
          {
            "title": "Test booking",
            "required": [
              "environment",
              "isSimulation",
              "confirmation",
              "commission"
            ],
            "properties": {
              "environment": {
                "const": "test"
              },
              "isSimulation": {
                "const": true
              },
              "confirmation": {
                "required": [
                  "deliveryStatus"
                ],
                "properties": {
                  "deliveryStatus": {
                    "const": "suppressed_in_test"
                  }
                }
              },
              "commission": {
                "$ref": "#/components/schemas/Commission"
              }
            }
          },
          {
            "title": "Live booking",
            "required": [
              "environment",
              "isSimulation",
              "confirmation"
            ],
            "properties": {
              "environment": {
                "const": "live"
              },
              "isSimulation": {
                "const": false
              },
              "confirmation": {
                "required": [
                  "deliveryStatus"
                ],
                "properties": {
                  "deliveryStatus": {
                    "enum": [
                      "pending",
                      "sent",
                      "failed"
                    ]
                  }
                }
              }
            }
          }
        ],
        "additionalProperties": false
      },
      "Capabilities": {
        "type": "object",
        "required": [
          "object",
          "version",
          "authentication",
          "authorization",
          "offers",
          "inventory",
          "transactions",
          "searchModes",
          "privateEconomics",
          "agreement",
          "rateLimit",
          "resourceLimits",
          "application"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "agent_commerce.capabilities"
          },
          "version": {
            "type": "string",
            "const": "2026-09-01"
          },
          "authentication": {
            "type": "string",
            "const": "bearer_api_key"
          },
          "authorization": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "scopeModel",
              "effectiveScopes",
              "selectableScopes"
            ],
            "properties": {
              "scopeModel": {
                "type": "string",
                "const": "application_inherited"
              },
              "effectiveScopes": {
                "type": "array",
                "minItems": 4,
                "maxItems": 4,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "enum": [
                    "shopping:read",
                    "checkout:write",
                    "booking:read",
                    "cancellation:write"
                  ]
                }
              },
              "selectableScopes": {
                "type": "boolean",
                "const": false
              }
            }
          },
          "offers": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "brekRate": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "agentCheckoutAvailable": {
                    "type": "boolean",
                    "description": "Exactly the same readiness value as transactions.safeToConfirm. It is true only when inventory identity resolution, Brek retail search authorization, checkout signing, confirmation delivery, payment, and hotel confirmation are all ready for this environment."
                  }
                }
              }
            }
          },
          "inventory": {
            "type": "object",
            "required": [
              "profile",
              "alignedChannels",
              "pricing",
              "identifierScope"
            ],
            "properties": {
              "profile": {
                "type": "string",
                "const": "brek_retail"
              },
              "alignedChannels": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "brek.com",
                    "brek_mcp"
                  ]
                }
              },
              "pricing": {
                "type": "string",
                "const": "exact_with_private_api_key"
              },
              "identifierScope": {
                "type": "string",
                "const": "agent_commerce_channel"
              }
            },
            "additionalProperties": false
          },
          "transactions": {
            "type": "object",
            "required": [
              "environment",
              "identityBridge",
              "retailSearchAuthorization",
              "checkoutSigning",
              "confirmationEmail",
              "payment",
              "hotelConfirmation",
              "cancellation",
              "safeToConfirm",
              "fullLifecycleReady"
            ],
            "properties": {
              "environment": {
                "type": "string",
                "enum": [
                  "test",
                  "live"
                ]
              },
              "identityBridge": {
                "type": "object",
                "required": [
                  "ready"
                ],
                "properties": {
                  "ready": {
                    "type": "boolean",
                    "description": "Whether Brek can resolve retail search property identifiers into the isolated Agent Commerce identity space."
                  }
                },
                "additionalProperties": false
              },
              "retailSearchAuthorization": {
                "type": "object",
                "required": [
                  "ready"
                ],
                "properties": {
                  "ready": {
                    "type": "boolean",
                    "description": "Whether the server can make authorized Brek retail inventory calls for Agent Commerce search and room offers."
                  }
                },
                "additionalProperties": false
              },
              "checkoutSigning": {
                "type": "object",
                "required": [
                  "ready"
                ],
                "properties": {
                  "ready": {
                    "type": "boolean",
                    "description": "Whether checkout-session links and tokens can be signed securely for hosted and native checkout."
                  }
                },
                "additionalProperties": false
              },
              "confirmationEmail": {
                "type": "object",
                "required": [
                  "mode",
                  "ready"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "suppressed_in_test",
                      "sendgrid"
                    ]
                  },
                  "ready": {
                    "type": "boolean",
                    "description": "Whether confirmation delivery is ready for this environment. Test suppresses email by design; Live requires the configured sender and provider."
                  }
                },
                "additionalProperties": false
              },
              "payment": {
                "type": "object",
                "required": [
                  "mode",
                  "ready"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "stripe_test",
                      "stripe_live"
                    ]
                  },
                  "ready": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "hotelConfirmation": {
                "type": "object",
                "required": [
                  "mode",
                  "ready"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "simulated",
                      "supplier_live"
                    ]
                  },
                  "ready": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "cancellation": {
                "type": "object",
                "required": [
                  "mode",
                  "ready"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "simulated_supplier_with_stripe_test_refund",
                      "supplier_live_with_stripe_live_refund"
                    ]
                  },
                  "ready": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              "safeToConfirm": {
                "type": "boolean",
                "description": "Fail-closed summary: identity resolution, retail authorization, checkout signing, confirmation delivery, payment, and hotel confirmation are all ready."
              },
              "fullLifecycleReady": {
                "type": "boolean",
                "description": "safeToConfirm is true and cancellation is also ready for this environment."
              }
            },
            "additionalProperties": false
          },
          "searchModes": {
            "type": "object",
            "additionalProperties": true
          },
          "privateEconomics": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "visibility",
              "policyEnvelopeReturnedBy",
              "estimatedAmounts",
              "realizedAmounts",
              "displayToTraveler"
            ],
            "properties": {
              "visibility": {
                "type": "string",
                "const": "private_api_key"
              },
              "policyEnvelopeReturnedBy": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "string",
                    "const": "search"
                  },
                  {
                    "type": "string",
                    "const": "hotel_offers"
                  },
                  {
                    "type": "string",
                    "const": "quote"
                  }
                ],
                "items": false
              },
              "estimatedAmounts": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "available",
                  "reason"
                ],
                "properties": {
                  "available": {
                    "type": "boolean",
                    "const": false
                  },
                  "reason": {
                    "type": "string",
                    "const": "realized_profit_is_not_known_before_booking"
                  }
                }
              },
              "realizedAmounts": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "returnedBy",
                  "availableAfter"
                ],
                "properties": {
                  "returnedBy": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1,
                    "prefixItems": [
                      {
                        "type": "string",
                        "const": "booking.commission"
                      }
                    ],
                    "items": false
                  },
                  "availableAfter": {
                    "type": "string",
                    "const": "booking_profit_realized"
                  }
                }
              },
              "displayToTraveler": {
                "type": "boolean",
                "const": false
              }
            }
          },
          "agreement": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "version",
              "contentSha256",
              "status",
              "current",
              "plan",
              "profitShareRate",
              "basis",
              "publicRedirectsEligible"
            ],
            "properties": {
              "version": {
                "type": "string"
              },
              "contentSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "acceptedVersion": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "acceptedContentSha256": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[a-f0-9]{64}$"
              },
              "acceptedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "acceptedBy": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "current": {
                "type": "boolean"
              },
              "plan": {
                "type": "string",
                "enum": [
                  "standard",
                  "enterprise"
                ],
                "description": "Standard is the self-serve plan. Enterprise appears only for a separately negotiated agreement; it is not a self-serve plan selection."
              },
              "profitShareRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "basis": {
                "type": "string",
                "const": "realized_brek_profit"
              },
              "publicRedirectsEligible": {
                "type": "boolean",
                "const": false
              }
            }
          },
          "rateLimit": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "scope",
              "limit",
              "windowMs",
              "flexibleItineraryBudget",
              "responseHeaders"
            ],
            "properties": {
              "scope": {
                "type": "string",
                "const": "application"
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "windowMs": {
                "type": "integer",
                "minimum": 1
              },
              "flexibleItineraryBudget": {
                "type": "object",
                "description": "Independent per-application aggregate work budget for cache-only flexible itineraries, calculated as deduplicated check-ins × unique nights. Standard is 600 searched itineraries per minute, separate from its 60 HTTP requests per minute. 14 × 1 costs 14 and 31 × 6 costs 186. A flexible request consumes both budgets; 429 includes Retry-After. It does not authorize live supplier fan-out.",
                "additionalProperties": false,
                "required": [
                  "scope",
                  "limit",
                  "windowMs",
                  "unit"
                ],
                "properties": {
                  "scope": {
                    "type": "string",
                    "const": "application_flexible_itineraries"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "windowMs": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "unit": {
                    "type": "string",
                    "const": "searched_itinerary"
                  }
                }
              },
              "responseHeaders": {
                "type": "array",
                "description": "Rate-limit response headers emitted by the Agent API. Retry-After is present on 429 responses.",
                "minItems": 5,
                "maxItems": 5,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "enum": [
                    "X-RateLimit-Limit",
                    "X-RateLimit-Remaining",
                    "X-RateLimit-Reset",
                    "X-RateLimit-Scope",
                    "Retry-After"
                  ]
                }
              }
            }
          },
          "resourceLimits": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "applications",
              "activeApiKeysPerApplication"
            ],
            "properties": {
              "applications": {
                "type": "integer",
                "minimum": 1
              },
              "activeApiKeysPerApplication": {
                "type": "integer",
                "minimum": 1
              }
            }
          },
          "application": {
            "type": "object",
            "required": [
              "environment"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "environment": {
                "type": "string",
                "enum": [
                  "test",
                  "live"
                ]
              },
              "effectiveScopes": {
                "type": "array",
                "minItems": 4,
                "maxItems": 4,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "enum": [
                    "shopping:read",
                    "checkout:write",
                    "booking:read",
                    "cancellation:write"
                  ]
                }
              },
              "unavailable": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      }
    },
    "examples": {
      "SearchRequest": {
        "summary": "The source dates are non-executable placeholders; the served document replaces them with dates relative to request time.",
        "value": {
          "geo": {
            "lat": 47.6062,
            "lng": -122.3321,
            "radiusKm": 12
          },
          "checkIn": "2026-11-29",
          "checkOut": "2026-12-01",
          "occupancies": [
            {
              "paxes": [
                {
                  "age": 34
                }
              ]
            }
          ],
          "currency": "USD"
        }
      },
      "PublicRedirectRequest": {
        "summary": "The source dates are non-executable placeholders; the served document replaces them with dates relative to request time.",
        "value": {
          "provider": "expedia",
          "checkIn": "2026-11-29",
          "checkOut": "2026-12-01",
          "occupancies": [
            {
              "paxes": [
                {
                  "age": 34
                }
              ]
            }
          ],
          "currency": "USD"
        }
      },
      "FlexibleSearchRequest": {
        "value": {
          "geo": {
            "lat": 47.6062,
            "lng": -122.3321,
            "boundingBox": {
              "northeast": {
                "lat": 47.75,
                "lng": -122.2
              },
              "southwest": {
                "lat": 47.45,
                "lng": -122.45
              }
            }
          },
          "checkinOptions": [
            "next-14-days"
          ],
          "nights": [
            2
          ],
          "occupancies": [
            {
              "paxes": [
                {
                  "age": 34
                }
              ]
            }
          ],
          "currency": "USD"
        }
      },
      "HotelOffersRequest": {
        "summary": "The source dates are non-executable placeholders; the served document replaces them with dates relative to request time.",
        "value": {
          "checkIn": "2026-11-29",
          "checkOut": "2026-12-01",
          "occupancies": [
            {
              "paxes": [
                {
                  "age": 34
                }
              ]
            }
          ],
          "currency": "USD"
        }
      },
      "QuoteRequest": {
        "summary": "The source dates are non-executable placeholders; the served document replaces them with dates relative to request time.",
        "value": {
          "quoteCriteria": {
            "optionId": "option_456",
            "accommodation": {
              "type": "Hotel",
              "code": "hotel_123"
            },
            "occupancies": [
              {
                "paxes": [
                  {
                    "age": 34
                  }
                ]
              }
            ],
            "checkIn": "2026-11-29",
            "checkOut": "2026-12-01",
            "currency": "USD"
          }
        }
      },
      "CreateCheckoutSessionRequest": {
        "value": {
          "quoteId": "quote_123",
          "mode": "hosted",
          "holder": {
            "name": "Ada",
            "surName": "Lovelace"
          },
          "occupancies": [
            {
              "paxes": [
                {
                  "age": 34,
                  "name": "Ada",
                  "surName": "Lovelace"
                }
              ]
            }
          ],
          "customer": {
            "email": "ada@example.com"
          },
          "loyaltyMembership": {
            "program": "Marriott Bonvoy",
            "number": "001234567"
          },
          "partnerReference": "trip_456",
          "returnUrl": "https://agent.example.com/trips/456"
        }
      },
      "CancelBookingRequest": {
        "summary": "The source approval timestamp is a non-executable placeholder. Generate approvedAt at the actual human approval instant; never reuse a documentation timestamp.",
        "value": {
          "reason": "Traveler changed plans",
          "approvalToken": "<token from the immediately preceding Live cancellation preview>",
          "approval": {
            "actorType": "human",
            "approvedAt": "2026-11-15T09:47:50.937Z",
            "source": "agent_ui",
            "approvalRef": "cancel-trip-456-001",
            "previewFingerprint": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
          }
        }
      },
      "PublicRedirectResponse": {
        "value": {
          "object": "agent_commerce.public_redirect",
          "propertyId": "hotel_123",
          "provider": "Expedia.com",
          "nextAction": {
            "type": "redirect",
            "url": "https://www.expedia.com/hotel/example",
            "termsOwner": "Expedia.com"
          },
          "revShare": {
            "eligible": false,
            "basis": "none",
            "reason": "external_provider_checkout"
          }
        }
      },
      "SearchResponse": {
        "value": {
          "object": "agent_commerce.search",
          "inventoryProfile": "brek_retail",
          "inventorySource": "brek_retail_exact_search",
          "repriceAt": "hotel_offers",
          "hotels": [
            {
              "propertyId": "hotel_123",
              "hotel": {
                "hotelCode": "hotel_123",
                "hotelName": "Example Hotel"
              },
              "brekRate": {
                "offerType": "brek_rate",
                "price": {
                  "nightly": {
                    "amount": 143.21,
                    "currency": "USD"
                  },
                  "taxesAndFees": {
                    "amount": 31.42,
                    "currency": "USD"
                  },
                  "taxesAndFeesBreakdown": [
                    {
                      "description": "Taxes and mandatory online fees",
                      "amount": {
                        "amount": 31.42,
                        "currency": "USD"
                      }
                    }
                  ],
                  "payNow": {
                    "amount": 286.42,
                    "currency": "USD"
                  },
                  "payAtProperty": {
                    "amount": 0,
                    "currency": "USD"
                  },
                  "payAtPropertyBreakdown": [],
                  "travelerTotal": {
                    "amount": 286.42,
                    "currency": "USD"
                  },
                  "sourceCompleteness": {
                    "nightly": true,
                    "taxesAndFees": true,
                    "taxesAndFeesBreakdown": true,
                    "payAtPropertyBreakdown": true
                  }
                },
                "payNow": {
                  "amount": 286.42,
                  "currency": "USD"
                },
                "travelerTotal": {
                  "amount": 286.42,
                  "currency": "USD"
                },
                "partnerEconomics": {
                  "visibility": "private_api_key",
                  "displayToTraveler": false,
                  "stage": "search",
                  "estimateAvailable": false
                },
                "travelerDisplay": {
                  "travelerFieldsSafeToDisplay": true,
                  "excludesPartnerEconomics": true,
                  "privateFieldsExcluded": [
                    "partnerEconomics",
                    "revShare",
                    "supplierInfo",
                    "rawRate",
                    "wholesaleCost"
                  ]
                },
                "nextAction": {
                  "type": "get_hotel_offers",
                  "propertyId": "hotel_123"
                },
                "revShare": {
                  "eligible": true,
                  "basis": "realized_brek_profit",
                  "reason": "partner_agreement",
                  "shareRate": 0.1
                }
              },
              "publicRates": [
                {
                  "offerType": "public_rate",
                  "provider": "Expedia.com",
                  "nightly": {
                    "amount": 155.09,
                    "currency": "USD"
                  },
                  "total": {
                    "amount": 310.18,
                    "currency": "USD"
                  },
                  "priceBasis": {
                    "source": "provider_reported",
                    "taxAndFeeInclusion": "unverified"
                  },
                  "nextAction": {
                    "type": "resolve_public_redirect",
                    "method": "POST",
                    "endpoint": "/api/v1/agent-commerce/hotels/{propertyId}/public-redirect",
                    "body": {
                      "provider": "expedia",
                      "checkIn": "2026-11-26",
                      "checkOut": "2026-11-28",
                      "occupancies": [
                        {
                          "paxes": [
                            {
                              "age": 34
                            }
                          ]
                        }
                      ],
                      "currency": "USD"
                    },
                    "termsOwner": "Expedia.com"
                  },
                  "revShare": {
                    "eligible": false,
                    "basis": "none",
                    "reason": "external_provider_checkout"
                  }
                }
              ],
              "comparison": {
                "confidence": "indicative",
                "safeToClaimSavings": false,
                "comparisonSource": "public_provider",
                "publicProvider": "Expedia.com",
                "brekTravelerTotal": {
                  "amount": 286.42,
                  "currency": "USD"
                },
                "publicTotal": {
                  "amount": 310.18,
                  "currency": "USD"
                },
                "disclosure": "Indicative comparison using provider-reported totals for the same dates and occupancy. Public tax and fee inclusion is unverified; do not claim savings. Prices and terms must be rechecked before booking."
              }
            }
          ],
          "pagination": {
            "page": 1,
            "pageSize": 20,
            "total": 1,
            "totalPages": 1
          },
          "omissions": {
            "scope": "current_page",
            "total": 0,
            "reasons": []
          },
          "identityResolution": {
            "scope": "current_page",
            "resolved": 1,
            "ambiguous": 0,
            "notFound": 0,
            "targetNonUnique": 0,
            "notEvaluated": 0
          }
        }
      },
      "FlexibleSearchResponse": {
        "value": {
          "object": "agent_commerce.flexible_search",
          "inventoryProfile": "brek_retail",
          "inventorySource": "brek_cache_only",
          "searchedItineraries": 14,
          "hotels": [
            {
              "propertyId": "hotel_123",
              "hotel": {
                "hotelName": "Example Hotel",
                "starRating": 4,
                "location": {
                  "lat": 47.6062,
                  "lng": -122.3321,
                  "city": "Seattle",
                  "stateCode": "WA"
                },
                "images": [
                  "https://images.example.com/hotel.jpg"
                ]
              },
              "stay": {
                "checkIn": "2026-11-26",
                "checkOut": "2026-11-28",
                "nights": 2
              },
              "brekRate": {
                "offerType": "brek_rate",
                "nightly": {
                  "amount": 143.21,
                  "currency": "USD"
                },
                "price": {
                  "nightly": {
                    "amount": 143.21,
                    "currency": "USD"
                  },
                  "taxesAndFees": {
                    "amount": 31.42,
                    "currency": "USD"
                  },
                  "taxesAndFeesBreakdown": [
                    {
                      "description": "Taxes and mandatory online fees",
                      "amount": {
                        "amount": 31.42,
                        "currency": "USD"
                      }
                    }
                  ],
                  "payNow": {
                    "amount": 281.42,
                    "currency": "USD"
                  },
                  "payAtProperty": {
                    "amount": 5,
                    "currency": "USD"
                  },
                  "payAtPropertyBreakdown": [
                    {
                      "description": "Mandatory property fee",
                      "amount": {
                        "amount": 5,
                        "currency": "USD"
                      }
                    }
                  ],
                  "travelerTotal": {
                    "amount": 286.42,
                    "currency": "USD"
                  },
                  "sourceCompleteness": {
                    "nightly": true,
                    "taxesAndFees": true,
                    "taxesAndFeesBreakdown": true,
                    "payAtPropertyBreakdown": true
                  }
                },
                "payNow": {
                  "amount": 281.42,
                  "currency": "USD"
                },
                "payAtProperty": {
                  "amount": 5,
                  "currency": "USD"
                },
                "travelerTotal": {
                  "amount": 286.42,
                  "currency": "USD"
                },
                "partnerEconomics": {
                  "visibility": "private_api_key",
                  "displayToTraveler": false,
                  "stage": "search",
                  "estimateAvailable": false
                },
                "travelerDisplay": {
                  "travelerFieldsSafeToDisplay": true,
                  "excludesPartnerEconomics": true,
                  "privateFieldsExcluded": [
                    "partnerEconomics",
                    "revShare",
                    "supplierInfo",
                    "rawRate",
                    "wholesaleCost"
                  ]
                },
                "nextAction": {
                  "type": "get_hotel_offers",
                  "propertyId": "hotel_123"
                },
                "revShare": {
                  "eligible": true,
                  "basis": "realized_brek_profit",
                  "reason": "partner_agreement",
                  "shareRate": 0.1
                }
              },
              "publicRates": [],
              "comparison": {
                "confidence": "unavailable",
                "safeToClaimSavings": false,
                "disclosure": "A like-for-like total is not available. Do not claim that either offer is cheaper."
              }
            },
            {
              "propertyId": "hotel_public_456",
              "hotel": {
                "hotelName": "Public-only Example"
              },
              "stay": {
                "checkIn": "2026-11-26",
                "checkOut": "2026-11-28",
                "nights": 2
              },
              "publicRates": [
                {
                  "offerType": "public_rate",
                  "provider": "Booking.com",
                  "total": {
                    "amount": 275,
                    "currency": "USD"
                  },
                  "priceBasis": {
                    "source": "provider_reported",
                    "taxAndFeeInclusion": "unverified"
                  },
                  "nextAction": {
                    "type": "redirect",
                    "url": "https://www.booking.com/hotel/public-only",
                    "termsOwner": "Booking.com"
                  },
                  "revShare": {
                    "eligible": false,
                    "basis": "none",
                    "reason": "external_provider_checkout"
                  }
                }
              ],
              "comparison": {
                "confidence": "unavailable",
                "safeToClaimSavings": false,
                "disclosure": "A like-for-like total is not available. Do not claim that either offer is cheaper."
              }
            }
          ],
          "pagination": {
            "page": 1,
            "pageSize": 3,
            "total": 3,
            "totalPages": 1
          },
          "omissions": {
            "scope": "current_page",
            "total": 1,
            "reasons": [
              {
                "code": "identity_ambiguous",
                "count": 1
              }
            ]
          },
          "identityResolution": {
            "scope": "current_page",
            "resolved": 1,
            "ambiguous": 1,
            "notFound": 1,
            "targetNonUnique": 0,
            "notEvaluated": 0
          }
        }
      },
      "HotelOffersResponse": {
        "value": {
          "object": "agent_commerce.hotel_offers",
          "inventoryProfile": "brek_retail",
          "propertyId": "hotel_123",
          "groups": [
            {
              "names": [
                "King Room"
              ],
              "images": [
                "https://images.example.com/king.jpg"
              ],
              "referencePricing": {
                "offerType": "public_rate",
                "provider": "Expedia.com",
                "type": "metasearch",
                "scope": "room_type",
                "device": "desktop",
                "matchType": "giata_rtm",
                "roomName": "King Room",
                "nightly": {
                  "amount": 159.75,
                  "currency": "USD"
                },
                "total": {
                  "amount": 319.5,
                  "currency": "USD"
                },
                "priceBasis": {
                  "source": "provider_reported",
                  "taxAndFeeInclusion": "unverified"
                },
                "nextAction": {
                  "type": "resolve_public_redirect",
                  "method": "POST",
                  "endpoint": "/api/v1/agent-commerce/hotels/{propertyId}/public-redirect",
                  "body": {
                    "provider": "expedia",
                    "checkIn": "2026-11-26",
                    "checkOut": "2026-11-28",
                    "occupancies": [
                      {
                        "paxes": [
                          {
                            "age": 34
                          }
                        ]
                      }
                    ],
                    "currency": "USD"
                  },
                  "termsOwner": "Expedia.com"
                },
                "revShare": {
                  "eligible": false,
                  "basis": "none",
                  "reason": "external_provider_checkout"
                }
              },
              "offers": [
                {
                  "id": "option_456",
                  "typeCode": "KING",
                  "descriptions": [
                    "King Room"
                  ],
                  "skuDisplayTitleString": "King Room",
                  "rooms": [
                    {
                      "occupancyRefId": 1,
                      "code": "KING",
                      "description": "King Room",
                      "displayName": "King Room"
                    }
                  ],
                  "offerType": "brek_rate",
                  "price": {
                    "nightly": {
                      "amount": 151.09,
                      "currency": "USD"
                    },
                    "taxesAndFees": {
                      "amount": 27.18,
                      "currency": "USD"
                    },
                    "taxesAndFeesBreakdown": [
                      {
                        "description": "Taxes and mandatory online fees",
                        "amount": {
                          "amount": 27.18,
                          "currency": "USD"
                        }
                      }
                    ],
                    "payNow": {
                      "amount": 297.18,
                      "currency": "USD"
                    },
                    "payAtProperty": {
                      "amount": 5,
                      "currency": "USD"
                    },
                    "payAtPropertyBreakdown": [
                      {
                        "description": "Mandatory property fee",
                        "amount": {
                          "amount": 5,
                          "currency": "USD"
                        }
                      }
                    ],
                    "travelerTotal": {
                      "amount": 302.18,
                      "currency": "USD"
                    },
                    "sourceCompleteness": {
                      "nightly": true,
                      "taxesAndFees": true,
                      "taxesAndFeesBreakdown": true,
                      "payAtPropertyBreakdown": true
                    }
                  },
                  "payNow": {
                    "amount": 297.18,
                    "currency": "USD"
                  },
                  "payAtProperty": {
                    "amount": 5,
                    "currency": "USD"
                  },
                  "travelerTotal": {
                    "amount": 302.18,
                    "currency": "USD"
                  },
                  "cancellationPolicy": {
                    "refundable": true,
                    "currency": "USD",
                    "deadlineTimezone": "UTC",
                    "cancelPenalties": [],
                    "summary": "Refundable with no monetary cancellation penalty currently listed."
                  },
                  "partnerEconomics": {
                    "visibility": "private_api_key",
                    "displayToTraveler": false,
                    "stage": "offers",
                    "estimateAvailable": false
                  },
                  "travelerDisplay": {
                    "travelerFieldsSafeToDisplay": true,
                    "excludesPartnerEconomics": true,
                    "privateFieldsExcluded": [
                      "partnerEconomics",
                      "revShare",
                      "supplierInfo",
                      "rawRate",
                      "wholesaleCost"
                    ]
                  },
                  "nextAction": {
                    "type": "quote",
                    "optionId": "option_456",
                    "propertyId": "hotel_123"
                  },
                  "revShare": {
                    "eligible": true,
                    "basis": "realized_brek_profit",
                    "reason": "partner_agreement",
                    "shareRate": 0.1
                  }
                }
              ]
            }
          ]
        }
      },
      "QuoteResponse": {
        "value": {
          "object": "agent_commerce.quote",
          "offerType": "brek_rate",
          "expiresAt": "2026-11-15T10:07:50.937Z",
          "price": {
            "nightly": {
              "amount": 143.21,
              "currency": "USD"
            },
            "taxesAndFees": {
              "amount": 26.42,
              "currency": "USD"
            },
            "taxesAndFeesBreakdown": [
              {
                "description": "Taxes and mandatory online fees",
                "amount": {
                  "amount": 26.42,
                  "currency": "USD"
                }
              }
            ],
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "payAtPropertyBreakdown": [
              {
                "description": "Mandatory property fee",
                "amount": {
                  "amount": 5,
                  "currency": "USD"
                }
              }
            ],
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            },
            "sourceCompleteness": {
              "nightly": true,
              "taxesAndFees": true,
              "taxesAndFeesBreakdown": true,
              "payAtPropertyBreakdown": true
            }
          },
          "quote": {
            "id": "quote_123",
            "accommodation": {
              "accommodationCode": "hotel_123",
              "accommodationName": "Example Hotel",
              "accommodationType": "hotel"
            },
            "occupancies": [
              {
                "paxes": [
                  {
                    "age": 34
                  }
                ]
              }
            ],
            "checkIn": "2026-11-26",
            "checkOut": "2026-11-28",
            "roomCodes": [
              "KING"
            ],
            "roomNames": [
              "King Room"
            ],
            "isRefundable": true,
            "rooms": [
              {
                "occupancyRefId": 1,
                "code": "KING",
                "description": "King Room",
                "displayName": "King Room"
              }
            ]
          },
          "cancellationPolicy": {
            "refundable": true,
            "currency": "USD",
            "deadlineTimezone": "UTC",
            "cancelPenalties": [],
            "summary": "Refundable with no monetary cancellation penalty currently listed."
          },
          "partnerEconomics": {
            "visibility": "private_api_key",
            "displayToTraveler": false,
            "stage": "quote",
            "estimateAvailable": false
          },
          "travelerDisplay": {
            "travelerFieldsSafeToDisplay": true,
            "excludesPartnerEconomics": true,
            "privateFieldsExcluded": [
              "partnerEconomics",
              "revShare",
              "supplierInfo",
              "rawRate",
              "wholesaleCost"
            ]
          },
          "revShare": {
            "eligible": true,
            "basis": "realized_brek_profit",
            "reason": "partner_agreement",
            "shareRate": 0.1
          },
          "nextAction": {
            "type": "create_checkout_session",
            "availableModes": [
              "hosted",
              "native"
            ]
          }
        }
      },
      "HostedCheckoutSession": {
        "value": {
          "loyaltyMembership": {
            "program": "Marriott Bonvoy",
            "number": "001234567"
          },
          "object": "agent_commerce.checkout_session",
          "id": "acs_123",
          "mode": "hosted",
          "environment": "test",
          "status": "awaiting_payment",
          "expiresAt": "2026-11-15T10:17:50.937Z",
          "price": {
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "payment": {
            "provider": "stripe",
            "status": "requires_payment_method",
            "livemode": false,
            "publishableKey": "pk_test_...",
            "authorizationOwner": "calling_agent_or_traveler"
          },
          "action": {
            "type": "open_hosted_checkout",
            "url": "https://www.brek.com/checkout/agent/acs_123?token=example-signed-token"
          }
        }
      },
      "NativeCheckoutSession": {
        "value": {
          "object": "agent_commerce.checkout_session",
          "id": "acs_123",
          "mode": "native",
          "environment": "test",
          "status": "awaiting_payment",
          "expiresAt": "2026-11-15T10:17:50.937Z",
          "price": {
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "payment": {
            "provider": "stripe",
            "status": "requires_payment_method",
            "livemode": false,
            "publishableKey": "pk_test_...",
            "authorizationOwner": "calling_agent_or_traveler",
            "clientSecret": "<sensitive Stripe client secret>"
          },
          "action": {
            "type": "confirm_payment_natively_then_confirm_booking"
          }
        }
      },
      "AuthorizedCheckoutSession": {
        "value": {
          "object": "agent_commerce.checkout_session",
          "id": "acs_123",
          "mode": "native",
          "environment": "test",
          "status": "payment_authorized",
          "expiresAt": "2026-11-15T10:17:50.937Z",
          "price": {
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "payment": {
            "provider": "stripe",
            "status": "authorized",
            "livemode": false,
            "publishableKey": "pk_test_...",
            "authorizationOwner": "calling_agent_or_traveler",
            "clientSecret": "<sensitive Stripe client secret>"
          },
          "action": {
            "type": "review_approval_receipt_then_confirm_booking",
            "requiresHumanApproval": true,
            "requiresApprovalAttestation": true,
            "requiresIdempotencyKey": true
          }
        }
      },
      "AbandonedTestCheckoutSession": {
        "summary": "Terminal Test checkout after its Stripe Test authorization was safely released; no booking was created.",
        "value": {
          "object": "agent_commerce.checkout_session",
          "id": "acs_test_abandoned_123",
          "mode": "native",
          "environment": "test",
          "status": "expired",
          "expiresAt": "2026-11-15T10:17:50.937Z",
          "expiration": {
            "reason": "test_checkout_abandoned",
            "phase": "voided",
            "updatedAt": "2026-11-15T09:52:50.937Z"
          },
          "price": {
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_test_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_test_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "payment": {
            "provider": "stripe",
            "status": "voided",
            "livemode": false,
            "publishableKey": "pk_test_...",
            "authorizationOwner": "calling_agent_or_traveler",
            "hold": {
              "state": "voided",
              "captureBoundary": "after_supplier_confirmation",
              "releasedOnQuoteExpiry": true,
              "releasedOnPreBookingFailure": true
            }
          },
          "action": {
            "type": "stop",
            "reason": "expired",
            "message": "This checkout is terminal. Do not confirm it or create an automatic replacement."
          }
        }
      },
      "ExpiryRequiresAttentionCheckoutSession": {
        "summary": "Payment-hold release outcome is not yet known. Do not Confirm and do not create another checkout from this Quote.",
        "value": {
          "object": "agent_commerce.checkout_session",
          "id": "acs_123",
          "mode": "native",
          "environment": "test",
          "status": "expiry_requires_attention",
          "expiresAt": "2026-11-15T10:17:50.937Z",
          "expiration": {
            "reason": "checkout_expired",
            "phase": "void_outcome_unknown",
            "updatedAt": "2026-11-15T10:18:50.937Z",
            "nextAction": {
              "type": "contact_support",
              "message": "Payment-hold release is not confirmed. Do not confirm this checkout or create another checkout from this Quote; retrieve it again or contact Brek support."
            }
          },
          "price": {
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "payment": {
            "provider": "stripe",
            "status": "authorized",
            "livemode": false,
            "publishableKey": "pk_test_...",
            "authorizationOwner": "calling_agent_or_traveler",
            "hold": {
              "state": "authorized_hold",
              "captureBoundary": "after_supplier_confirmation",
              "releasedOnQuoteExpiry": true,
              "releasedOnPreBookingFailure": true
            }
          },
          "action": {
            "type": "contact_support",
            "message": "Payment-hold release is not confirmed. Do not confirm this checkout or create another checkout from this Quote; retrieve it again or contact Brek support."
          }
        }
      },
      "ConfirmationPollingCheckoutSession": {
        "value": {
          "object": "agent_commerce.checkout_session",
          "id": "acs_123",
          "mode": "native",
          "environment": "live",
          "status": "booking",
          "expiresAt": "2026-11-15T10:17:50.937Z",
          "confirmation": {
            "phase": "supplier_started",
            "supplierStatus": "started",
            "paymentStatus": "authorized",
            "updatedAt": "2026-11-15T09:48:50.937Z",
            "nextAction": {
              "type": "poll_checkout",
              "message": "Confirmation is in progress. Retrieve this checkout before attempting another write."
            }
          },
          "price": {
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "payment": {
            "provider": "stripe",
            "status": "authorized",
            "livemode": true,
            "publishableKey": "pk_live_...",
            "authorizationOwner": "calling_agent_or_traveler",
            "clientSecret": "<sensitive Stripe client secret>"
          },
          "action": {
            "type": "poll_checkout",
            "message": "Confirmation is in progress. Retrieve this checkout before attempting another write."
          }
        }
      },
      "ConfirmationOutcomeUnknownCheckoutSession": {
        "value": {
          "object": "agent_commerce.checkout_session",
          "id": "acs_123",
          "mode": "native",
          "environment": "live",
          "status": "booking",
          "expiresAt": "2026-11-15T10:17:50.937Z",
          "confirmation": {
            "phase": "supplier_outcome_unknown",
            "supplierStatus": "unknown",
            "paymentStatus": "authorized",
            "updatedAt": "2026-11-15T09:48:50.937Z",
            "nextAction": {
              "type": "contact_support",
              "message": "Do not submit another booking. Retrieve this checkout while Brek reconciles the supplier outcome."
            }
          },
          "price": {
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "payment": {
            "provider": "stripe",
            "status": "authorized",
            "livemode": true,
            "publishableKey": "pk_live_...",
            "authorizationOwner": "calling_agent_or_traveler",
            "clientSecret": "<sensitive Stripe client secret>"
          },
          "action": {
            "type": "contact_support",
            "message": "Do not submit another booking. Retrieve this checkout while Brek reconciles the supplier outcome."
          }
        }
      },
      "ConfirmedCheckoutSession": {
        "value": {
          "object": "agent_commerce.checkout_session",
          "id": "acs_123",
          "mode": "native",
          "environment": "live",
          "status": "confirmed",
          "expiresAt": "2026-11-15T10:17:50.937Z",
          "bookingReference": "BREK-123",
          "confirmation": {
            "phase": "confirmed",
            "supplierStatus": "succeeded",
            "paymentStatus": "captured",
            "updatedAt": "2026-11-15T09:49:50.937Z"
          },
          "price": {
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "payment": {
            "provider": "stripe",
            "status": "captured",
            "livemode": true,
            "publishableKey": "pk_live_...",
            "authorizationOwner": "calling_agent_or_traveler",
            "clientSecret": "<sensitive Stripe client secret>"
          },
          "action": {
            "type": "get_booking",
            "bookingReference": "BREK-123"
          }
        }
      },
      "ConfirmedBooking": {
        "summary": "Illustrative persisted booking; approval timestamps in source are non-executable placeholders.",
        "value": {
          "object": "agent_commerce.booking",
          "bookingReference": "BREK-123",
          "hotelConfirmationNumber": "HOTEL-456",
          "status": "confirmed",
          "environment": "live",
          "isSimulation": false,
          "price": {
            "amount": 281.42,
            "currency": "USD",
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "accommodation": {
            "accommodationName": "Example Hotel"
          },
          "stay": {
            "checkIn": "2026-11-26",
            "checkOut": "2026-11-28",
            "rooms": [
              {
                "occupancyRefId": 1,
                "code": "KING",
                "description": "King Room",
                "displayName": "King Room"
              }
            ],
            "roomNames": [
              "King Room"
            ],
            "cancelPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            }
          },
          "guests": {
            "holder": {
              "name": "Ada",
              "surName": "Lovelace",
              "ageCategory": "adult"
            },
            "occupancies": []
          },
          "propertyDetails": {
            "available": false,
            "address": null,
            "checkInInstructions": null,
            "notices": null,
            "deposit": null
          },
          "customer": {
            "email": "ada@example.com"
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "approvalAttestation": {
            "object": "agent_commerce.approval_attestation",
            "version": 1,
            "checkoutSessionId": "acs_123",
            "quoteId": "quote_123",
            "receiptFingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "actorType": "human",
            "approvedAt": "2026-11-15T09:47:50.937Z",
            "source": "agent_ui",
            "approvalRef": "trip-123-confirm-1",
            "recordedAt": "2026-11-15T09:48:51.937Z",
            "containsPii": false
          },
          "confirmation": {
            "email": "ada@example.com",
            "deliveryStatus": "sent"
          }
        }
      },
      "TestConfirmedBooking": {
        "summary": "Verified Test Confirm response shape: simulated supplier fulfillment, suppressed email, and non-payable pending commission.",
        "value": {
          "object": "agent_commerce.booking",
          "bookingReference": "BREK-TEST-123",
          "hotelConfirmationNumber": "DEV-TEST-456",
          "status": "confirmed",
          "environment": "test",
          "isSimulation": true,
          "price": {
            "amount": 281.42,
            "currency": "USD",
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "accommodation": {
            "accommodationName": "Example Hotel"
          },
          "stay": {
            "checkIn": "2026-11-26",
            "checkOut": "2026-11-28",
            "rooms": [
              {
                "occupancyRefId": 1,
                "code": "KING",
                "description": "King Room",
                "displayName": "King Room"
              }
            ],
            "roomNames": [
              "King Room"
            ],
            "cancelPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            }
          },
          "guests": {
            "holder": {
              "name": "Ada",
              "surName": "Lovelace",
              "ageCategory": "adult"
            },
            "occupancies": []
          },
          "propertyDetails": {
            "available": false,
            "address": null,
            "checkInInstructions": null,
            "notices": null,
            "deposit": null
          },
          "customer": {
            "email": "ada@example.com"
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_test_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_test_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "approvalAttestation": {
            "object": "agent_commerce.approval_attestation",
            "version": 1,
            "checkoutSessionId": "acs_test_123",
            "quoteId": "quote_test_123",
            "receiptFingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "actorType": "human",
            "approvedAt": "2026-11-15T09:47:50.937Z",
            "source": "developer_console",
            "approvalRef": "test-confirm-123",
            "recordedAt": "2026-11-15T09:48:51.937Z",
            "containsPii": false
          },
          "confirmation": {
            "email": "ada@example.com",
            "deliveryStatus": "suppressed_in_test"
          },
          "commission": {
            "ledgerId": "acl_test_pending",
            "status": "pending",
            "environment": "test",
            "isSimulation": true,
            "basis": "realized_brek_profit",
            "realizedProfit": 20,
            "shareRate": 0.1,
            "commissionAmount": 2,
            "currency": "USD",
            "checkOut": "2026-11-28",
            "holdDays": 21,
            "eligibleAt": "2026-12-19T21:47:50.937Z",
            "pendingReason": "test_simulation_only",
            "profitSource": "test_simulation"
          }
        }
      },
      "CancelledBooking": {
        "summary": "Illustrative persisted booking; approval timestamps in source are non-executable placeholders.",
        "value": {
          "object": "agent_commerce.booking",
          "bookingReference": "BREK-123",
          "status": "cancelled",
          "environment": "live",
          "isSimulation": false,
          "price": {
            "amount": 281.42,
            "currency": "USD",
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "accommodation": {
            "accommodationName": "Example Hotel"
          },
          "stay": {
            "checkIn": "2026-11-26",
            "checkOut": "2026-11-28",
            "rooms": [
              {
                "occupancyRefId": 1,
                "code": "KING",
                "description": "King Room",
                "displayName": "King Room"
              }
            ],
            "roomNames": [
              "King Room"
            ],
            "cancelPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            }
          },
          "guests": {
            "holder": {
              "name": "Ada",
              "surName": "Lovelace",
              "ageCategory": "adult"
            },
            "occupancies": []
          },
          "propertyDetails": {
            "available": false,
            "address": null,
            "checkInInstructions": null,
            "notices": null,
            "deposit": null
          },
          "customer": {
            "email": "ada@example.com"
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "approvalAttestation": {
            "object": "agent_commerce.approval_attestation",
            "version": 1,
            "checkoutSessionId": "acs_123",
            "quoteId": "quote_123",
            "receiptFingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "actorType": "human",
            "approvedAt": "2026-11-15T09:47:50.937Z",
            "source": "agent_ui",
            "approvalRef": "trip-123-confirm-1",
            "recordedAt": "2026-11-15T09:48:51.937Z",
            "containsPii": false
          },
          "confirmation": {
            "email": "ada@example.com",
            "deliveryStatus": "sent"
          },
          "cancellation": {
            "status": "cancelled",
            "outcome": "succeeded",
            "phase": "reconciled",
            "reason": "Traveler changed plans",
            "startedAt": "2026-11-16T09:47:50.937Z",
            "updatedAt": "2026-11-16T09:47:52.937Z",
            "completedAt": "2026-11-16T09:47:51.937Z",
            "retryable": false,
            "approvalAttestation": {
              "object": "agent_commerce.cancellation_approval_attestation",
              "version": 1,
              "bookingReference": "BREK-123",
              "previewFingerprint": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
              "approvalTokenFingerprint": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
              "actorType": "human",
              "approvedAt": "2026-11-15T09:47:50.937Z",
              "source": "agent_ui",
              "approvalRef": "cancel-trip-456-001",
              "recordedAt": "2026-11-16T09:47:50.937Z",
              "containsPii": false
            },
            "approvedPreview": {
              "cancellable": true,
              "reason": "cancellable",
              "totalCharge": 281.42,
              "refundableAmount": 250,
              "currency": "USD",
              "policyFingerprint": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
              "calculatedAt": "2026-11-16T09:47:40.937Z",
              "isSimulation": false
            },
            "supplier": {
              "status": "succeeded"
            },
            "refundableAmount": 250,
            "refund": {
              "status": "succeeded",
              "amount": {
                "amount": 250,
                "currency": "USD"
              },
              "estimatedArrival": null
            },
            "isSimulation": false
          },
          "cancelledAt": "2026-11-16T09:47:51.937Z"
        }
      },
      "TestCancelledBooking": {
        "summary": "Verified Test Cancel response shape: simulated supplier result, Stripe Test refund, and reversed simulated commission.",
        "value": {
          "object": "agent_commerce.booking",
          "bookingReference": "BREK-TEST-123",
          "hotelConfirmationNumber": "DEV-TEST-456",
          "status": "cancelled",
          "environment": "test",
          "isSimulation": true,
          "price": {
            "amount": 281.42,
            "currency": "USD",
            "payNow": {
              "amount": 281.42,
              "currency": "USD"
            },
            "payAtProperty": {
              "amount": 5,
              "currency": "USD"
            },
            "travelerTotal": {
              "amount": 286.42,
              "currency": "USD"
            }
          },
          "accommodation": {
            "accommodationName": "Example Hotel"
          },
          "stay": {
            "checkIn": "2026-11-26",
            "checkOut": "2026-11-28",
            "rooms": [
              {
                "occupancyRefId": 1,
                "code": "KING",
                "description": "King Room",
                "displayName": "King Room"
              }
            ],
            "roomNames": [
              "King Room"
            ],
            "cancelPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            }
          },
          "guests": {
            "holder": {
              "name": "Ada",
              "surName": "Lovelace",
              "ageCategory": "adult"
            },
            "occupancies": []
          },
          "propertyDetails": {
            "available": false,
            "address": null,
            "checkInInstructions": null,
            "notices": null,
            "deposit": null
          },
          "customer": {
            "email": "ada@example.com"
          },
          "approvalReceipt": {
            "object": "agent_commerce.approval_receipt",
            "version": 1,
            "quoteId": "quote_test_123",
            "issuedAt": "2026-11-15T09:47:50.937Z",
            "validUntil": "2026-11-15T10:07:50.937Z",
            "hotel": {
              "propertyId": "hotel_123",
              "name": "Example Hotel",
              "type": "Hotel"
            },
            "stay": {
              "checkIn": "2026-11-26",
              "checkOut": "2026-11-28",
              "roomCodes": [
                "KING"
              ],
              "roomNames": [
                "King Room"
              ]
            },
            "price": {
              "payNow": {
                "amount": 281.42,
                "currency": "USD"
              },
              "payAtProperty": {
                "amount": 5,
                "currency": "USD"
              },
              "travelerTotal": {
                "amount": 286.42,
                "currency": "USD"
              }
            },
            "cancellationPolicy": {
              "refundable": true,
              "currency": "USD",
              "deadlineTimezone": "UTC",
              "cancelPenalties": [],
              "summary": "Refundable with no monetary cancellation penalty currently listed."
            },
            "travelerSafe": true,
            "partnerEconomicsIncluded": false,
            "sourceQuoteFingerprint": "quote_snapshot_test_123",
            "fingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
          },
          "approvalAttestation": {
            "object": "agent_commerce.approval_attestation",
            "version": 1,
            "checkoutSessionId": "acs_test_123",
            "quoteId": "quote_test_123",
            "receiptFingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "actorType": "human",
            "approvedAt": "2026-11-15T09:47:50.937Z",
            "source": "developer_console",
            "approvalRef": "test-confirm-123",
            "recordedAt": "2026-11-15T09:48:51.937Z",
            "containsPii": false
          },
          "confirmation": {
            "email": "ada@example.com",
            "deliveryStatus": "suppressed_in_test"
          },
          "cancellation": {
            "status": "cancelled",
            "outcome": "succeeded",
            "phase": "reconciled",
            "reason": "Simulated Test lifecycle audit",
            "startedAt": "2026-11-16T09:47:50.937Z",
            "updatedAt": "2026-11-16T09:47:52.937Z",
            "completedAt": "2026-11-16T09:47:51.937Z",
            "retryable": false,
            "approvalAttestation": null,
            "approvedPreview": {
              "cancellable": true,
              "reason": "cancellable",
              "totalCharge": 281.42,
              "refundableAmount": 281.42,
              "currency": "USD",
              "policyFingerprint": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
              "calculatedAt": "2026-11-16T09:47:49.937Z",
              "isSimulation": true
            },
            "supplier": {
              "status": "succeeded"
            },
            "refundableAmount": 281.42,
            "refund": {
              "status": "succeeded",
              "amount": {
                "amount": 281.42,
                "currency": "USD"
              },
              "estimatedArrival": null
            },
            "isSimulation": true
          },
          "cancelledAt": "2026-11-16T09:47:51.937Z",
          "commission": {
            "ledgerId": "acl_test_reversed",
            "status": "reversed",
            "environment": "test",
            "isSimulation": true,
            "basis": "realized_brek_profit",
            "realizedProfit": 20,
            "shareRate": 0.1,
            "commissionAmount": 2,
            "currency": "USD",
            "checkOut": "2026-11-28",
            "holdDays": 21,
            "eligibleAt": "2026-12-19T21:47:50.937Z",
            "profitSource": "test_simulation",
            "reversedAt": "2026-11-16T09:47:52.937Z",
            "reversalReason": "booking_cancelled_and_refunded"
          }
        }
      },
      "LiveCancellationPreview": {
        "value": {
          "object": "agent_commerce.cancellation_preview",
          "bookingReference": "BREK-123",
          "environment": "live",
          "cancellable": true,
          "reason": "cancellable",
          "isSimulation": false,
          "calculatedAt": "2026-11-16T09:47:50.937Z",
          "price": {
            "originalTotal": {
              "amount": 281.42,
              "currency": "USD"
            },
            "refundableAmount": {
              "amount": 250,
              "currency": "USD"
            },
            "cancellationPenalty": {
              "amount": 31.42,
              "currency": "USD"
            }
          },
          "approval": {
            "required": true,
            "expiresAt": "2026-11-16T09:52:50.937Z",
            "token": "<sensitive five-minute approval token>",
            "previewFingerprint": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
            "instruction": "Show these cancellation consequences to the approving human, then pass this token unchanged to cancel before it expires."
          }
        }
      },
      "TestCancellationPreview": {
        "value": {
          "object": "agent_commerce.cancellation_preview",
          "bookingReference": "BREK-TEST-123",
          "environment": "test",
          "cancellable": true,
          "reason": "cancellable",
          "isSimulation": true,
          "calculatedAt": "2026-11-16T09:47:50.937Z",
          "price": {
            "originalTotal": {
              "amount": 281.42,
              "currency": "USD"
            },
            "refundableAmount": {
              "amount": 281.42,
              "currency": "USD"
            },
            "cancellationPenalty": {
              "amount": 0,
              "currency": "USD"
            }
          },
          "approval": {
            "required": false,
            "instruction": "Approval tokens are optional in Test; no supplier is called."
          }
        }
      },
      "TestCapabilities": {
        "value": {
          "object": "agent_commerce.capabilities",
          "version": "2026-09-01",
          "authentication": "bearer_api_key",
          "authorization": {
            "scopeModel": "application_inherited",
            "effectiveScopes": [
              "shopping:read",
              "checkout:write",
              "booking:read",
              "cancellation:write"
            ],
            "selectableScopes": false
          },
          "offers": {
            "brekRate": {
              "inventoryBookableByBrek": true,
              "agentCheckoutAvailable": true,
              "checkoutModes": {
                "hosted": "available",
                "native": "available"
              },
              "revShare": "realized_brek_profit"
            },
            "publicRate": {
              "bookableByBrek": false,
              "action": "redirect",
              "revShare": "not_eligible_in_v1"
            }
          },
          "inventory": {
            "profile": "brek_retail",
            "alignedChannels": [
              "brek.com",
              "brek_mcp"
            ],
            "pricing": "exact_with_private_api_key",
            "identifierScope": "agent_commerce_channel"
          },
          "transactions": {
            "environment": "test",
            "identityBridge": {
              "ready": true
            },
            "retailSearchAuthorization": {
              "ready": true
            },
            "checkoutSigning": {
              "ready": true
            },
            "confirmationEmail": {
              "mode": "suppressed_in_test",
              "ready": true
            },
            "payment": {
              "mode": "stripe_test",
              "ready": true
            },
            "hotelConfirmation": {
              "mode": "simulated",
              "ready": true
            },
            "cancellation": {
              "mode": "simulated_supplier_with_stripe_test_refund",
              "ready": true
            },
            "safeToConfirm": true,
            "fullLifecycleReady": true
          },
          "searchModes": {
            "exact": {
              "endpoint": "/api/v1/agent-commerce/search"
            },
            "flexible": {
              "endpoint": "/api/v1/agent-commerce/search/flexible"
            }
          },
          "privateEconomics": {
            "visibility": "private_api_key",
            "policyEnvelopeReturnedBy": [
              "search",
              "hotel_offers",
              "quote"
            ],
            "estimatedAmounts": {
              "available": false,
              "reason": "realized_profit_is_not_known_before_booking"
            },
            "realizedAmounts": {
              "returnedBy": [
                "booking.commission"
              ],
              "availableAfter": "booking_profit_realized"
            },
            "displayToTraveler": false
          },
          "agreement": {
            "version": "2026-09-30",
            "contentSha256": "7cab5d738ff68b8d3838cb98c3dc626bc3b863e8f4429aedc83fdfcf0f0bcca7",
            "acceptedVersion": "2026-09-30",
            "acceptedContentSha256": "7cab5d738ff68b8d3838cb98c3dc626bc3b863e8f4429aedc83fdfcf0f0bcca7",
            "acceptedAt": "2026-10-04T20:00:00.000Z",
            "acceptedBy": "workspace_owner_123",
            "status": "approved",
            "current": true,
            "plan": "standard",
            "profitShareRate": 0.1,
            "basis": "realized_brek_profit",
            "publicRedirectsEligible": false
          },
          "rateLimit": {
            "scope": "application",
            "limit": 60,
            "windowMs": 60000,
            "flexibleItineraryBudget": {
              "scope": "application_flexible_itineraries",
              "limit": 600,
              "windowMs": 60000,
              "unit": "searched_itinerary"
            },
            "responseHeaders": [
              "X-RateLimit-Limit",
              "X-RateLimit-Remaining",
              "X-RateLimit-Reset",
              "X-RateLimit-Scope",
              "Retry-After"
            ]
          },
          "resourceLimits": {
            "applications": 5,
            "activeApiKeysPerApplication": 10
          },
          "application": {
            "id": "app_123",
            "name": "Travel Copilot",
            "environment": "test",
            "effectiveScopes": [
              "shopping:read",
              "checkout:write",
              "booking:read",
              "cancellation:write"
            ]
          }
        }
      },
      "InvalidRequestError": {
        "value": {
          "error": {
            "code": "invalid_request",
            "message": "The request failed validation",
            "status": 400,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "InvalidApiKeyError": {
        "value": {
          "error": {
            "code": "invalid_api_key",
            "message": "Invalid Agent API key",
            "status": 401,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "IdempotencyConflictError": {
        "value": {
          "error": {
            "code": "idempotency_conflict",
            "message": "Idempotency-Key was already used with different checkout input",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "QuoteCheckoutConflictError": {
        "summary": "This Quote already owns its only checkout. Recover that checkout or obtain a fresh Quote.",
        "value": {
          "error": {
            "code": "quote_checkout_conflict",
            "message": "This Quote is already reserved for a checkout. Reuse the original create request to recover it, or create a fresh Quote for another checkout.",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": [
              {
                "reason": "This Quote already owns a checkout. Retrieve it instead of creating another checkout.",
                "checkoutSessionId": "acs_existing123",
                "nextAction": {
                  "type": "get_checkout",
                  "checkoutSessionId": "acs_existing123"
                }
              }
            ]
          }
        }
      },
      "CheckoutAbandonNotAllowedError": {
        "summary": "The Test checkout has crossed the safe pre-booking abandonment boundary.",
        "value": {
          "error": {
            "code": "checkout_abandon_not_allowed",
            "message": "Test checkout cannot be abandoned from its current status",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "ConfirmationInProgressError": {
        "value": {
          "error": {
            "code": "confirmation_in_progress",
            "message": "Checkout confirmation is already in progress. GET-poll the original checkout; do not submit Confirm again.",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "ConfirmationPaymentPendingError": {
        "value": {
          "error": {
            "code": "confirmation_payment_pending",
            "message": "The hotel is booked but payment capture has not settled. Retrieve the checkout; do not create another booking.",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "ConfirmationOutcomeUnknownError": {
        "value": {
          "error": {
            "code": "confirmation_outcome_unknown",
            "message": "The supplier booking outcome is not yet known. Retrieve the checkout and contact Brek support.",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "ConfirmationPreflightFailedError": {
        "value": {
          "error": {
            "code": "confirmation_preflight_failed",
            "message": "Booking validation failed before supplier dispatch. Payment authorization was released; retrieve this checkout for its terminal state.",
            "status": 400,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "ConfirmationPaymentVoidPendingError": {
        "value": {
          "error": {
            "code": "confirmation_payment_void_pending",
            "message": "The supplier booking failed, but the payment release outcome is not yet known. Retrieve this checkout; do not create another booking.",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "ConfirmationFailedError": {
        "value": {
          "error": {
            "code": "confirmation_failed",
            "message": "The supplier booking failed. Retrieve the checkout for its terminal state.",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "CheckoutExpiryPaymentReleasePendingError": {
        "summary": "Checkout expiry was detected but payment-hold release is not proven.",
        "value": {
          "error": {
            "code": "checkout_expiry_payment_release_pending",
            "message": "Checkout expiry is being reconciled and payment-hold release is not yet confirmed. Retrieve this checkout; do not confirm it or create another checkout from this Quote.",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      },
      "QuoteExpiredPaymentReleasePendingError": {
        "summary": "The Quote expired or changed and payment-hold release is not proven.",
        "value": {
          "error": {
            "code": "quote_expired_payment_release_pending",
            "message": "The approved quote expired or changed. Payment-hold release is not yet confirmed; retrieve this checkout and do not create another checkout from this Quote.",
            "status": 409,
            "requestId": "req_0123456789abcdef",
            "retryable": false,
            "details": []
          }
        }
      }
    }
  }
}
