openapi: 3.0.3
info:
  title: "Hostrail Commerce API"
  description: "Deterministic commerce backbone for the hospitality agent platform. Every response (success AND failure) carries the agent trust envelope defined in ADR-0011: `data` + `trace_id` + `next_actions` on the happy path, and `error.{code, message, detail, remediation, retry_after, docs_url, trace_id, next_actions}` on failures. Agents match on `error.code`, not HTTP status or message strings. See `/.well-known/agent-card.json` for the machine-readable capability + flow catalog."
  version: 0.0.0
  contact:
    name: "Hostrail Commerce API support"
    url: https://docs.hostrail.dev
    email: "api-support@example.com"
  license:
    name: Proprietary
    url: https://docs.hostrail.dev/terms
  termsOfService: https://docs.hostrail.dev/terms
components:
  securitySchemes:
    AgentBearer:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: "Tenant-scoped agent credential issued via `/v1/admin/agents` or credential rotation. This is the canonical production auth path for partner agents, MCP clients, and server-side integrations."
    TenantHeader:
      type: apiKey
      in: header
      name: X-Tenant-Id
      description: "Optional tenant hint for local development and selected internal-service flows. Do not rely on this header as the primary production auth scheme; prefer `Authorization: Bearer <agent_api_key>`."
  schemas:
{}
paths:
  /oauth/token:
    post:
      operationId: oauthToken
      summary: "Mint an OAuth access token from an agent credential"
      tags:
        - discovery
      description: "Client credentials exchange for agent runtimes. Use `client_id=<agent_id>` and `client_secret=<plaintext_secret>` from the agent credential issuance flow. Supports HTTP Basic auth or body fields."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                scope:
                  type: string
                client_id:
                  type: string
                client_secret:
                  type: string
              required:
                - grant_type
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  token_type:
                    type: string
                    enum:
                      - Bearer
                  expires_in:
                    type: integer
                    exclusiveMinimum: true
                    minimum: 0
                  scope:
                    type: string
                required:
                  - access_token
                  - token_type
                  - expires_in
                  - scope
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_client
                      - invalid_scope
                  error_description:
                    type: string
                required:
                  - error
                  - error_description
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_client
                      - invalid_scope
                  error_description:
                    type: string
                required:
                  - error
                  - error_description
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - oauth_not_configured
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/jwks.json:
    get:
      operationId: getOauthJwks
      summary: "JWKS for OAuth access token verification"
      tags:
        - discovery
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  keys:
                    type: array
                    items:
                      type: object
                      additionalProperties:
{}
                required:
                  - keys
                additionalProperties: false
      x-openai-isConsequential: false
  /:
    get:
      operationId: getServiceIndex
      summary: "Service index — entry point for agents discovering the API"
      tags:
        - discovery
      description: "Returns the service name, version, and the URLs of the Agent Card and OpenAPI document. An autonomous agent with zero prior knowledge of this API should start here."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  description:
                    type: string
                  version:
                    type: string
                  links:
                    type: object
                    properties:
                      agent_card:
                        type: string
                      a2a_agent:
                        type: string
                      ai_plugin:
                        type: string
                      acp_discovery:
                        type: string
                      openapi_json:
                        type: string
                      openapi_yaml:
                        type: string
                      health:
                        type: string
                      ready:
                        type: string
                      oauth_authorization_server:
                        type: string
                      openid_configuration:
                        type: string
                      oauth_protected_resource:
                        type: string
                    required:
                      - agent_card
                      - a2a_agent
                      - ai_plugin
                      - openapi_json
                      - openapi_yaml
                      - health
                      - ready
                    additionalProperties: false
                required:
                  - name
                  - description
                  - version
                  - links
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/agent-card.json:
    get:
      operationId: getAgentCard
      summary: "Agent Card — capabilities, flows, and contracts"
      tags:
        - discovery
      description: "The machine-readable manifest an autonomous agent should fetch first. Describes capabilities, canonical flows, auth schemes, and the envelope + idempotency contracts. Deterministic per deploy."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  description:
                    type: string
                  version:
                    type: string
                  protocol_version:
                    type: string
                  openapi_url:
                    type: string
                  ai_plugin_url:
                    type: string
                  docs_url:
                    type: string
                  error_catalog_url:
                    type: string
                  auth:
                    type: object
                    properties:
                      schemes:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - header
                                - bearer
                                - oauth2
                            name:
                              type: string
                            required:
                              type: boolean
                            description:
                              type: string
                          required:
                            - type
                            - name
                            - required
                            - description
                          additionalProperties: false
                    required:
                      - schemes
                    additionalProperties: false
                  capabilities:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        description:
                          type: string
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        idempotent:
                          type: boolean
                        next_rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                          nullable: true
                      required:
                        - id
                        - description
                        - method
                        - href
                        - idempotent
                        - next_rel
                      additionalProperties: false
                  flows:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        description:
                          type: string
                        steps:
                          type: array
                          items:
                            type: string
                      required:
                        - id
                        - description
                        - steps
                      additionalProperties: false
                  contracts:
                    type: object
                    properties:
                      envelope:
                        type: object
                        properties:
                          success_fields:
                            type: array
                            items:
                              type: string
                          error_fields:
                            type: array
                            items:
                              type: string
                          next_action_rels:
                            type: array
                            items:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                        required:
                          - success_fields
                          - error_fields
                          - next_action_rels
                        additionalProperties: false
                      idempotency:
                        type: object
                        properties:
                          body_field:
                            type: string
                          header:
                            type: string
                          scoped_endpoints:
                            type: array
                            items:
                              type: string
                          description:
                            type: string
                        required:
                          - body_field
                          - header
                          - scoped_endpoints
                          - description
                        additionalProperties: false
                      trace_context:
                        type: object
                        properties:
                          propagation:
                            type: string
                            enum:
                              - w3c-traceparent
                          header:
                            type: string
                            enum:
                              - traceparent
                          description:
                            type: string
                        required:
                          - propagation
                          - header
                          - description
                        additionalProperties: false
                      receipts:
                        type: object
                        properties:
                          algorithm:
                            type: string
                            enum:
                              - HS256
                          kinds:
                            type: array
                            items:
                              type: string
                          verify_endpoint:
                            type: string
                          canonical_form:
                            type: string
                          description:
                            type: string
                        required:
                          - algorithm
                          - kinds
                          - verify_endpoint
                          - canonical_form
                          - description
                        additionalProperties: false
                      pagination:
                        type: object
                        properties:
                          strategy:
                            type: string
                            enum:
                              - complete
                              - cursor
                              - offset
                          description:
                            type: string
                        required:
                          - strategy
                          - description
                        additionalProperties: false
                      delegation:
                        type: object
                        properties:
                          header:
                            type: string
                            enum:
                              - X-Delegated-User
                          token_type:
                            type: string
                            enum:
                              - jwt
                          accepted_algorithms:
                            type: array
                            items:
                              type: string
                              enum:
                                - RS256
                                - ES256
                          required_claims:
                            type: array
                            items:
                              type: string
                              enum:
                                - iss
                                - sub
                                - aud
                                - exp
                          gated_routes:
                            type: array
                            items:
                              type: object
                              properties:
                                method:
                                  type: string
                                  enum:
                                    - GET
                                    - POST
                                    - PUT
                                    - DELETE
                                    - PATCH
                                href:
                                  type: string
                              required:
                                - method
                                - href
                              additionalProperties: false
                          error_codes:
                            type: object
                            properties:
                              missing_header:
                                type: string
                                enum:
                                  - delegation_required
                              verification_failed:
                                type: string
                                enum:
                                  - delegation_invalid
                              issuer_not_trusted:
                                type: string
                                enum:
                                  - delegation_issuer_unknown
                            required:
                              - missing_header
                              - verification_failed
                              - issuer_not_trusted
                            additionalProperties: false
                          description:
                            type: string
                        required:
                          - header
                          - token_type
                          - accepted_algorithms
                          - required_claims
                          - gated_routes
                          - error_codes
                          - description
                        additionalProperties: false
                    required:
                      - envelope
                      - idempotency
                      - trace_context
                      - receipts
                      - pagination
                      - delegation
                    additionalProperties: false
                required:
                  - name
                  - description
                  - version
                  - protocol_version
                  - openapi_url
                  - ai_plugin_url
                  - docs_url
                  - error_catalog_url
                  - auth
                  - capabilities
                  - flows
                  - contracts
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/ai-plugin.json:
    get:
      operationId: getAiPluginManifest
      summary: "OpenAI plugin manifest"
      tags:
        - discovery
      description: "The `/.well-known/ai-plugin.json` document plugin-style LLM clients fetch to discover this service. Points at `/openapi.json` for the full contract and at the Agent Card for the richer capability catalog."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  schema_version:
                    type: string
                    enum:
                      - v1
                  name_for_human:
                    type: string
                  name_for_model:
                    type: string
                  description_for_human:
                    type: string
                  description_for_model:
                    type: string
                  auth:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - none
                          - user_http
                          - service_http
                      authorization_type:
                        type: string
                    required:
                      - type
                    additionalProperties: false
                  api:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - openapi
                      url:
                        type: string
                      is_user_authenticated:
                        type: boolean
                    required:
                      - type
                      - url
                      - is_user_authenticated
                    additionalProperties: false
                  logo_url:
                    type: string
                  contact_email:
                    type: string
                  legal_info_url:
                    type: string
                required:
                  - schema_version
                  - name_for_human
                  - name_for_model
                  - description_for_human
                  - description_for_model
                  - auth
                  - api
                  - logo_url
                  - contact_email
                  - legal_info_url
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/agent.json:
    get:
      operationId: getA2AAgentCard
      summary: "A2A Agent Card — Google Agent-to-Agent discovery"
      tags:
        - discovery
      description: "Agent Card following the Google A2A protocol. Describes skills, capabilities, and authentication for inter-agent discovery. Gemini Enterprise and other A2A-compatible agents use this to discover the platform."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  description:
                    type: string
                  url:
                    type: string
                  version:
                    type: string
                  provider:
                    type: object
                    properties:
                      organization:
                        type: string
                      url:
                        type: string
                        format: uri
                    required:
                      - organization
                      - url
                    additionalProperties: false
                  documentationUrl:
                    type: string
                    format: uri
                  iconUrl:
                    type: string
                    format: uri
                  capabilities:
                    type: object
                    properties:
                      streaming:
                        type: boolean
                      pushNotifications:
                        type: boolean
                      stateTransitionHistory:
                        type: boolean
                    required:
                      - streaming
                      - pushNotifications
                    additionalProperties: false
                  skills:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        description:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        examples:
                          type: array
                          items:
                            type: string
                        inputModes:
                          type: array
                          items:
                            type: string
                        outputModes:
                          type: array
                          items:
                            type: string
                      required:
                        - id
                        - name
                        - description
                        - tags
                        - examples
                      additionalProperties: false
                  defaultInputModes:
                    type: array
                    items:
                      type: string
                  defaultOutputModes:
                    type: array
                    items:
                      type: string
                  authentication:
                    type: object
                    properties:
                      schemes:
                        type: array
                        items:
                          type: string
                    required:
                      - schemes
                    additionalProperties: false
                  securitySchemes:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - http
                            - apiKey
                            - oauth2
                        scheme:
                          type: string
                        bearerFormat:
                          type: string
                        in:
                          type: string
                          enum:
                            - header
                            - query
                            - cookie
                        name:
                          type: string
                        description:
                          type: string
                      required:
                        - type
                      additionalProperties: false
                required:
                  - name
                  - description
                  - url
                  - version
                  - capabilities
                  - skills
                  - defaultInputModes
                  - defaultOutputModes
                  - authentication
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/errors:
    get:
      operationId: getErrorCatalog
      summary: "Error catalog — all error codes with remediation and next_actions"
      tags:
        - discovery
      description: "Returns every error code the platform can return, along with its HTTP status, default remediation text, default next_actions, and a docs_url. Agents can fetch this once and build a local lookup table for error recovery."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        status:
                          type: number
                        remediation:
                          type: string
                        next_actions:
                          type: array
                          items:
                            type: object
                            properties:
                              rel:
                                type: string
                              method:
                                type: string
                              href:
                                type: string
                            required:
                              - rel
                              - method
                              - href
                            additionalProperties: false
                        docs_url:
                          type: string
                      required:
                        - code
                        - status
                        - remediation
                        - next_actions
                        - docs_url
                      additionalProperties: false
                required:
                  - errors
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/delegation-issuers:
    get:
      operationId: getDelegationIssuers
      summary: "List trusted delegation issuers (public)"
      tags:
        - discovery
      description: "Returns active delegation issuers whose JWTs this platform accepts for the `X-Delegated-User` header. Agents use this to discover which issuers they can present without admin credentials."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  issuers:
                    type: array
                    items:
                      type: object
                      properties:
                        iss:
                          type: string
                        name:
                          type: string
                        status:
                          type: string
                          enum:
                            - active
                            - suspended
                            - revoked
                        jwks_url:
                          type: string
                          nullable: true
                        allowed_audiences:
                          type: array
                          items:
                            type: string
                      required:
                        - iss
                        - name
                        - status
                        - jwks_url
                        - allowed_audiences
                      additionalProperties: false
                required:
                  - issuers
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/oauth-authorization-server:
    get:
      operationId: getOauthAuthorizationServerMetadata
      summary: "OAuth 2.0 authorization server metadata"
      tags:
        - discovery
      description: "Returns RFC 8414 metadata when an OAuth issuer is configured for agent-facing access tokens. If the deployment only uses opaque API keys, this route stays unpublished."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  issuer:
                    type: string
                    format: uri
                  authorization_endpoint:
                    type: string
                    format: uri
                  token_endpoint:
                    type: string
                    format: uri
                  jwks_uri:
                    type: string
                    format: uri
                  grant_types_supported:
                    type: array
                    items:
                      type: string
                  token_endpoint_auth_methods_supported:
                    type: array
                    items:
                      type: string
                  scopes_supported:
                    type: array
                    items:
                      type: string
                  revocation_endpoint:
                    type: string
                    format: uri
                  introspection_endpoint:
                    type: string
                    format: uri
                required:
                  - issuer
                  - token_endpoint
                  - jwks_uri
                  - grant_types_supported
                  - token_endpoint_auth_methods_supported
                  - scopes_supported
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - oauth_metadata_not_configured
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/openid-configuration:
    get:
      operationId: getOpenIdConfiguration
      summary: "OpenID Connect discovery metadata"
      tags:
        - discovery
      description: "OIDC-compatible alias for the OAuth authorization server metadata. Published so agents that probe the OIDC well-known path can still discover client_credentials auth."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  issuer:
                    type: string
                    format: uri
                  authorization_endpoint:
                    type: string
                    format: uri
                  token_endpoint:
                    type: string
                    format: uri
                  jwks_uri:
                    type: string
                    format: uri
                  grant_types_supported:
                    type: array
                    items:
                      type: string
                  token_endpoint_auth_methods_supported:
                    type: array
                    items:
                      type: string
                  scopes_supported:
                    type: array
                    items:
                      type: string
                  revocation_endpoint:
                    type: string
                    format: uri
                  introspection_endpoint:
                    type: string
                    format: uri
                required:
                  - issuer
                  - token_endpoint
                  - jwks_uri
                  - grant_types_supported
                  - token_endpoint_auth_methods_supported
                  - scopes_supported
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - oauth_metadata_not_configured
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/oauth-protected-resource:
    get:
      operationId: getOauthProtectedResourceMetadata
      summary: "OAuth protected resource metadata"
      tags:
        - discovery
      description: "Returns RFC 9728 metadata for protected commerce routes when an OAuth authorization server is configured."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  resource:
                    type: string
                    format: uri
                  authorization_servers:
                    type: array
                    items:
                      type: string
                      format: uri
                  bearer_methods_supported:
                    type: array
                    items:
                      type: string
                  scopes_supported:
                    type: array
                    items:
                      type: string
                  resource_documentation:
                    type: string
                    format: uri
                required:
                  - resource
                  - authorization_servers
                  - bearer_methods_supported
                  - scopes_supported
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - oauth_metadata_not_configured
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /.well-known/acp.json:
    get:
      operationId: getAcpDiscovery
      summary: "ACP discovery document"
      tags:
        - discovery
      description: "Publishes Agentic Commerce Protocol discovery metadata for the current commerce surface. Describes the real service groups the platform supports today without implying an ACP-native checkout model beyond the existing quote, hold, and booking flow."
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  protocol:
                    type: object
                    properties:
                      name:
                        type: string
                        enum:
                          - acp
                      version:
                        type: string
                    required:
                      - name
                      - version
                    additionalProperties: false
                  api_base_url:
                    type: string
                    format: uri
                  transports:
                    type: array
                    items:
                      type: string
                    minItems: 1
                  transport_endpoints:
                    type: object
                    additionalProperties:
                      type: string
                      format: uri
                  capabilities:
                    type: object
                    properties:
                      services:
                        type: array
                        items:
                          type: string
                        minItems: 1
                    required:
                      - services
                    additionalProperties: false
                  documentation_url:
                    type: string
                    format: uri
                  agent_card_url:
                    type: string
                    format: uri
                  openapi_url:
                    type: string
                    format: uri
                required:
                  - protocol
                  - api_base_url
                  - transports
                  - capabilities
                additionalProperties: false
      x-openai-isConsequential: false
  /healthz:
    get:
      summary: "Liveness probe"
      tags:
        - health
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                      service:
                        type: string
                      timestamp:
                        type: string
                    required:
                      - status
                      - service
                      - timestamp
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /readyz:
    get:
      summary: "Readiness probe with dependency status"
      tags:
        - health
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                      service:
                        type: string
                      timestamp:
                        type: string
                      dependencies:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            state:
                              type: string
                              enum:
                                - ok
                                - degraded
                                - down
                          required:
                            - state
                          additionalProperties: false
                    required:
                      - status
                      - service
                      - timestamp
                      - dependencies
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /feeds/google/hotel-list.xml:
    get:
      operationId: googleHotelList
      summary: "Google Hotel Center — Hotel List feed"
      tags:
        - feeds
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: tenant_id
          required: true
      responses:
        200:
          description: "Default Response"
      x-openai-isConsequential: false
  /feeds/google/ari.xml:
    get:
      operationId: googleAriFeed
      summary: "Google Hotel Center — ARI feed (Transaction messages)"
      tags:
        - feeds
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: tenant_id
          required: true
        - schema:
            type: integer
            minimum: 1
            maximum: 90
            default: 30
          in: query
          name: days
          required: false
      responses:
        200:
          description: "Default Response"
      x-openai-isConsequential: false
  /feeds/google/pointofsale.xml:
    get:
      operationId: googlePointOfSale
      summary: "Google Hotel Center — Point of Sale definition"
      tags:
        - feeds
      responses:
        200:
          description: "Default Response"
      x-openai-isConsequential: false
  /v1/properties:
    get:
      operationId: listProperties
      summary: "List properties for the current tenant"
      tags:
        - supply
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            slug:
                              type: string
                            name:
                              type: string
                            description:
                              type: string
                              nullable: true
                            star_rating:
                              type: number
                              nullable: true
                            address:
                              type: object
                              properties:
                                line1:
                                  type: string
                                  minLength: 1
                                line2:
                                  type: string
                                city:
                                  type: string
                                  minLength: 1
                                region:
                                  type: string
                                country:
                                  type: string
                                  minLength: 2
                                  maxLength: 2
                                postal_code:
                                  type: string
                              required:
                                - line1
                                - city
                                - country
                              additionalProperties: false
                            geo:
                              type: object
                              properties:
                                lat:
                                  type: number
                                  minimum: -90
                                  maximum: 90
                                lng:
                                  type: number
                                  minimum: -180
                                  maximum: 180
                              required:
                                - lat
                                - lng
                              additionalProperties: false
                              nullable: true
                            default_currency:
                              type: string
                            timezone:
                              type: string
                          required:
                            - id
                            - slug
                            - name
                            - description
                            - star_rating
                            - address
                            - geo
                            - default_currency
                            - timezone
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/properties/{id}:
    get:
      operationId: getProperty
      summary: "Property detail with room types and rate plans"
      tags:
        - supply
      parameters:
        - schema:
            type: string
            minLength: 3
            maxLength: 3
            pattern: "^[A-Z]{3}$"
          in: query
          name: currency
          required: false
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      slug:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      star_rating:
                        type: number
                        nullable: true
                      address:
                        type: object
                        properties:
                          line1:
                            type: string
                            minLength: 1
                          line2:
                            type: string
                          city:
                            type: string
                            minLength: 1
                          region:
                            type: string
                          country:
                            type: string
                            minLength: 2
                            maxLength: 2
                          postal_code:
                            type: string
                        required:
                          - line1
                          - city
                          - country
                        additionalProperties: false
                      geo:
                        type: object
                        properties:
                          lat:
                            type: number
                            minimum: -90
                            maximum: 90
                          lng:
                            type: number
                            minimum: -180
                            maximum: 180
                        required:
                          - lat
                          - lng
                        additionalProperties: false
                        nullable: true
                      default_currency:
                        type: string
                      timezone:
                        type: string
                      room_types:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            code:
                              type: string
                            name:
                              type: string
                            description:
                              type: string
                              nullable: true
                            max_occupancy:
                              type: number
                            bed_type:
                              type: string
                              nullable: true
                            floor_size_sqm:
                              type: number
                              nullable: true
                            amenities:
                              type: array
                              items:
                                type: string
                            images:
                              type: array
                              items:
                                type: string
                            smoking_allowed:
                              type: boolean
                            default_inventory:
                              type: number
                            rate_plans:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  code:
                                    type: string
                                  name:
                                    type: string
                                  currency:
                                    type: string
                                  base_rate_per_night:
                                    type: number
                                  meal_plan:
                                    type: string
                                  cancellation_kind:
                                    type: string
                                required:
                                  - id
                                  - code
                                  - name
                                  - currency
                                  - base_rate_per_night
                                  - meal_plan
                                  - cancellation_kind
                                additionalProperties: false
                          required:
                            - id
                            - code
                            - name
                            - description
                            - max_occupancy
                            - bed_type
                            - floor_size_sqm
                            - amenities
                            - images
                            - smoking_allowed
                            - default_inventory
                            - rate_plans
                          additionalProperties: false
                    required:
                      - id
                      - slug
                      - name
                      - description
                      - star_rating
                      - address
                      - geo
                      - default_currency
                      - timezone
                      - room_types
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/properties/{slug}/full:
    get:
      operationId: getPropertyFull
      summary: "Property full read model by slug"
      tags:
        - supply
      parameters:
        - schema:
            type: string
            minLength: 3
            maxLength: 3
            pattern: "^[A-Z]{3}$"
          in: query
          name: currency
          required: false
        - schema:
            type: string
            minLength: 1
          in: path
          name: slug
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      slug:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      star_rating:
                        type: number
                        nullable: true
                      address:
                        type: object
                        properties:
                          line1:
                            type: string
                            minLength: 1
                          line2:
                            type: string
                          city:
                            type: string
                            minLength: 1
                          region:
                            type: string
                          country:
                            type: string
                            minLength: 2
                            maxLength: 2
                          postal_code:
                            type: string
                        required:
                          - line1
                          - city
                          - country
                        additionalProperties: false
                      geo:
                        type: object
                        properties:
                          lat:
                            type: number
                            minimum: -90
                            maximum: 90
                          lng:
                            type: number
                            minimum: -180
                            maximum: 180
                        required:
                          - lat
                          - lng
                        additionalProperties: false
                        nullable: true
                      default_currency:
                        type: string
                      timezone:
                        type: string
                      amenities:
                        type: array
                        items:
                          type: string
                      images:
                        type: array
                        items:
                          type: string
                      phone:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                      pets_allowed:
                        type: boolean
                      number_of_rooms:
                        type: number
                        nullable: true
                      checkin_time:
                        type: string
                        nullable: true
                      checkout_time:
                        type: string
                        nullable: true
                      policies:
                        type: array
                        items:
                          type: object
                          properties:
                            version:
                              type: string
                            cancellation_kind:
                              type: string
                            free_cancellation_hours_before_checkin:
                              type: number
                            cancellation_fee_pct_after_cutoff:
                              type: number
                            child_policy_text:
                              type: string
                              nullable: true
                          required:
                            - version
                            - cancellation_kind
                            - free_cancellation_hours_before_checkin
                            - cancellation_fee_pct_after_cutoff
                            - child_policy_text
                          additionalProperties: false
                      room_types:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            code:
                              type: string
                            name:
                              type: string
                            description:
                              type: string
                              nullable: true
                            max_occupancy:
                              type: number
                            bed_type:
                              type: string
                              nullable: true
                            floor_size_sqm:
                              type: number
                              nullable: true
                            amenities:
                              type: array
                              items:
                                type: string
                            images:
                              type: array
                              items:
                                type: string
                            smoking_allowed:
                              type: boolean
                            default_inventory:
                              type: number
                            rate_plans:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  code:
                                    type: string
                                  name:
                                    type: string
                                  currency:
                                    type: string
                                  base_rate_per_night:
                                    type: number
                                  meal_plan:
                                    type: string
                                  cancellation_kind:
                                    type: string
                                required:
                                  - id
                                  - code
                                  - name
                                  - currency
                                  - base_rate_per_night
                                  - meal_plan
                                  - cancellation_kind
                                additionalProperties: false
                          required:
                            - id
                            - code
                            - name
                            - description
                            - max_occupancy
                            - bed_type
                            - floor_size_sqm
                            - amenities
                            - images
                            - smoking_allowed
                            - default_inventory
                            - rate_plans
                          additionalProperties: false
                    required:
                      - id
                      - slug
                      - name
                      - description
                      - star_rating
                      - address
                      - geo
                      - default_currency
                      - timezone
                      - amenities
                      - images
                      - phone
                      - email
                      - pets_allowed
                      - number_of_rooms
                      - checkin_time
                      - checkout_time
                      - policies
                      - room_types
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/search:
    post:
      operationId: searchAvailability
      summary: "Find offers matching the requested stay"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                destination:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - area
                        - property
                    value:
                      type: string
                  required:
                    - type
                    - value
                  additionalProperties: false
                stay:
                  type: object
                  properties:
                    check_in:
                      type: string
                      pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                    check_out:
                      type: string
                      pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                  required:
                    - check_in
                    - check_out
                  additionalProperties: false
                guests:
                  type: object
                  properties:
                    adults:
                      type: integer
                      minimum: 1
                      maximum: 20
                    children:
                      type: array
                      items:
                        type: object
                        properties:
                          age:
                            type: integer
                            minimum: 0
                            maximum: 17
                        required:
                          - age
                        additionalProperties: false
                      default:
[]
                  required:
                    - adults
                  additionalProperties: false
                constraints:
                  type: object
                  properties:
                    max_price_per_night:
                      type: object
                      properties:
                        amount:
                          type: integer
                          minimum: 0
                        currency:
                          type: string
                          minLength: 3
                          maxLength: 3
                          pattern: "^[A-Z]{3}$"
                      required:
                        - amount
                        - currency
                      additionalProperties: false
                    meal_plan:
                      type: string
                    cancellation:
                      type: string
                  additionalProperties: false
              required:
                - stay
                - guests
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            hotel_id:
                              type: string
                            name:
                              type: string
                            rank_score:
                              type: number
                            explanation:
                              type: array
                              items:
                                type: string
                            best_offer:
                              type: object
                              properties:
                                room_type_id:
                                  type: string
                                rate_plan_id:
                                  type: string
                                price_per_night:
                                  type: object
                                  properties:
                                    amount:
                                      type: integer
                                      minimum: 0
                                    currency:
                                      type: string
                                      minLength: 3
                                      maxLength: 3
                                      pattern: "^[A-Z]{3}$"
                                  required:
                                    - amount
                                    - currency
                                  additionalProperties: false
                              required:
                                - room_type_id
                                - rate_plan_id
                                - price_per_night
                              additionalProperties: false
                          required:
                            - hotel_id
                            - name
                            - rank_score
                            - explanation
                            - best_offer
                          additionalProperties: false
                    required:
                      - results
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/advisor/sessions:
    post:
      summary: "Create advisor chat session for a property"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                property_slug:
                  type: string
                  minLength: 1
                  maxLength: 120
                locale:
                  type: string
                  minLength: 2
                  maxLength: 16
              required:
                - property_slug
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      session_id:
                        type: string
                        format: uuid
                      property_slug:
                        type: string
                      property_name:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      messages:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            role:
                              type: string
                              enum:
                                - user
                                - assistant
                            message:
                              type: string
                            grounded_facts:
                              type: array
                              items:
                                type: string
                            suggestions:
                              type: array
                              items:
                                type: object
                                properties:
                                  label:
                                    type: string
                                  href:
                                    type: string
                                required:
                                  - label
                                  - href
                                additionalProperties: false
                            created_at:
                              type: string
                          required:
                            - id
                            - role
                            - message
                            - grounded_facts
                            - suggestions
                            - created_at
                          additionalProperties: false
                    required:
                      - session_id
                      - property_slug
                      - property_name
                      - created_at
                      - updated_at
                      - messages
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/advisor/sessions/{id}:
    get:
      summary: "Get advisor chat session transcript"
      tags:
        - commerce
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      session_id:
                        type: string
                        format: uuid
                      property_slug:
                        type: string
                      property_name:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      messages:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            role:
                              type: string
                              enum:
                                - user
                                - assistant
                            message:
                              type: string
                            grounded_facts:
                              type: array
                              items:
                                type: string
                            suggestions:
                              type: array
                              items:
                                type: object
                                properties:
                                  label:
                                    type: string
                                  href:
                                    type: string
                                required:
                                  - label
                                  - href
                                additionalProperties: false
                            created_at:
                              type: string
                          required:
                            - id
                            - role
                            - message
                            - grounded_facts
                            - suggestions
                            - created_at
                          additionalProperties: false
                    required:
                      - session_id
                      - property_slug
                      - property_name
                      - created_at
                      - updated_at
                      - messages
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/advisor/properties/{slug}/answer:
    post:
      summary: "Answer grounded hotel-site advisor question for a property"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  minLength: 2
                  maxLength: 1000
              required:
                - message
              additionalProperties: false
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: slug
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      answer:
                        type: string
                      grounded_facts:
                        type: array
                        items:
                          type: string
                      suggestions:
                        type: array
                        items:
                          type: object
                          properties:
                            label:
                              type: string
                            href:
                              type: string
                          required:
                            - label
                            - href
                          additionalProperties: false
                      handoff_recommended:
                        type: boolean
                        default: false
                      config_summary:
                        type: object
                        properties:
                          brand_voice:
                            type: string
                          primary_model:
                            type: string
                          fallback_model:
                            type: string
                          temperature:
                            type: number
                          booking_handoff_enabled:
                            type: boolean
                          allowed_topics:
                            type: array
                            items:
                              type: string
                        required:
                          - brand_voice
                          - primary_model
                          - fallback_model
                          - temperature
                          - booking_handoff_enabled
                          - allowed_topics
                        additionalProperties: false
                    required:
                      - answer
                      - grounded_facts
                      - suggestions
                      - config_summary
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/advisor/sessions/{id}/messages:
    post:
      summary: "Append user message and assistant answer to advisor session"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  minLength: 2
                  maxLength: 1000
              required:
                - message
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      answer:
                        type: string
                      grounded_facts:
                        type: array
                        items:
                          type: string
                      suggestions:
                        type: array
                        items:
                          type: object
                          properties:
                            label:
                              type: string
                            href:
                              type: string
                          required:
                            - label
                            - href
                          additionalProperties: false
                      handoff_recommended:
                        type: boolean
                        default: false
                      config_summary:
                        type: object
                        properties:
                          brand_voice:
                            type: string
                          primary_model:
                            type: string
                          fallback_model:
                            type: string
                          temperature:
                            type: number
                          booking_handoff_enabled:
                            type: boolean
                          allowed_topics:
                            type: array
                            items:
                              type: string
                        required:
                          - brand_voice
                          - primary_model
                          - fallback_model
                          - temperature
                          - booking_handoff_enabled
                          - allowed_topics
                        additionalProperties: false
                    required:
                      - answer
                      - grounded_facts
                      - suggestions
                      - config_summary
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/advisor/sessions/{id}/handoff:
    post:
      summary: "Request human handoff for an advisor session"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contact_name:
                  type: string
                  minLength: 1
                  maxLength: 120
                contact_email:
                  type: string
                  format: email
                message:
                  type: string
                  minLength: 4
                  maxLength: 1000
              required:
                - contact_email
                - message
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      ai_handoff_request_id:
                        type: string
                        format: uuid
                      state:
                        type: string
                        enum:
                          - pending
                      requested_at:
                        type: string
                    required:
                      - ai_handoff_request_id
                      - state
                      - requested_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/quotes:
    post:
      operationId: createQuote
      summary: "Create a deterministic price quote for a stay"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                hotel_id:
                  type: string
                  format: uuid
                room_type_id:
                  type: string
                  format: uuid
                rate_plan_id:
                  type: string
                  format: uuid
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                  pattern: "^[A-Z]{3}$"
                stay:
                  type: object
                  properties:
                    check_in:
                      type: string
                      pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                    check_out:
                      type: string
                      pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                  required:
                    - check_in
                    - check_out
                  additionalProperties: false
                guests:
                  type: object
                  properties:
                    adults:
                      type: integer
                      minimum: 1
                      maximum: 20
                    children:
                      type: array
                      items:
                        type: object
                        properties:
                          age:
                            type: integer
                            minimum: 0
                            maximum: 17
                        required:
                          - age
                        additionalProperties: false
                      default:
[]
                  required:
                    - adults
                  additionalProperties: false
              required:
                - hotel_id
                - room_type_id
                - rate_plan_id
                - stay
                - guests
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      quote_id:
                        type: string
                        minLength: 1
                      hotel_id:
                        type: string
                        format: uuid
                      availability:
                        type: string
                        enum:
                          - available
                          - unavailable
                          - on_request
                      price_breakdown:
                        type: object
                        properties:
                          nights:
                            type: integer
                            exclusiveMinimum: true
                            minimum: 0
                          base:
                            type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 0
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                          taxes:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                amount:
                                  type: integer
                                  minimum: 0
                                rate_pct:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - name
                                - amount
                              additionalProperties: false
                          service_charge:
                            type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 0
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                          fees:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                amount:
                                  type: integer
                                  minimum: 0
                              required:
                                - name
                                - amount
                              additionalProperties: false
                          discounts:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                amount:
                                  type: integer
                                  minimum: 0
                              required:
                                - name
                                - amount
                              additionalProperties: false
                          total:
                            type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 0
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                        required:
                          - nights
                          - base
                          - taxes
                          - fees
                          - discounts
                          - total
                        additionalProperties: false
                      fx:
                        type: object
                        properties:
                          base_currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                          quote_currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                          rate:
                            type: number
                            exclusiveMinimum: true
                            minimum: 0
                          source:
                            type: string
                          fetched_at:
                            type: string
                            format: date-time
                        required:
                          - base_currency
                          - quote_currency
                          - rate
                          - source
                          - fetched_at
                        additionalProperties: false
                        nullable: true
                      policy_snapshot:
                        type: object
                        properties:
                          policy_version:
                            type: string
                          cancellation:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - flexible
                                  - moderate
                                  - strict
                                  - non_refundable
                              free_until:
                                type: string
                                format: date-time
                                nullable: true
                              fee_after:
                                type: object
                                properties:
                                  amount:
                                    type: integer
                                    minimum: 0
                                  currency:
                                    type: string
                                    minLength: 3
                                    maxLength: 3
                                    pattern: "^[A-Z]{3}$"
                                required:
                                  - amount
                                  - currency
                                additionalProperties: false
                            required:
                              - type
                              - free_until
                              - fee_after
                            additionalProperties: false
                          child_policy:
                            type: string
                        required:
                          - policy_version
                          - cancellation
                        additionalProperties: false
                      expires_at:
                        type: string
                        format: date-time
                    required:
                      - quote_id
                      - hotel_id
                      - availability
                      - price_breakdown
                      - fx
                      - policy_snapshot
                      - expires_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        500:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/quotes/{id}:
    get:
      operationId: getQuote
      summary: "Retrieve a stored quote by id"
      tags:
        - commerce
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      quote_id:
                        type: string
                        minLength: 1
                      hotel_id:
                        type: string
                        format: uuid
                      availability:
                        type: string
                        enum:
                          - available
                          - unavailable
                          - on_request
                      price_breakdown:
                        type: object
                        properties:
                          nights:
                            type: integer
                            exclusiveMinimum: true
                            minimum: 0
                          base:
                            type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 0
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                          taxes:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                amount:
                                  type: integer
                                  minimum: 0
                                rate_pct:
                                  type: number
                                  minimum: 0
                                  maximum: 100
                              required:
                                - name
                                - amount
                              additionalProperties: false
                          service_charge:
                            type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 0
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                          fees:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                amount:
                                  type: integer
                                  minimum: 0
                              required:
                                - name
                                - amount
                              additionalProperties: false
                          discounts:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                amount:
                                  type: integer
                                  minimum: 0
                              required:
                                - name
                                - amount
                              additionalProperties: false
                          total:
                            type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 0
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                        required:
                          - nights
                          - base
                          - taxes
                          - fees
                          - discounts
                          - total
                        additionalProperties: false
                      fx:
                        type: object
                        properties:
                          base_currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                          quote_currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                          rate:
                            type: number
                            exclusiveMinimum: true
                            minimum: 0
                          source:
                            type: string
                          fetched_at:
                            type: string
                            format: date-time
                        required:
                          - base_currency
                          - quote_currency
                          - rate
                          - source
                          - fetched_at
                        additionalProperties: false
                        nullable: true
                      policy_snapshot:
                        type: object
                        properties:
                          policy_version:
                            type: string
                          cancellation:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - flexible
                                  - moderate
                                  - strict
                                  - non_refundable
                              free_until:
                                type: string
                                format: date-time
                                nullable: true
                              fee_after:
                                type: object
                                properties:
                                  amount:
                                    type: integer
                                    minimum: 0
                                  currency:
                                    type: string
                                    minLength: 3
                                    maxLength: 3
                                    pattern: "^[A-Z]{3}$"
                                required:
                                  - amount
                                  - currency
                                additionalProperties: false
                            required:
                              - type
                              - free_until
                              - fee_after
                            additionalProperties: false
                          child_policy:
                            type: string
                        required:
                          - policy_version
                          - cancellation
                        additionalProperties: false
                      expires_at:
                        type: string
                        format: date-time
                    required:
                      - quote_id
                      - hotel_id
                      - availability
                      - price_breakdown
                      - fx
                      - policy_snapshot
                      - expires_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/checkout/methods:
    get:
      operationId: getCheckoutMethods
      summary: "Discover checkout methods for the current locale / currency"
      tags:
        - commerce
      parameters:
        - schema:
            type: string
            minLength: 3
            maxLength: 3
          in: query
          name: currency
          required: true
        - schema:
            type: string
            minLength: 2
            maxLength: 2
          in: query
          name: country
          required: false
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      methods:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              enum:
                                - card
                                - paypal
                                - vnpay
                            label:
                              type: string
                            rank:
                              type: integer
                              minimum: 0
                          required:
                            - code
                            - label
                            - rank
                          additionalProperties: false
                      default_method:
                        type: string
                        enum:
                          - card
                          - paypal
                          - vnpay
                    required:
                      - methods
                      - default_method
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/checkout/paypal/order:
    post:
      operationId: createPaypalOrder
      summary: "Create a PayPal order for booking-web handoff"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                property_id:
                  type: string
                  format: uuid
                amount:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                return_url:
                  type: string
                  format: uri
                cancel_url:
                  type: string
                  format: uri
                reference_id:
                  type: string
                  minLength: 1
                description:
                  type: string
                  minLength: 1
              required:
                - amount
                - currency
                - return_url
                - cancel_url
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      order_id:
                        type: string
                      approve_url:
                        type: string
                        format: uri
                        nullable: true
                      status:
                        type: string
                    required:
                      - order_id
                      - approve_url
                      - status
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/checkout/vnpay/link:
    post:
      operationId: createVnpayLink
      summary: "Create a signed VNPay redirect URL for booking-web handoff"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                property_id:
                  type: string
                  format: uuid
                amount:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                currency:
                  type: string
                  enum:
                    - VND
                return_url:
                  type: string
                  format: uri
                order_info:
                  type: string
                  minLength: 1
                locale:
                  type: string
                  enum:
                    - vn
                    - en
                bank_code:
                  type: string
                  minLength: 1
              required:
                - amount
                - currency
                - return_url
                - order_info
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      txn_ref:
                        type: string
                      redirect_url:
                        type: string
                        format: uri
                    required:
                      - txn_ref
                      - redirect_url
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/holds:
    post:
      operationId: createHold
      summary: "Create a hold against a quote (idempotent)"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                quote_id:
                  type: string
                  minLength: 1
                rooms:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                  default: 1
                idempotency_key:
                  type: string
                  minLength: 1
              required:
                - quote_id
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      hold_id:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        enum:
                          - held
                          - released
                          - consumed
                      expires_at:
                        type: string
                        format: date-time
                    required:
                      - hold_id
                      - state
                      - expires_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        410:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/holds/{id}/release:
    post:
      operationId: releaseHold
      summary: "Release a hold and return inventory to the pool"
      tags:
        - commerce
      description: "Explicitly release a hold before its TTL. Returns a 200 with state=released on success. Idempotent — releasing an already-released hold succeeds as a no-op. Releasing a consumed hold (already booked) returns hold_not_active."
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      hold_id:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        enum:
                          - held
                          - released
                          - consumed
                      released_at:
                        type: string
                        format: date-time
                      quote_id:
                        type: string
                        minLength: 1
                    required:
                      - hold_id
                      - state
                      - released_at
                      - quote_id
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/bookings:
    post:
      operationId: confirmBooking
      summary: "Confirm a booking from a hold (idempotent)"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                hold_id:
                  type: string
                  minLength: 1
                quote_id:
                  type: string
                  minLength: 1
                guest:
                  type: object
                  properties:
                    primary:
                      type: object
                      properties:
                        full_name:
                          type: string
                          minLength: 1
                        email:
                          type: string
                          format: email
                        phone:
                          type: string
                          minLength: 3
                      required:
                        - full_name
                        - email
                        - phone
                      additionalProperties: false
                    additional_guests:
                      type: integer
                      minimum: 0
                      default: 0
                  required:
                    - primary
                  additionalProperties: false
                payment:
                  type: object
                  properties:
                    method:
                      type: string
                      enum:
                        - card
                        - paypal
                        - vnpay
                    provider_token:
                      type: string
                      minLength: 1
                    billing_country:
                      type: string
                      minLength: 2
                      maxLength: 2
                  required:
                    - method
                    - provider_token
                    - billing_country
                  additionalProperties: false
                booking_authorization_id:
                  type: string
                  format: uuid
                delegated_user_context:
                  type: object
                  properties:
                    user_session:
                      type: string
                  required:
                    - user_session
                  additionalProperties: false
                idempotency_key:
                  type: string
                  minLength: 1
              required:
                - hold_id
                - quote_id
                - guest
                - payment
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_id:
                        type: string
                        minLength: 1
                      confirmation_code:
                        type: string
                      state:
                        type: string
                        enum:
                          - pending_payment
                          - confirmed
                          - cancelled
                          - failed
                          - modified
                          - checked_in
                          - checked_out
                          - no_show
                      payment_state:
                        type: string
                        enum:
                          - pending
                          - authorized
                          - captured
                          - voided
                          - failed
                          - partially_refunded
                          - refunded
                          - chargeback
                          - chargeback_lost
                          - chargeback_won
                      policy_version:
                        type: string
                      total:
                        type: object
                        properties:
                          amount:
                            type: integer
                            minimum: 0
                          currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      pms_sync:
                        type: object
                        properties:
                          status:
                            type: string
                            enum:
                              - queued
                              - in_progress
                              - synced
                              - failed
                          attempt:
                            type: integer
                            minimum: 0
                            default: 1
                        required:
                          - status
                        additionalProperties: false
                    required:
                      - booking_id
                      - confirmation_code
                      - state
                      - payment_state
                      - policy_version
                      - total
                      - pms_sync
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        402:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        410:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/bookings/{id}:
    get:
      operationId: getBooking
      summary: "Retrieve a booking by id"
      tags:
        - commerce
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_id:
                        type: string
                        minLength: 1
                      confirmation_code:
                        type: string
                      state:
                        type: string
                        enum:
                          - pending_payment
                          - confirmed
                          - cancelled
                          - failed
                          - modified
                          - checked_in
                          - checked_out
                          - no_show
                      payment_state:
                        type: string
                        enum:
                          - pending
                          - authorized
                          - captured
                          - voided
                          - failed
                          - partially_refunded
                          - refunded
                          - chargeback
                          - chargeback_lost
                          - chargeback_won
                      policy_version:
                        type: string
                      total:
                        type: object
                        properties:
                          amount:
                            type: integer
                            minimum: 0
                          currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      pms_sync:
                        type: object
                        properties:
                          status:
                            type: string
                            enum:
                              - queued
                              - in_progress
                              - synced
                              - failed
                          attempt:
                            type: integer
                            minimum: 0
                            default: 1
                        required:
                          - status
                        additionalProperties: false
                      hold_id:
                        type: string
                        minLength: 1
                      check_in:
                        type: string
                      check_out:
                        type: string
                      rooms:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      guest:
                        type: object
                        properties:
                          primary:
                            type: object
                            properties:
                              full_name:
                                type: string
                                minLength: 1
                              email:
                                type: string
                                format: email
                              phone:
                                type: string
                                minLength: 3
                            required:
                              - full_name
                              - email
                              - phone
                            additionalProperties: false
                          additional_guests:
                            type: integer
                            minimum: 0
                            default: 0
                        required:
                          - primary
                        additionalProperties: false
                      policy_snapshot:
                        type: object
                        properties:
                          policy_version:
                            type: string
                          cancellation:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - flexible
                                  - moderate
                                  - strict
                                  - non_refundable
                              free_until:
                                type: string
                                format: date-time
                                nullable: true
                              fee_after:
                                type: object
                                properties:
                                  amount:
                                    type: integer
                                    minimum: 0
                                  currency:
                                    type: string
                                    minLength: 3
                                    maxLength: 3
                                    pattern: "^[A-Z]{3}$"
                                required:
                                  - amount
                                  - currency
                                additionalProperties: false
                            required:
                              - type
                              - free_until
                              - fee_after
                            additionalProperties: false
                          child_policy:
                            type: string
                        required:
                          - policy_version
                          - cancellation
                        additionalProperties: false
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - booking_id
                      - confirmation_code
                      - state
                      - payment_state
                      - policy_version
                      - total
                      - pms_sync
                      - hold_id
                      - check_in
                      - check_out
                      - rooms
                      - guest
                      - policy_snapshot
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/bookings/{id}/audit:
    get:
      operationId: getBookingAudit
      summary: "Retrieve the event timeline for a booking"
      tags:
        - commerce
      description: "Returns every domain event the platform emitted against this booking, in chronological order. Use this to prove what happened and when — created, confirmed, cancelled, refunded — without needing admin access."
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_id:
                        type: string
                        minLength: 1
                      events:
                        type: array
                        items:
                          type: object
                          properties:
                            at:
                              type: string
                              format: date-time
                            topic:
                              type: string
                            event_type:
                              type: string
                            payload:
                              type: object
                              additionalProperties:
{}
                          required:
                            - at
                            - topic
                            - event_type
                            - payload
                          additionalProperties: false
                    required:
                      - booking_id
                      - events
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/bookings/{id}/cancel:
    post:
      operationId: cancelBooking
      summary: "Cancel a booking and issue a refund per the frozen policy snapshot"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
              additionalProperties: false
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_id:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        enum:
                          - pending_payment
                          - confirmed
                          - cancelled
                          - failed
                          - modified
                          - checked_in
                          - checked_out
                          - no_show
                      cancellation_fee:
                        type: object
                        properties:
                          amount:
                            type: integer
                            minimum: 0
                          currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      refund:
                        type: object
                        properties:
                          refund_id:
                            type: string
                            minLength: 1
                          amount:
                            type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 0
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                          state:
                            type: string
                            enum:
                              - initiated
                              - succeeded
                              - failed
                          expected_completion:
                            type: string
                        required:
                          - refund_id
                          - amount
                          - state
                        additionalProperties: false
                        nullable: true
                      pms_sync:
                        type: object
                        properties:
                          status:
                            type: string
                            enum:
                              - queued
                              - in_progress
                              - synced
                              - failed
                          attempt:
                            type: integer
                            minimum: 0
                            default: 1
                        required:
                          - status
                        additionalProperties: false
                    required:
                      - booking_id
                      - state
                      - cancellation_fee
                      - refund
                      - pms_sync
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/guest-portal/magic-link/request:
    post:
      summary: "Request a guest portal magic link"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                confirmation_code:
                  type: string
                  minLength: 3
              required:
                - email
                - confirmation_code
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      accepted:
                        type: boolean
                        enum:
                          - true
                      expires_in_seconds:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      preview_url:
                        type: string
                        format: uri
                    required:
                      - accepted
                      - expires_in_seconds
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/guest-portal/session:
    get:
      summary: "Verify guest portal session token"
      tags:
        - commerce
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                      confirmation_code:
                        type: string
                    required:
                      - email
                      - confirmation_code
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/guest-portal/bookings:
    get:
      summary: "List bookings for guest portal session"
      tags:
        - commerce
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      guest:
                        type: object
                        properties:
                          email:
                            type: string
                            format: email
                          confirmation_code:
                            type: string
                        required:
                          - email
                          - confirmation_code
                        additionalProperties: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            booking_id:
                              type: string
                            confirmation_code:
                              type: string
                            property_name:
                              type: string
                            state:
                              type: string
                            payment_state:
                              type: string
                            check_in:
                              type: string
                            check_out:
                              type: string
                            total:
                              type: object
                              properties:
                                amount:
                                  type: number
                                currency:
                                  type: string
                              required:
                                - amount
                                - currency
                              additionalProperties: false
                          required:
                            - booking_id
                            - confirmation_code
                            - property_name
                            - state
                            - payment_state
                            - check_in
                            - check_out
                            - total
                          additionalProperties: false
                    required:
                      - guest
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/guest-portal/bookings/{id}:
    get:
      summary: "Get one booking for guest portal session"
      tags:
        - commerce
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_id:
                        type: string
                      confirmation_code:
                        type: string
                      property_name:
                        type: string
                      state:
                        type: string
                      payment_state:
                        type: string
                      check_in:
                        type: string
                      check_out:
                        type: string
                      total:
                        type: object
                        properties:
                          amount:
                            type: number
                          currency:
                            type: string
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      guest:
                        type: object
                        properties:
                          primary:
                            type: object
                            properties:
                              full_name:
                                type: string
                              email:
                                type: string
                                format: email
                              phone:
                                type: string
                            required:
                              - full_name
                              - email
                              - phone
                            additionalProperties: false
                          additional_guests:
                            type: integer
                            minimum: 0
                        required:
                          - primary
                          - additional_guests
                        additionalProperties: false
                      policy_snapshot:
                        type: object
                        properties:
                          cancellation:
                            type: object
                            properties:
                              type:
                                type: string
                              cutoff_at:
                                type: string
                                nullable: true
                              fee_after_cutoff:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                  currency:
                                    type: string
                                required:
                                  - amount
                                  - currency
                                additionalProperties: false
                            required:
                              - type
                              - cutoff_at
                              - fee_after_cutoff
                            additionalProperties: false
                        required:
                          - cancellation
                        additionalProperties: false
                      requests:
                        type: array
                        items:
                          type: object
                          properties:
                            guest_request_id:
                              type: string
                              format: uuid
                            type:
                              type: string
                              enum:
                                - late_check_in
                                - airport_transfer
                                - special_request
                            message:
                              type: string
                            state:
                              type: string
                              enum:
                                - pending
                                - resolved
                            created_at:
                              type: string
                            resolved_at:
                              type: string
                              nullable: true
                            resolved_by:
                              type: string
                              nullable: true
                            resolution_notes:
                              type: string
                              nullable: true
                          required:
                            - guest_request_id
                            - type
                            - message
                            - state
                            - created_at
                            - resolved_at
                            - resolved_by
                            - resolution_notes
                          additionalProperties: false
                    required:
                      - booking_id
                      - confirmation_code
                      - property_name
                      - state
                      - payment_state
                      - check_in
                      - check_out
                      - total
                      - guest
                      - policy_snapshot
                      - requests
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/guest-portal/bookings/{id}/modify:
    post:
      summary: "Modify stay dates from the guest portal session"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                check_in:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                check_out:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
              required:
                - check_in
                - check_out
              additionalProperties: false
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_id:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        enum:
                          - pending_payment
                          - confirmed
                          - cancelled
                          - failed
                          - modified
                          - checked_in
                          - checked_out
                          - no_show
                      previous_total:
                        type: object
                        properties:
                          amount:
                            type: integer
                            minimum: 0
                          currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      total:
                        type: object
                        properties:
                          amount:
                            type: integer
                            minimum: 0
                          currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      check_in:
                        type: string
                      check_out:
                        type: string
                      policy_version:
                        type: string
                      pms_sync:
                        type: object
                        properties:
                          status:
                            type: string
                            enum:
                              - queued
                              - in_progress
                              - synced
                              - failed
                          attempt:
                            type: integer
                            minimum: 0
                            default: 1
                        required:
                          - status
                        additionalProperties: false
                    required:
                      - booking_id
                      - state
                      - previous_total
                      - total
                      - check_in
                      - check_out
                      - policy_version
                      - pms_sync
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/guest-portal/bookings/{id}/requests:
    post:
      summary: "Create a guest request from the guest portal session"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - late_check_in
                    - airport_transfer
                    - special_request
                message:
                  type: string
                  minLength: 3
                  maxLength: 1000
              required:
                - type
                - message
              additionalProperties: false
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      guest_request_id:
                        type: string
                        format: uuid
                      booking_id:
                        type: string
                      type:
                        type: string
                        enum:
                          - late_check_in
                          - airport_transfer
                          - special_request
                      state:
                        type: string
                        enum:
                          - pending
                      created_at:
                        type: string
                    required:
                      - guest_request_id
                      - booking_id
                      - type
                      - state
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/guest-portal/bookings/{id}/cancel:
    post:
      summary: "Cancel one booking from the guest portal session"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
              additionalProperties: false
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      result:
                        type: object
                        properties:
                          booking_id:
                            type: string
                            minLength: 1
                          state:
                            type: string
                            enum:
                              - pending_payment
                              - confirmed
                              - cancelled
                              - failed
                              - modified
                              - checked_in
                              - checked_out
                              - no_show
                          cancellation_fee:
                            type: object
                            properties:
                              amount:
                                type: integer
                                minimum: 0
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                          refund:
                            type: object
                            properties:
                              refund_id:
                                type: string
                                minLength: 1
                              amount:
                                type: object
                                properties:
                                  amount:
                                    type: integer
                                    minimum: 0
                                  currency:
                                    type: string
                                    minLength: 3
                                    maxLength: 3
                                    pattern: "^[A-Z]{3}$"
                                required:
                                  - amount
                                  - currency
                                additionalProperties: false
                              state:
                                type: string
                                enum:
                                  - initiated
                                  - succeeded
                                  - failed
                              expected_completion:
                                type: string
                            required:
                              - refund_id
                              - amount
                              - state
                            additionalProperties: false
                            nullable: true
                          pms_sync:
                            type: object
                            properties:
                              status:
                                type: string
                                enum:
                                  - queued
                                  - in_progress
                                  - synced
                                  - failed
                              attempt:
                                type: integer
                                minimum: 0
                                default: 1
                            required:
                              - status
                            additionalProperties: false
                        required:
                          - booking_id
                          - state
                          - cancellation_fee
                          - refund
                          - pms_sync
                        additionalProperties: false
                    required:
                      - result
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/partner/builder-access-requests:
    post:
      operationId: partnerCreateBuilderAccessRequest
      summary: "Create a builder sandbox or live-access request"
      tags:
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                requested_access:
                  type: string
                  enum:
                    - sandbox
                    - production
                  default: sandbox
                company_name:
                  type: string
                  minLength: 2
                  maxLength: 160
                product_name:
                  type: string
                  minLength: 2
                  maxLength: 160
                contact_name:
                  type: string
                  minLength: 2
                  maxLength: 120
                contact_email:
                  type: string
                  format: email
                website_url:
                  type: string
                  format: uri
                integration_type:
                  type: string
                  enum:
                    - agent
                    - travel_assistant
                    - concierge
                    - internal_tool
                    - other
                geography:
                  type: string
                  minLength: 2
                  maxLength: 160
                volume_band:
                  type: string
                  enum:
                    - under_1k
                    - 1k_to_10k
                    - 10k_to_50k
                    - over_50k
                runtime:
                  type: string
                  maxLength: 160
                use_case_summary:
                  type: string
                  minLength: 12
                  maxLength: 2000
                needs_live_booking:
                  type: boolean
                  default: false
                notes:
                  type: string
                  maxLength: 1000
              required:
                - company_name
                - product_name
                - contact_name
                - contact_email
                - integration_type
                - volume_band
                - use_case_summary
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      request_id:
                        type: string
                        format: uuid
                      requested_access:
                        type: string
                        enum:
                          - sandbox
                          - production
                      status:
                        type: string
                        enum:
                          - sandbox_requested
                          - sandbox_active
                          - live_review
                          - live_active
                          - suspended
                          - rejected
                      submitted_at:
                        type: string
                        format: date-time
                      next_step:
                        type: string
                    required:
                      - request_id
                      - requested_access
                      - status
                      - submitted_at
                      - next_step
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/partner/register-hotel:
    post:
      operationId: partnerRegisterHotel
      summary: "Register a hotel partner and create its first draft property"
      tags:
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_name:
                  type: string
                  minLength: 2
                  maxLength: 160
                hotel_name:
                  type: string
                  minLength: 2
                  maxLength: 200
                contact_name:
                  type: string
                  minLength: 2
                  maxLength: 120
                contact_email:
                  type: string
                  format: email
                contact_phone:
                  type: string
                  minLength: 6
                  maxLength: 40
                website_url:
                  type: string
                  format: uri
                brand:
                  type: string
                  maxLength: 120
                city:
                  type: string
                  minLength: 1
                  maxLength: 120
                region:
                  type: string
                  maxLength: 120
                country:
                  type: string
                  minLength: 2
                  maxLength: 2
                  default: VN
                address_line1:
                  type: string
                  minLength: 1
                  maxLength: 200
                address_line2:
                  type: string
                  maxLength: 200
                postal_code:
                  type: string
                  maxLength: 32
                default_currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                  default: VND
                timezone:
                  type: string
                  minLength: 3
                  default: Asia/Ho_Chi_Minh
                pms_vendor:
                  type: string
                  enum:
                    - smile
                    - cloudbeds
                    - other
                notes:
                  type: string
                  maxLength: 1000
              required:
                - company_name
                - hotel_name
                - contact_name
                - contact_email
                - city
                - address_line1
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      tenant_id:
                        type: string
                        format: uuid
                      tenant_slug:
                        type: string
                      property_id:
                        type: string
                        format: uuid
                      property_slug:
                        type: string
                      property_status:
                        type: string
                        enum:
                          - draft
                      operator_user_id:
                        type: string
                        format: uuid
                      operator_email:
                        type: string
                        format: email
                      operator_roles:
                        type: array
                        items:
                          type: string
                      operator_login_url:
                        type: string
                        format: uri
                      next_step:
                        type: string
                    required:
                      - tenant_id
                      - tenant_slug
                      - property_id
                      - property_slug
                      - property_status
                      - operator_user_id
                      - operator_email
                      - operator_roles
                      - next_step
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/admin/auth/magic-link/request:
    post:
      operationId: requestAdminMagicLink
      summary: "Request a hotel portal operator magic link"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                tenant_id:
                  type: string
                  format: uuid
                tenant_slug:
                  type: string
                  minLength: 2
                  maxLength: 160
                next_path:
                  type: string
                  minLength: 1
                  default: /onboarding
              required:
                - email
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      accepted:
                        type: boolean
                        enum:
                          - true
                      expires_in_seconds:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      preview_url:
                        type: string
                        format: uri
                      tenant_id:
                        type: string
                        format: uuid
                      operator_email:
                        type: string
                        format: email
                    required:
                      - accepted
                      - expires_in_seconds
                      - tenant_id
                      - operator_email
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/auth/magic-link/consume:
    post:
      operationId: consumeAdminMagicLink
      summary: "Consume a hotel portal operator magic link and create an admin session"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  minLength: 20
              required:
                - token
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      session_id:
                        type: string
                        format: uuid
                      tenant_id:
                        type: string
                        format: uuid
                      user_id:
                        type: string
                        format: uuid
                      email:
                        type: string
                        format: email
                      display_name:
                        type: string
                        nullable: true
                      roles:
                        type: array
                        items:
                          type: string
                      expires_at:
                        type: string
                      next_path:
                        type: string
                    required:
                      - session_id
                      - tenant_id
                      - user_id
                      - email
                      - display_name
                      - roles
                      - expires_at
                      - next_path
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        400:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/webhooks/stripe:
    post:
      summary: "Receive Stripe webhook events and reconcile payment state"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
{}
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      received:
                        type: boolean
                        enum:
                          - true
                      event_id:
                        type: string
                      event_type:
                        type: string
                      reconciled:
                        type: boolean
                    required:
                      - received
                      - event_id
                      - event_type
                      - reconciled
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/webhooks/paypal:
    post:
      summary: "Receive PayPal webhook events and reconcile payment state"
      tags:
        - commerce
      requestBody:
        required: true
        content:
          application/json:
            schema:
{}
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      received:
                        type: boolean
                        enum:
                          - true
                      event_id:
                        type: string
                      event_type:
                        type: string
                      reconciled:
                        type: boolean
                    required:
                      - received
                      - event_id
                      - event_type
                      - reconciled
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/webhooks/vnpay:
    get:
      summary: "Receive VNPay IPN callbacks and reconcile payment state"
      tags:
        - commerce
      parameters:
        - schema: object
          in: query
          name: type
          required: null
        - schema:
            anyOf:
              - not:
{}
              - anyOf:
                  - type: string
                  - type: array
                    items:
                      type: string
          in: query
          name: additionalProperties
          required: null
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  RspCode:
                    type: string
                  Message:
                    type: string
                required:
                  - RspCode
                  - Message
                additionalProperties: false
        401:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/receipts/verify:
    post:
      operationId: verifyReceipt
      summary: "Verify a signed response receipt"
      tags:
        - discovery
      description: "Returns `valid: true` if the receipt was issued by this service and has not been tampered with. Supply the original envelope `data` as `payload` to additionally verify it has not drifted from the signed content."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                receipt:
                  type: object
                  properties:
                    kind:
                      type: string
                      enum:
                        - booking_confirmed
                        - booking_cancelled
                        - refund_issued
                    issuer:
                      type: string
                    issued_at:
                      type: string
                    subject:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                    payload_hash:
                      type: string
                      pattern: "^sha256:[0-9a-f]{64}$"
                    algorithm:
                      type: string
                      enum:
                        - HS256
                    kid:
                      type: string
                      default: receipt-v1
                    signature:
                      type: string
                      minLength: 1
                  required:
                    - kind
                    - issuer
                    - issued_at
                    - subject
                    - payload_hash
                    - algorithm
                    - signature
                  additionalProperties: false
                payload:
{}
              required:
                - receipt
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      valid:
                        type: boolean
                      reason:
                        type: string
                        enum:
                          - bad_signature
                          - payload_mismatch
                          - unknown_kid
                          - bad_algorithm
                        nullable: true
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      issued_at:
                        type: string
                      issuer:
                        type: string
                    required:
                      - valid
                      - reason
                      - kind
                      - subject
                      - issued_at
                      - issuer
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/ai/settings:
    get:
      summary: "Get tenant AI advisor settings"
      tags:
        - admin
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      system_prompt:
                        type: string
                        minLength: 1
                        maxLength: 4000
                      brand_voice:
                        type: string
                        minLength: 1
                        maxLength: 240
                      primary_model:
                        type: string
                        minLength: 3
                        maxLength: 120
                      fallback_model:
                        type: string
                        minLength: 3
                        maxLength: 120
                      temperature:
                        type: number
                        minimum: 0
                        maximum: 2
                      allowed_topics:
                        type: array
                        items:
                          type: string
                          minLength: 1
                          maxLength: 80
                      disallowed_claims:
                        type: array
                        items:
                          type: string
                          minLength: 1
                          maxLength: 120
                      booking_handoff_enabled:
                        type: boolean
                      updated_at:
                        type: string
                        format: date-time
                      updated_by:
                        type: string
                        nullable: true
                    required:
                      - system_prompt
                      - brand_voice
                      - primary_model
                      - fallback_model
                      - temperature
                      - allowed_topics
                      - disallowed_claims
                      - booking_handoff_enabled
                      - updated_at
                      - updated_by
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    put:
      summary: "Update tenant AI advisor settings"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                system_prompt:
                  type: string
                  minLength: 1
                  maxLength: 4000
                brand_voice:
                  type: string
                  minLength: 1
                  maxLength: 240
                primary_model:
                  type: string
                  minLength: 3
                  maxLength: 120
                fallback_model:
                  type: string
                  minLength: 3
                  maxLength: 120
                temperature:
                  type: number
                  minimum: 0
                  maximum: 2
                allowed_topics:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 80
                  maxItems: 20
                disallowed_claims:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 120
                  maxItems: 20
                booking_handoff_enabled:
                  type: boolean
                updated_by:
                  type: string
                  minLength: 1
                  maxLength: 120
              required:
                - system_prompt
                - brand_voice
                - primary_model
                - fallback_model
                - temperature
                - allowed_topics
                - disallowed_claims
                - booking_handoff_enabled
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      system_prompt:
                        type: string
                        minLength: 1
                        maxLength: 4000
                      brand_voice:
                        type: string
                        minLength: 1
                        maxLength: 240
                      primary_model:
                        type: string
                        minLength: 3
                        maxLength: 120
                      fallback_model:
                        type: string
                        minLength: 3
                        maxLength: 120
                      temperature:
                        type: number
                        minimum: 0
                        maximum: 2
                      allowed_topics:
                        type: array
                        items:
                          type: string
                          minLength: 1
                          maxLength: 80
                      disallowed_claims:
                        type: array
                        items:
                          type: string
                          minLength: 1
                          maxLength: 120
                      booking_handoff_enabled:
                        type: boolean
                      updated_at:
                        type: string
                        format: date-time
                      updated_by:
                        type: string
                        nullable: true
                    required:
                      - system_prompt
                      - brand_voice
                      - primary_model
                      - fallback_model
                      - temperature
                      - allowed_topics
                      - disallowed_claims
                      - booking_handoff_enabled
                      - updated_at
                      - updated_by
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/ai/test:
    post:
      summary: "Run a grounded advisor test against a property slug"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                property_slug:
                  type: string
                  minLength: 1
                  maxLength: 120
                message:
                  type: string
                  minLength: 2
                  maxLength: 1000
              required:
                - property_slug
                - message
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      answer:
                        type: string
                      grounded_facts:
                        type: array
                        items:
                          type: string
                      suggestions:
                        type: array
                        items:
                          type: object
                          properties:
                            label:
                              type: string
                            href:
                              type: string
                          required:
                            - label
                            - href
                          additionalProperties: false
                      handoff_recommended:
                        type: boolean
                        default: false
                      config_summary:
                        type: object
                        properties:
                          brand_voice:
                            type: string
                          primary_model:
                            type: string
                          fallback_model:
                            type: string
                          temperature:
                            type: number
                          booking_handoff_enabled:
                            type: boolean
                          allowed_topics:
                            type: array
                            items:
                              type: string
                        required:
                          - brand_voice
                          - primary_model
                          - fallback_model
                          - temperature
                          - booking_handoff_enabled
                          - allowed_topics
                        additionalProperties: false
                    required:
                      - answer
                      - grounded_facts
                      - suggestions
                      - config_summary
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/admin/ai/metrics:
    get:
      summary: "Aggregate AI model usage and estimated cost"
      tags:
        - admin
      parameters:
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 90
            default: 7
          in: query
          name: days
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      days:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      total_calls:
                        type: integer
                        minimum: 0
                      total_cost_usd:
                        type: number
                        minimum: 0
                      total_prompt_tokens:
                        type: integer
                        minimum: 0
                      total_completion_tokens:
                        type: integer
                        minimum: 0
                      fallback_count:
                        type: integer
                        minimum: 0
                      by_model:
                        type: array
                        items:
                          type: object
                          properties:
                            model_used:
                              type: string
                            calls:
                              type: integer
                              minimum: 0
                            fallback_count:
                              type: integer
                              minimum: 0
                            cost_usd:
                              type: number
                              minimum: 0
                            prompt_tokens:
                              type: integer
                              minimum: 0
                            completion_tokens:
                              type: integer
                              minimum: 0
                          required:
                            - model_used
                            - calls
                            - fallback_count
                            - cost_usd
                            - prompt_tokens
                            - completion_tokens
                          additionalProperties: false
                    required:
                      - days
                      - total_calls
                      - total_cost_usd
                      - total_prompt_tokens
                      - total_completion_tokens
                      - fallback_count
                      - by_model
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/ai/eval:
    post:
      summary: "Run the shipped advisor eval corpus against a property"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                property_slug:
                  type: string
                  minLength: 1
                  maxLength: 120
              required:
                - property_slug
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_slug:
                        type: string
                      cases:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      passed:
                        type: integer
                        minimum: 0
                      score_pct:
                        type: number
                        minimum: 0
                        maximum: 100
                      details:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            message:
                              type: string
                            passed:
                              type: boolean
                            missing_terms:
                              type: array
                              items:
                                type: string
                          required:
                            - id
                            - message
                            - passed
                            - missing_terms
                          additionalProperties: false
                    required:
                      - property_slug
                      - cases
                      - passed
                      - score_pct
                      - details
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/admin/bookings:
    get:
      summary: "List bookings with filters"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            enum:
              - pending_payment
              - confirmed
              - cancelled
              - failed
              - modified
              - checked_in
              - checked_out
              - no_show
          in: query
          name: state
          required: false
        - schema:
            type: string
            enum:
              - pending
              - authorized
              - captured
              - voided
              - failed
              - partially_refunded
              - refunded
              - chargeback
              - chargeback_lost
              - chargeback_won
          in: query
          name: payment_state
          required: false
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: check_in_from
          required: false
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: check_in_to
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            booking_id:
                              type: string
                              minLength: 1
                            confirmation_code:
                              type: string
                            state:
                              type: string
                              enum:
                                - pending_payment
                                - confirmed
                                - cancelled
                                - failed
                                - modified
                                - checked_in
                                - checked_out
                                - no_show
                            payment_state:
                              type: string
                              enum:
                                - pending
                                - authorized
                                - captured
                                - voided
                                - failed
                                - partially_refunded
                                - refunded
                                - chargeback
                                - chargeback_lost
                                - chargeback_won
                            payment_provider:
                              type: string
                              nullable: true
                            payment_provider_ref:
                              type: string
                              nullable: true
                            payment_fx_snapshot:
                              type: object
                              properties:
                                base_currency:
                                  type: string
                                  minLength: 3
                                  maxLength: 3
                                  pattern: "^[A-Z]{3}$"
                                quote_currency:
                                  type: string
                                  minLength: 3
                                  maxLength: 3
                                  pattern: "^[A-Z]{3}$"
                                rate:
                                  type: number
                                  exclusiveMinimum: true
                                  minimum: 0
                                source:
                                  type: string
                                fetched_at:
                                  type: string
                                  format: date-time
                              required:
                                - base_currency
                                - quote_currency
                                - rate
                                - source
                                - fetched_at
                              additionalProperties: false
                              nullable: true
                            payment_fx_drift:
                              type: boolean
                            property_id:
                              type: string
                              format: uuid
                            check_in:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            check_out:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            guest_name:
                              type: string
                            total:
                              type: object
                              properties:
                                amount:
                                  type: integer
                                  minimum: 0
                                currency:
                                  type: string
                                  minLength: 3
                                  maxLength: 3
                                  pattern: "^[A-Z]{3}$"
                              required:
                                - amount
                                - currency
                              additionalProperties: false
                            created_at:
                              type: string
                              format: date-time
                          required:
                            - booking_id
                            - confirmation_code
                            - state
                            - payment_state
                            - payment_provider
                            - payment_provider_ref
                            - payment_fx_snapshot
                            - payment_fx_drift
                            - property_id
                            - check_in
                            - check_out
                            - guest_name
                            - total
                            - created_at
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/bookings/{id}:
    get:
      summary: "Get booking detail with payments, refunds, and event timeline"
      tags:
        - admin
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_id:
                        type: string
                        minLength: 1
                      confirmation_code:
                        type: string
                      state:
                        type: string
                        enum:
                          - pending_payment
                          - confirmed
                          - cancelled
                          - failed
                          - modified
                          - checked_in
                          - checked_out
                          - no_show
                      payment_state:
                        type: string
                        enum:
                          - pending
                          - authorized
                          - captured
                          - voided
                          - failed
                          - partially_refunded
                          - refunded
                          - chargeback
                          - chargeback_lost
                          - chargeback_won
                      property_id:
                        type: string
                        format: uuid
                      room_type_id:
                        type: string
                        format: uuid
                      check_in:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      check_out:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      rooms:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      guest:
                        type: object
                        additionalProperties:
{}
                      policy_version:
                        type: string
                      policy_snapshot:
                        type: object
                        additionalProperties:
{}
                      total:
                        type: object
                        properties:
                          amount:
                            type: integer
                            minimum: 0
                          currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      payment:
                        type: object
                        properties:
                          payment_id:
                            type: string
                          state:
                            type: string
                            enum:
                              - pending
                              - authorized
                              - captured
                              - voided
                              - failed
                              - partially_refunded
                              - refunded
                              - chargeback
                              - chargeback_lost
                              - chargeback_won
                          provider:
                            type: string
                          provider_ref:
                            type: string
                            nullable: true
                          refunded_amount:
                            type: integer
                            minimum: 0
                          fx_snapshot:
                            type: object
                            properties:
                              base_currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                              quote_currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: "^[A-Z]{3}$"
                              rate:
                                type: number
                                exclusiveMinimum: true
                                minimum: 0
                              source:
                                type: string
                              fetched_at:
                                type: string
                                format: date-time
                            required:
                              - base_currency
                              - quote_currency
                              - rate
                              - source
                              - fetched_at
                            additionalProperties: false
                            nullable: true
                        required:
                          - payment_id
                          - state
                          - provider
                          - provider_ref
                          - refunded_amount
                          - fx_snapshot
                        additionalProperties: false
                        nullable: true
                      refunds:
                        type: array
                        items:
                          type: object
                          properties:
                            refund_id:
                              type: string
                              minLength: 1
                            amount:
                              type: object
                              properties:
                                amount:
                                  type: integer
                                  minimum: 0
                                currency:
                                  type: string
                                  minLength: 3
                                  maxLength: 3
                                  pattern: "^[A-Z]{3}$"
                              required:
                                - amount
                                - currency
                              additionalProperties: false
                            state:
                              type: string
                              enum:
                                - initiated
                                - succeeded
                                - failed
                            reason:
                              type: string
                              nullable: true
                            created_at:
                              type: string
                              format: date-time
                          required:
                            - refund_id
                            - amount
                            - state
                            - reason
                            - created_at
                          additionalProperties: false
                      timeline:
                        type: array
                        items:
                          type: object
                          properties:
                            at:
                              type: string
                              format: date-time
                            topic:
                              type: string
                            event_type:
                              type: string
                            payload:
                              type: object
                              additionalProperties:
{}
                          required:
                            - at
                            - topic
                            - event_type
                            - payload
                          additionalProperties: false
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      cancelled_at:
                        type: string
                        format: date-time
                        nullable: true
                    required:
                      - booking_id
                      - confirmation_code
                      - state
                      - payment_state
                      - property_id
                      - room_type_id
                      - check_in
                      - check_out
                      - rooms
                      - guest
                      - policy_version
                      - policy_snapshot
                      - total
                      - payment
                      - refunds
                      - timeline
                      - created_at
                      - updated_at
                      - cancelled_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/bookings/{id}/refund:
    post:
      summary: "Issue a manual refund against a captured payment"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                reason:
                  type: string
                  minLength: 1
                approved_by:
                  type: string
                  minLength: 1
              required:
                - amount
                - reason
                - approved_by
              additionalProperties: false
      parameters:
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      refund_id:
                        type: string
                        minLength: 1
                      booking_id:
                        type: string
                        minLength: 1
                      amount:
                        type: object
                        properties:
                          amount:
                            type: integer
                            minimum: 0
                          currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: "^[A-Z]{3}$"
                        required:
                          - amount
                          - currency
                        additionalProperties: false
                      state:
                        type: string
                        enum:
                          - initiated
                          - succeeded
                          - failed
                      payment_state:
                        type: string
                        enum:
                          - pending
                          - authorized
                          - captured
                          - voided
                          - failed
                          - partially_refunded
                          - refunded
                          - chargeback
                          - chargeback_lost
                          - chargeback_won
                    required:
                      - refund_id
                      - booking_id
                      - amount
                      - state
                      - payment_state
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/operations/guest-requests:
    get:
      summary: "List guest self-service requests for staff follow-up"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
        - schema:
            type: string
            enum:
              - pending
              - resolved
          in: query
          name: state
          required: false
        - schema:
            type: string
            enum:
              - late_check_in
              - airport_transfer
              - special_request
          in: query
          name: type
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            guest_request_id:
                              type: string
                              format: uuid
                            property_id:
                              type: string
                              format: uuid
                            booking_id:
                              type: string
                              minLength: 1
                            confirmation_code:
                              type: string
                            property_name:
                              type: string
                            guest_name:
                              type: string
                            requested_by_email:
                              type: string
                              format: email
                            type:
                              type: string
                              enum:
                                - late_check_in
                                - airport_transfer
                                - special_request
                            message:
                              type: string
                            state:
                              type: string
                              enum:
                                - pending
                                - resolved
                            created_at:
                              type: string
                              format: date-time
                            resolved_at:
                              type: string
                              format: date-time
                              nullable: true
                            resolved_by:
                              type: string
                              nullable: true
                            resolution_notes:
                              type: string
                              nullable: true
                          required:
                            - guest_request_id
                            - property_id
                            - booking_id
                            - confirmation_code
                            - property_name
                            - guest_name
                            - requested_by_email
                            - type
                            - message
                            - state
                            - created_at
                            - resolved_at
                            - resolved_by
                            - resolution_notes
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/operations/guest-requests/{id}/resolve:
    post:
      summary: "Resolve a guest self-service request"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                resolved_by:
                  type: string
                  minLength: 1
                  maxLength: 120
                resolution_notes:
                  type: string
                  maxLength: 500
              required:
                - resolved_by
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      guest_request_id:
                        type: string
                        format: uuid
                      state:
                        type: string
                        enum:
                          - pending
                          - resolved
                      resolved_at:
                        type: string
                        format: date-time
                      resolved_by:
                        type: string
                    required:
                      - guest_request_id
                      - state
                      - resolved_at
                      - resolved_by
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/operations/ai-handoffs:
    get:
      summary: "List advisor human handoff requests"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
        - schema:
            type: string
            enum:
              - pending
              - resolved
          in: query
          name: state
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            ai_handoff_request_id:
                              type: string
                              format: uuid
                            session_id:
                              type: string
                              format: uuid
                            property_id:
                              type: string
                              format: uuid
                            property_name:
                              type: string
                            contact_name:
                              type: string
                              nullable: true
                            contact_email:
                              type: string
                              format: email
                            message:
                              type: string
                            state:
                              type: string
                              enum:
                                - pending
                                - resolved
                            requested_at:
                              type: string
                              format: date-time
                            resolved_at:
                              type: string
                              format: date-time
                              nullable: true
                            resolved_by:
                              type: string
                              nullable: true
                            resolution_notes:
                              type: string
                              nullable: true
                          required:
                            - ai_handoff_request_id
                            - session_id
                            - property_id
                            - property_name
                            - contact_name
                            - contact_email
                            - message
                            - state
                            - requested_at
                            - resolved_at
                            - resolved_by
                            - resolution_notes
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/operations/ai-handoffs/{id}/resolve:
    post:
      summary: "Resolve an advisor human handoff request"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                resolved_by:
                  type: string
                  minLength: 1
                  maxLength: 120
                resolution_notes:
                  type: string
                  maxLength: 500
              required:
                - resolved_by
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      ai_handoff_request_id:
                        type: string
                        format: uuid
                      state:
                        type: string
                        enum:
                          - pending
                          - resolved
                      resolved_at:
                        type: string
                        format: date-time
                      resolved_by:
                        type: string
                    required:
                      - ai_handoff_request_id
                      - state
                      - resolved_at
                      - resolved_by
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/admin/operations/reentry:
    get:
      summary: "List booking reentry tasks for staff follow-up"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
        - schema:
            type: string
            enum:
              - pending
              - confirmed
          in: query
          name: state
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            reentry_task_id:
                              type: string
                              format: uuid
                            property_id:
                              type: string
                              format: uuid
                            booking_id:
                              type: string
                              minLength: 1
                            confirmation_code:
                              type: string
                            guest_name:
                              type: string
                            check_in:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            check_out:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            total:
                              type: object
                              properties:
                                amount:
                                  type: integer
                                  minimum: 0
                                currency:
                                  type: string
                                  minLength: 3
                                  maxLength: 3
                                  pattern: "^[A-Z]{3}$"
                              required:
                                - amount
                                - currency
                              additionalProperties: false
                            state:
                              type: string
                              enum:
                                - pending
                                - confirmed
                            created_at:
                              type: string
                              format: date-time
                            confirmed_at:
                              type: string
                              format: date-time
                              nullable: true
                            confirmed_by:
                              type: string
                              nullable: true
                            notes:
                              type: string
                              nullable: true
                            sla_breached:
                              type: boolean
                          required:
                            - reentry_task_id
                            - property_id
                            - booking_id
                            - confirmation_code
                            - guest_name
                            - check_in
                            - check_out
                            - total
                            - state
                            - created_at
                            - confirmed_at
                            - confirmed_by
                            - notes
                            - sla_breached
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/operations/reentry/{id}/confirm:
    post:
      summary: "Confirm a booking reentry task was handled in PMS"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                confirmed_by:
                  type: string
                  minLength: 1
                notes:
                  type: string
                  maxLength: 500
              required:
                - confirmed_by
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      reentry_task_id:
                        type: string
                        format: uuid
                      state:
                        type: string
                        enum:
                          - pending
                          - confirmed
                      confirmed_at:
                        type: string
                        format: date-time
                      confirmed_by:
                        type: string
                    required:
                      - reentry_task_id
                      - state
                      - confirmed_at
                      - confirmed_by
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/operations/oversell:
    get:
      summary: "List open or resolved oversell incidents"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
        - schema:
            type: string
            enum:
              - open
              - resolved
          in: query
          name: state
          required: false
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: from
          required: false
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: to
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            oversell_incident_id:
                              type: string
                              format: uuid
                            property_id:
                              type: string
                              format: uuid
                            room_type_id:
                              type: string
                              format: uuid
                            date:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            state:
                              type: string
                              enum:
                                - open
                                - resolved
                            ceiling:
                              type: integer
                              minimum: 0
                            total_reserved:
                              type: integer
                              minimum: 0
                            over_by:
                              type: integer
                              exclusiveMinimum: true
                              minimum: 0
                            conflict_count:
                              type: integer
                              minimum: 0
                            reported_at:
                              type: string
                              format: date-time
                            reported_by:
                              type: string
                              nullable: true
                            notes:
                              type: string
                              nullable: true
                            resolved_at:
                              type: string
                              format: date-time
                              nullable: true
                            resolved_by:
                              type: string
                              nullable: true
                            resolution_notes:
                              type: string
                              nullable: true
                            snapshot:
                              type: object
                              properties:
                                ceiling_source:
                                  type: string
                                  enum:
                                    - allotment
                                    - inventory_day
                                ceiling:
                                  type: integer
                                  minimum: 0
                                total_reserved:
                                  type: integer
                                  minimum: 0
                                over_by:
                                  type: integer
                                  minimum: 0
                                conflicts:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      kind:
                                        type: string
                                        enum:
                                          - hold
                                          - booking
                                      id:
                                        type: string
                                      code:
                                        type: string
                                        nullable: true
                                      state:
                                        type: string
                                      rooms:
                                        type: integer
                                        exclusiveMinimum: true
                                        minimum: 0
                                      check_in:
                                        type: string
                                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                                      check_out:
                                        type: string
                                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                                    required:
                                      - kind
                                      - id
                                      - code
                                      - state
                                      - rooms
                                      - check_in
                                      - check_out
                                    additionalProperties: false
                              required:
                                - ceiling_source
                                - ceiling
                                - total_reserved
                                - over_by
                                - conflicts
                              additionalProperties: false
                          required:
                            - oversell_incident_id
                            - property_id
                            - room_type_id
                            - date
                            - state
                            - ceiling
                            - total_reserved
                            - over_by
                            - conflict_count
                            - reported_at
                            - reported_by
                            - notes
                            - resolved_at
                            - resolved_by
                            - resolution_notes
                            - snapshot
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/allotment/{property_id}/{date}/{room_type_id}/report-oversell:
    post:
      summary: "Report an oversell incident for a room type / date slot"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reported_by:
                  type: string
                  minLength: 1
                  maxLength: 120
                notes:
                  type: string
                  maxLength: 500
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: property_id
          required: true
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: path
          name: date
          required: true
        - schema:
            type: string
            format: uuid
          in: path
          name: room_type_id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      oversell_incident_id:
                        type: string
                        format: uuid
                      state:
                        type: string
                        enum:
                          - open
                          - resolved
                      over_by:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      conflict_count:
                        type: integer
                        minimum: 0
                    required:
                      - oversell_incident_id
                      - state
                      - over_by
                      - conflict_count
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/operations/oversell/{id}/resolve:
    post:
      summary: "Resolve an oversell incident once manual remediation is complete"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                resolved_by:
                  type: string
                  minLength: 1
                  maxLength: 120
                resolution_notes:
                  type: string
                  maxLength: 500
              required:
                - resolved_by
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      oversell_incident_id:
                        type: string
                        format: uuid
                      state:
                        type: string
                        enum:
                          - open
                          - resolved
                      resolved_at:
                        type: string
                        format: date-time
                      resolved_by:
                        type: string
                    required:
                      - oversell_incident_id
                      - state
                      - resolved_at
                      - resolved_by
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/properties/{id}/inventory:
    get:
      summary: "Property inventory calendar"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: from
          required: true
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: to
          required: true
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      from:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      to:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      days:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            room_type_id:
                              type: string
                              format: uuid
                            available:
                              type: integer
                              minimum: 0
                            stop_sell:
                              type: boolean
                          required:
                            - date
                            - room_type_id
                            - available
                            - stop_sell
                          additionalProperties: false
                    required:
                      - property_id
                      - from
                      - to
                      - days
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    post:
      summary: "Bulk-update inventory availability or stop-sell for a property"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                updates:
                  type: array
                  items:
                    type: object
                    properties:
                      room_type_id:
                        type: string
                        format: uuid
                      date:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      available:
                        type: integer
                        minimum: 0
                      stop_sell:
                        type: boolean
                    required:
                      - room_type_id
                      - date
                    additionalProperties: false
                  minItems: 1
              required:
                - updates
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      updated:
                        type: integer
                    required:
                      - updated
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/properties/{id}/allotment:
    get:
      summary: "Property allotment calendar"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: from
          required: true
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: to
          required: true
        - schema:
            type: string
            format: uuid
          in: query
          name: room_type_id
          required: false
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      from:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      to:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      days:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            room_type_id:
                              type: string
                              format: uuid
                            ceiling:
                              type: integer
                              minimum: 0
                            notes:
                              type: string
                              nullable: true
                            updated_at:
                              type: string
                              format: date-time
                            updated_by:
                              type: string
                              nullable: true
                          required:
                            - date
                            - room_type_id
                            - ceiling
                            - notes
                            - updated_at
                            - updated_by
                          additionalProperties: false
                    required:
                      - property_id
                      - from
                      - to
                      - days
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    put:
      summary: "Bulk upsert allotment ceiling rows for a property"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                updates:
                  type: array
                  items:
                    type: object
                    properties:
                      room_type_id:
                        type: string
                        format: uuid
                      date:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      ceiling:
                        type: integer
                        minimum: 0
                      notes:
                        type: string
                        maxLength: 500
                        nullable: true
                    required:
                      - room_type_id
                      - date
                      - ceiling
                    additionalProperties: false
                  minItems: 1
                updated_by:
                  type: string
                  minLength: 1
                  maxLength: 120
              required:
                - updates
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      updated:
                        type: integer
                        minimum: 0
                    required:
                      - updated
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/integrations/dispatch:
    post:
      summary: "Drain unpublished outbox events for this tenant"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                batch_size:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                  maximum: 500
                  default: 50
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attempted:
                        type: integer
                        minimum: 0
                      published:
                        type: integer
                        minimum: 0
                      failed:
                        type: integer
                        minimum: 0
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            error:
                              type: string
                          required:
                            - id
                            - error
                          additionalProperties: false
                    required:
                      - attempted
                      - published
                      - failed
                      - errors
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/notifications/health:
    get:
      summary: "Notification delivery health for the configured window"
      tags:
        - admin
      parameters:
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 1440
            default: 60
          in: query
          name: window_minutes
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      provider:
                        type: string
                      window_minutes:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      counts:
                        type: object
                        properties:
                          pending:
                            type: integer
                            minimum: 0
                          delivering:
                            type: integer
                            minimum: 0
                          delivered:
                            type: integer
                            minimum: 0
                          failed:
                            type: integer
                            minimum: 0
                          dead_lettered:
                            type: integer
                            minimum: 0
                        required:
                          - pending
                          - delivering
                          - delivered
                          - failed
                          - dead_lettered
                        additionalProperties: false
                      oldest_pending_age_seconds:
                        type: integer
                        minimum: 0
                        nullable: true
                      last_failure_at:
                        type: string
                        nullable: true
                      last_failure_reason:
                        type: string
                        nullable: true
                      status:
                        type: string
                        enum:
                          - healthy
                          - degraded
                          - unhealthy
                    required:
                      - provider
                      - window_minutes
                      - counts
                      - oldest_pending_age_seconds
                      - last_failure_at
                      - last_failure_reason
                      - status
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/content/ingest:
    post:
      summary: "Ingest draft properties from an upstream content source"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source:
                  type: string
                  enum:
                    - osm
                    - foursquare
                    - wikidata
                bbox:
                  type: array
                  minItems: 4
                  maxItems: 4
                  items:
                    - type: number
                    - type: number
                    - type: number
                    - type: number
                country_code:
                  type: string
                  minLength: 2
                  maxLength: 2
                  pattern: "^[A-Z]{2}$"
                limit:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                  maximum: 2000
                  default: 200
                dry_run:
                  type: boolean
                  default: false
              required:
                - source
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      source:
                        type: string
                        enum:
                          - osm
                          - foursquare
                          - wikidata
                      pulled:
                        type: integer
                        minimum: 0
                      inserted:
                        type: integer
                        minimum: 0
                      updated:
                        type: integer
                        minimum: 0
                      linked:
                        type: integer
                        minimum: 0
                        default: 0
                      skipped:
                        type: integer
                        minimum: 0
                      dry_run:
                        type: boolean
                      samples:
                        type: array
                        items:
                          type: object
                          properties:
                            external_id:
                              type: string
                            name:
                              type: string
                            lat:
                              type: number
                            lng:
                              type: number
                            country_code:
                              type: string
                              nullable: true
                          required:
                            - external_id
                            - name
                            - lat
                            - lng
                            - country_code
                          additionalProperties: false
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                        required:
                          - code
                          - message
                        additionalProperties: false
                        nullable: true
                        default: null
                    required:
                      - source
                      - pulled
                      - inserted
                      - updated
                      - skipped
                      - dry_run
                      - samples
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/properties:
    post:
      summary: "Create a draft property for onboarding"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                slug:
                  type: string
                  pattern: "^[a-z0-9-]+$"
                description:
                  type: string
                  maxLength: 5000
                  nullable: true
                address:
                  type: object
                  properties:
                    line1:
                      type: string
                      minLength: 1
                    line2:
                      type: string
                    city:
                      type: string
                      minLength: 1
                    region:
                      type: string
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                    postal_code:
                      type: string
                  required:
                    - line1
                    - city
                    - country
                  additionalProperties: false
                geo:
                  type: object
                  properties:
                    lat:
                      type: number
                    lng:
                      type: number
                  required:
                    - lat
                    - lng
                  additionalProperties: false
                  nullable: true
                default_currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                  default: VND
                timezone:
                  type: string
                  minLength: 1
                  maxLength: 60
                  default: Asia/Ho_Chi_Minh
                website_url:
                  type: string
                  format: uri
                  nullable: true
                brand:
                  type: string
                  maxLength: 120
                  nullable: true
              required:
                - name
                - address
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      slug:
                        type: string
                      name:
                        type: string
                      status:
                        type: string
                        enum:
                          - draft
                          - listed
                          - bookable
                      default_currency:
                        type: string
                      timezone:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - id
                      - slug
                      - name
                      - status
                      - default_currency
                      - timezone
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    get:
      summary: "List properties (all statuses) with filters"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            enum:
              - draft
              - listed
              - bookable
          in: query
          name: status
          required: false
        - schema:
            type: string
            enum:
              - osm
              - foursquare
              - wikidata
              - manual
          in: query
          name: content_source
          required: false
        - schema:
            type: string
            minLength: 1
            maxLength: 80
          in: query
          name: q
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            slug:
                              type: string
                            name:
                              type: string
                            status:
                              type: string
                              enum:
                                - draft
                                - listed
                                - bookable
                            content_source:
                              type: string
                              nullable: true
                            content_external_id:
                              type: string
                              nullable: true
                            content_synced_at:
                              type: string
                              format: date-time
                              nullable: true
                            default_currency:
                              type: string
                            timezone:
                              type: string
                            country_code:
                              type: string
                              nullable: true
                            geo:
                              type: object
                              properties:
                                lat:
                                  type: number
                                lng:
                                  type: number
                              required:
                                - lat
                                - lng
                              additionalProperties: false
                              nullable: true
                            room_type_count:
                              type: integer
                              minimum: 0
                            inventory_day_count:
                              type: integer
                              minimum: 0
                          required:
                            - id
                            - slug
                            - name
                            - status
                            - content_source
                            - content_external_id
                            - content_synced_at
                            - default_currency
                            - timezone
                            - country_code
                            - geo
                            - room_type_count
                            - inventory_day_count
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/properties/{id}:
    get:
      summary: "Admin property detail with promotion readiness hint"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      slug:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      status:
                        type: string
                        enum:
                          - draft
                          - listed
                          - bookable
                      star_rating:
                        type: number
                        nullable: true
                      default_currency:
                        type: string
                      timezone:
                        type: string
                      address:
                        type: object
                        additionalProperties:
{}
                      geo:
                        type: object
                        properties:
                          lat:
                            type: number
                          lng:
                            type: number
                        required:
                          - lat
                          - lng
                        additionalProperties: false
                        nullable: true
                      amenities:
                        type: array
                        items:
                          type: string
                      images:
                        type: array
                        items:
                          type: string
                      phone:
                        type: string
                        nullable: true
                      email:
                        type: string
                        nullable: true
                      website_url:
                        type: string
                        nullable: true
                      brand:
                        type: string
                        nullable: true
                      pets_allowed:
                        type: boolean
                      number_of_rooms:
                        type: number
                        nullable: true
                      checkin_time:
                        type: string
                        nullable: true
                      checkout_time:
                        type: string
                        nullable: true
                      content_source:
                        type: string
                        nullable: true
                      content_external_id:
                        type: string
                        nullable: true
                      content_synced_at:
                        type: string
                        format: date-time
                        nullable: true
                      pms_vendor:
                        type: string
                        enum:
                          - smile
                        nullable: true
                      pms_endpoint:
                        type: string
                        nullable: true
                      pms_api_key_configured:
                        type: boolean
                      pms_api_key_hint:
                        type: string
                        nullable: true
                      pms_sync_enabled:
                        type: boolean
                      pms_property_code:
                        type: string
                        nullable: true
                      channel_manager_property_code:
                        type: string
                        nullable: true
                      payment_methods:
                        type: object
                        properties:
                          card:
                            type: boolean
                          paypal:
                            type: boolean
                          vnpay:
                            type: boolean
                        required:
                          - card
                          - paypal
                          - vnpay
                        additionalProperties: false
                      payment_runtime:
                        type: object
                        properties:
                          stripe:
                            type: object
                            properties:
                              secret_key_configured:
                                type: boolean
                              secret_key_hint:
                                type: string
                                nullable: true
                              api_base_url:
                                type: string
                                nullable: true
                              webhook_secret_configured:
                                type: boolean
                              webhook_secret_hint:
                                type: string
                                nullable: true
                            required:
                              - secret_key_configured
                              - secret_key_hint
                              - api_base_url
                              - webhook_secret_configured
                              - webhook_secret_hint
                            additionalProperties: false
                          paypal:
                            type: object
                            properties:
                              client_id_configured:
                                type: boolean
                              client_id_hint:
                                type: string
                                nullable: true
                              client_secret_configured:
                                type: boolean
                              client_secret_hint:
                                type: string
                                nullable: true
                              api_base_url:
                                type: string
                                nullable: true
                              webhook_id_configured:
                                type: boolean
                              webhook_id_hint:
                                type: string
                                nullable: true
                            required:
                              - client_id_configured
                              - client_id_hint
                              - client_secret_configured
                              - client_secret_hint
                              - api_base_url
                              - webhook_id_configured
                              - webhook_id_hint
                            additionalProperties: false
                          vnpay:
                            type: object
                            properties:
                              tmn_code_configured:
                                type: boolean
                              tmn_code_hint:
                                type: string
                                nullable: true
                              hash_secret_configured:
                                type: boolean
                              hash_secret_hint:
                                type: string
                                nullable: true
                              api_base_url:
                                type: string
                                nullable: true
                            required:
                              - tmn_code_configured
                              - tmn_code_hint
                              - hash_secret_configured
                              - hash_secret_hint
                              - api_base_url
                            additionalProperties: false
                        required:
                          - stripe
                          - paypal
                          - vnpay
                        additionalProperties: false
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      room_types:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            code:
                              type: string
                            name:
                              type: string
                            max_occupancy:
                              type: number
                            default_inventory:
                              type: number
                            rate_plan_count:
                              type: integer
                              minimum: 0
                          required:
                            - id
                            - code
                            - name
                            - max_occupancy
                            - default_inventory
                            - rate_plan_count
                          additionalProperties: false
                      inventory_day_count:
                        type: integer
                        minimum: 0
                      promotable_to_bookable:
                        type: object
                        properties:
                          ok:
                            type: boolean
                          reasons:
                            type: array
                            items:
                              type: string
                        required:
                          - ok
                          - reasons
                        additionalProperties: false
                    required:
                      - id
                      - slug
                      - name
                      - description
                      - status
                      - star_rating
                      - default_currency
                      - timezone
                      - address
                      - geo
                      - amenities
                      - images
                      - phone
                      - email
                      - pets_allowed
                      - number_of_rooms
                      - checkin_time
                      - checkout_time
                      - content_source
                      - content_external_id
                      - content_synced_at
                      - pms_vendor
                      - pms_endpoint
                      - pms_api_key_configured
                      - pms_api_key_hint
                      - pms_sync_enabled
                      - pms_property_code
                      - channel_manager_property_code
                      - payment_methods
                      - payment_runtime
                      - created_at
                      - updated_at
                      - room_types
                      - inventory_day_count
                      - promotable_to_bookable
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    put:
      operationId: adminUpdateProperty
      summary: "Update property profile"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                description:
                  type: string
                  maxLength: 5000
                  nullable: true
                star_rating:
                  type: integer
                  minimum: 1
                  maximum: 5
                  nullable: true
                address:
                  type: object
                  properties:
                    line1:
                      type: string
                      minLength: 1
                    line2:
                      type: string
                    city:
                      type: string
                      minLength: 1
                    region:
                      type: string
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                    postal_code:
                      type: string
                  required:
                    - line1
                    - city
                    - country
                  additionalProperties: false
                geo:
                  type: object
                  properties:
                    lat:
                      type: number
                      minimum: -90
                      maximum: 90
                    lng:
                      type: number
                      minimum: -180
                      maximum: 180
                  required:
                    - lat
                    - lng
                  additionalProperties: false
                  nullable: true
                amenities:
                  type: array
                  items:
                    type: string
                images:
                  type: array
                  items:
                    type: string
                    format: uri
                phone:
                  type: string
                  maxLength: 30
                  nullable: true
                email:
                  type: string
                  format: email
                  nullable: true
                website_url:
                  type: string
                  format: uri
                  nullable: true
                brand:
                  type: string
                  maxLength: 120
                  nullable: true
                pets_allowed:
                  type: boolean
                number_of_rooms:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                  nullable: true
                checkin_time:
                  type: string
                  pattern: "^\\d{2}:\\d{2}$"
                  nullable: true
                checkout_time:
                  type: string
                  pattern: "^\\d{2}:\\d{2}$"
                  nullable: true
                pms_vendor:
                  type: string
                  enum:
                    - smile
                  nullable: true
                pms_endpoint:
                  type: string
                  format: uri
                  nullable: true
                pms_api_key:
                  type: string
                  minLength: 1
                  maxLength: 255
                  nullable: true
                pms_sync_enabled:
                  type: boolean
                pms_property_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                channel_manager_property_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                payment_methods:
                  type: object
                  properties:
                    card:
                      type: boolean
                    paypal:
                      type: boolean
                    vnpay:
                      type: boolean
                  additionalProperties: false
                payment_runtime:
                  type: object
                  properties:
                    stripe:
                      type: object
                      properties:
                        secret_key:
                          type: string
                          minLength: 1
                          maxLength: 255
                          nullable: true
                        api_base_url:
                          type: string
                          format: uri
                          nullable: true
                        webhook_secret:
                          type: string
                          minLength: 1
                          maxLength: 255
                          nullable: true
                      additionalProperties: false
                    paypal:
                      type: object
                      properties:
                        client_id:
                          type: string
                          minLength: 1
                          maxLength: 255
                          nullable: true
                        client_secret:
                          type: string
                          minLength: 1
                          maxLength: 255
                          nullable: true
                        api_base_url:
                          type: string
                          format: uri
                          nullable: true
                        webhook_id:
                          type: string
                          minLength: 1
                          maxLength: 255
                          nullable: true
                      additionalProperties: false
                    vnpay:
                      type: object
                      properties:
                        tmn_code:
                          type: string
                          minLength: 1
                          maxLength: 255
                          nullable: true
                        hash_secret:
                          type: string
                          minLength: 1
                          maxLength: 255
                          nullable: true
                        api_base_url:
                          type: string
                          format: uri
                          nullable: true
                      additionalProperties: false
                  additionalProperties: false
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      slug:
                        type: string
                      name:
                        type: string
                      payment_methods:
                        type: object
                        properties:
                          card:
                            type: boolean
                          paypal:
                            type: boolean
                          vnpay:
                            type: boolean
                        required:
                          - card
                          - paypal
                          - vnpay
                        additionalProperties: false
                      updated_at:
                        type: string
                    required:
                      - id
                      - slug
                      - name
                      - payment_methods
                      - updated_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/admin/properties/{id}/status:
    patch:
      summary: "Transition a property between draft/listed/bookable"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - draft
                    - listed
                    - bookable
                default_currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                timezone:
                  type: string
                  minLength: 1
                  maxLength: 60
              required:
                - status
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - draft
                          - listed
                          - bookable
                      previous_status:
                        type: string
                        enum:
                          - draft
                          - listed
                          - bookable
                      default_currency:
                        type: string
                      timezone:
                        type: string
                    required:
                      - id
                      - status
                      - previous_status
                      - default_currency
                      - timezone
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/properties/{id}/enrich:
    post:
      summary: "Refresh Google Places enrichment payload for a property"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source:
                  type: string
                  enum:
                    - google_places
                place_id:
                  type: string
                force:
                  type: boolean
                  default: false
              required:
                - source
              additionalProperties: false
              default:
                source: google_places
                force: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      source:
                        type: string
                        enum:
                          - google_places
                      state:
                        type: string
                        enum:
                          - cached
                          - refreshed
                          - failed
                      cached_at:
                        type: string
                        format: date-time
                        nullable: true
                      cache_expires_at:
                        type: string
                        format: date-time
                        nullable: true
                      payload:
                        type: object
                        additionalProperties:
{}
                        nullable: true
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                        required:
                          - code
                          - message
                        additionalProperties: false
                        nullable: true
                        default: null
                    required:
                      - property_id
                      - source
                      - state
                      - cached_at
                      - cache_expires_at
                      - payload
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/delegation-issuers:
    get:
      summary: "List trusted delegation issuers"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uri
          in: query
          name: iss
          required: false
        - schema:
            type: string
            enum:
              - active
              - suspended
              - revoked
          in: query
          name: status
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            delegation_issuer_id:
                              type: string
                              format: uuid
                            iss:
                              type: string
                              format: uri
                            name:
                              type: string
                            status:
                              type: string
                              enum:
                                - active
                                - suspended
                                - revoked
                            jwks_url:
                              type: string
                              format: uri
                              nullable: true
                            has_public_key_pem:
                              type: boolean
                            allowed_audiences:
                              type: array
                              items:
                                type: string
                            created_at:
                              type: string
                              format: date-time
                            disabled_at:
                              type: string
                              format: date-time
                              nullable: true
                          required:
                            - delegation_issuer_id
                            - iss
                            - name
                            - status
                            - jwks_url
                            - has_public_key_pem
                            - allowed_audiences
                            - created_at
                            - disabled_at
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    post:
      summary: "Create or update a trusted delegation issuer"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                iss:
                  type: string
                  format: uri
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                jwks_url:
                  type: string
                  format: uri
                public_key_pem:
                  type: string
                  minLength: 1
                status:
                  type: string
                  enum:
                    - active
                    - suspended
                    - revoked
                  default: active
                allowed_audiences:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 200
                  minItems: 1
              required:
                - iss
                - name
                - allowed_audiences
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      delegation_issuer_id:
                        type: string
                        format: uuid
                      iss:
                        type: string
                        format: uri
                      name:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - suspended
                          - revoked
                      jwks_url:
                        type: string
                        format: uri
                        nullable: true
                      has_public_key_pem:
                        type: boolean
                      allowed_audiences:
                        type: array
                        items:
                          type: string
                      created_at:
                        type: string
                        format: date-time
                      disabled_at:
                        type: string
                        format: date-time
                        nullable: true
                      public_key_pem:
                        type: string
                        nullable: true
                      created:
                        type: boolean
                    required:
                      - delegation_issuer_id
                      - iss
                      - name
                      - status
                      - jwks_url
                      - has_public_key_pem
                      - allowed_audiences
                      - created_at
                      - disabled_at
                      - public_key_pem
                      - created
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/delegation-issuers/{id}:
    get:
      summary: "Get trusted delegation issuer detail"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      delegation_issuer_id:
                        type: string
                        format: uuid
                      iss:
                        type: string
                        format: uri
                      name:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - suspended
                          - revoked
                      jwks_url:
                        type: string
                        format: uri
                        nullable: true
                      has_public_key_pem:
                        type: boolean
                      allowed_audiences:
                        type: array
                        items:
                          type: string
                      created_at:
                        type: string
                        format: date-time
                      disabled_at:
                        type: string
                        format: date-time
                        nullable: true
                      public_key_pem:
                        type: string
                        nullable: true
                    required:
                      - delegation_issuer_id
                      - iss
                      - name
                      - status
                      - jwks_url
                      - has_public_key_pem
                      - allowed_audiences
                      - created_at
                      - disabled_at
                      - public_key_pem
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    delete:
      summary: "Disable a trusted delegation issuer"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      delegation_issuer_id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - active
                          - suspended
                          - revoked
                      disabled_at:
                        type: string
                        format: date-time
                    required:
                      - delegation_issuer_id
                      - status
                      - disabled_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/delegated-payments/consent-events:
    get:
      summary: "List delegated consent events"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            minLength: 1
          in: query
          name: delegated_user_sub
          required: false
        - schema:
            type: string
            enum:
              - active
              - expired
              - revoked
              - consumed
          in: query
          name: status
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            consent_event_id:
                              type: string
                              format: uuid
                            delegated_user_sub:
                              type: string
                            intent_type:
                              type: string
                            status:
                              type: string
                              enum:
                                - active
                                - expired
                                - revoked
                                - consumed
                            captured_at:
                              type: string
                              format: date-time
                            expires_at:
                              type: string
                              format: date-time
                              nullable: true
                          required:
                            - consent_event_id
                            - delegated_user_sub
                            - intent_type
                            - status
                            - captured_at
                            - expires_at
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    post:
      summary: "Create a delegated booking consent event"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                delegated_user_sub:
                  type: string
                  minLength: 1
                agent_id:
                  type: string
                  format: uuid
                conversation_id:
                  type: string
                  maxLength: 200
                message_id:
                  type: string
                  maxLength: 200
                intent_type:
                  type: string
                  minLength: 1
                  maxLength: 120
                raw_text:
                  type: string
                  maxLength: 4000
                structured_summary:
                  type: object
                  additionalProperties:
{}
                  default:
{}
                expires_at:
                  type: string
                  format: date-time
              required:
                - delegated_user_sub
                - intent_type
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      consent_event_id:
                        type: string
                        format: uuid
                      delegated_user_sub:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - expired
                          - revoked
                          - consumed
                      intent_type:
                        type: string
                      expires_at:
                        type: string
                        format: date-time
                        nullable: true
                      captured_at:
                        type: string
                        format: date-time
                    required:
                      - consent_event_id
                      - delegated_user_sub
                      - status
                      - intent_type
                      - expires_at
                      - captured_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/delegated-payments/consent-events/{id}:
    get:
      summary: "Get delegated consent event detail"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      consent_event_id:
                        type: string
                        format: uuid
                      delegated_user_sub:
                        type: string
                      intent_type:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - expired
                          - revoked
                          - consumed
                      captured_at:
                        type: string
                        format: date-time
                      expires_at:
                        type: string
                        format: date-time
                        nullable: true
                      agent_id:
                        type: string
                        format: uuid
                        nullable: true
                      conversation_id:
                        type: string
                        nullable: true
                      message_id:
                        type: string
                        nullable: true
                      raw_text:
                        type: string
                        nullable: true
                      structured_summary:
                        type: object
                        additionalProperties:
{}
                      consumed_at:
                        type: string
                        format: date-time
                        nullable: true
                    required:
                      - consent_event_id
                      - delegated_user_sub
                      - intent_type
                      - status
                      - captured_at
                      - expires_at
                      - agent_id
                      - conversation_id
                      - message_id
                      - raw_text
                      - structured_summary
                      - consumed_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/delegated-payments/user-mandates:
    get:
      summary: "List delegated user mandates"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            minLength: 1
          in: query
          name: delegated_user_sub
          required: false
        - schema:
            type: string
            enum:
              - active
              - paused
              - revoked
              - expired
          in: query
          name: status
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            user_mandate_id:
                              type: string
                              format: uuid
                            delegated_user_sub:
                              type: string
                            status:
                              type: string
                              enum:
                                - active
                                - paused
                                - revoked
                                - expired
                            max_amount:
                              type: integer
                              exclusiveMinimum: true
                              minimum: 0
                            currency:
                              type: string
                              minLength: 3
                              maxLength: 3
                              pattern: "^[A-Z]{3}$"
                            valid_until:
                              type: string
                              format: date-time
                              nullable: true
                            created_at:
                              type: string
                              format: date-time
                          required:
                            - user_mandate_id
                            - delegated_user_sub
                            - status
                            - max_amount
                            - currency
                            - valid_until
                            - created_at
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    post:
      summary: "Create a delegated spend mandate"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                delegated_user_sub:
                  type: string
                  minLength: 1
                issuer:
                  type: string
                  maxLength: 120
                max_amount:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                  pattern: "^[A-Z]{3}$"
                allowed_property_ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                  default:
[]
                require_reconfirmation_above:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                valid_until:
                  type: string
                  format: date-time
              required:
                - delegated_user_sub
                - max_amount
                - currency
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      user_mandate_id:
                        type: string
                        format: uuid
                      delegated_user_sub:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - paused
                          - revoked
                          - expired
                      max_amount:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      currency:
                        type: string
                        minLength: 3
                        maxLength: 3
                        pattern: "^[A-Z]{3}$"
                      valid_until:
                        type: string
                        format: date-time
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - user_mandate_id
                      - delegated_user_sub
                      - status
                      - max_amount
                      - currency
                      - valid_until
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/delegated-payments/user-mandates/{id}:
    get:
      summary: "Get delegated user mandate detail"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      user_mandate_id:
                        type: string
                        format: uuid
                      delegated_user_sub:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - paused
                          - revoked
                          - expired
                      max_amount:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      currency:
                        type: string
                        minLength: 3
                        maxLength: 3
                        pattern: "^[A-Z]{3}$"
                      valid_until:
                        type: string
                        format: date-time
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                      issuer:
                        type: string
                        nullable: true
                      allowed_property_ids:
                        type: array
                        items:
                          type: string
                          format: uuid
                      require_reconfirmation_above:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                        nullable: true
                      valid_from:
                        type: string
                        format: date-time
                      revoked_at:
                        type: string
                        format: date-time
                        nullable: true
                      updated_at:
                        type: string
                        format: date-time
                    required:
                      - user_mandate_id
                      - delegated_user_sub
                      - status
                      - max_amount
                      - currency
                      - valid_until
                      - created_at
                      - issuer
                      - allowed_property_ids
                      - require_reconfirmation_above
                      - valid_from
                      - revoked_at
                      - updated_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/delegated-payments/booking-authorizations:
    get:
      summary: "List delegated booking authorizations"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            minLength: 1
          in: query
          name: delegated_user_sub
          required: false
        - schema:
            type: string
            minLength: 1
          in: query
          name: quote_id
          required: false
        - schema:
            type: string
            enum:
              - authorized
              - expired
              - consumed
              - revoked
              - rejected
          in: query
          name: status
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            booking_authorization_id:
                              type: string
                              format: uuid
                            quote_id:
                              type: string
                              minLength: 1
                            property_id:
                              type: string
                              format: uuid
                            delegated_user_sub:
                              type: string
                            status:
                              type: string
                              enum:
                                - authorized
                                - expired
                                - consumed
                                - revoked
                                - rejected
                            max_charge_amount:
                              type: integer
                              exclusiveMinimum: true
                              minimum: 0
                            currency:
                              type: string
                              minLength: 3
                              maxLength: 3
                              pattern: "^[A-Z]{3}$"
                            authorized_at:
                              type: string
                              format: date-time
                            expires_at:
                              type: string
                              format: date-time
                              nullable: true
                          required:
                            - booking_authorization_id
                            - quote_id
                            - property_id
                            - delegated_user_sub
                            - status
                            - max_charge_amount
                            - currency
                            - authorized_at
                            - expires_at
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    post:
      summary: "Create a delegated booking authorization"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                quote_id:
                  type: string
                  minLength: 1
                delegated_user_sub:
                  type: string
                  minLength: 1
                agent_id:
                  type: string
                  format: uuid
                consent_event_id:
                  type: string
                  format: uuid
                user_mandate_id:
                  type: string
                  format: uuid
                max_charge_amount:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                  pattern: "^[A-Z]{3}$"
                expires_at:
                  type: string
                  format: date-time
              required:
                - quote_id
                - delegated_user_sub
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_authorization_id:
                        type: string
                        format: uuid
                      quote_id:
                        type: string
                        minLength: 1
                      property_id:
                        type: string
                        format: uuid
                      delegated_user_sub:
                        type: string
                      status:
                        type: string
                        enum:
                          - authorized
                          - expired
                          - consumed
                          - revoked
                          - rejected
                      max_charge_amount:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      currency:
                        type: string
                        minLength: 3
                        maxLength: 3
                        pattern: "^[A-Z]{3}$"
                      authorized_at:
                        type: string
                        format: date-time
                      expires_at:
                        type: string
                        format: date-time
                        nullable: true
                    required:
                      - booking_authorization_id
                      - quote_id
                      - property_id
                      - delegated_user_sub
                      - status
                      - max_charge_amount
                      - currency
                      - authorized_at
                      - expires_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/delegated-payments/booking-authorizations/{id}:
    get:
      summary: "Get delegated booking authorization detail"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking_authorization_id:
                        type: string
                        format: uuid
                      quote_id:
                        type: string
                        minLength: 1
                      property_id:
                        type: string
                        format: uuid
                      delegated_user_sub:
                        type: string
                      status:
                        type: string
                        enum:
                          - authorized
                          - expired
                          - consumed
                          - revoked
                          - rejected
                      max_charge_amount:
                        type: integer
                        exclusiveMinimum: true
                        minimum: 0
                      currency:
                        type: string
                        minLength: 3
                        maxLength: 3
                        pattern: "^[A-Z]{3}$"
                      authorized_at:
                        type: string
                        format: date-time
                      expires_at:
                        type: string
                        format: date-time
                        nullable: true
                      agent_id:
                        type: string
                        format: uuid
                        nullable: true
                      consent_event_id:
                        type: string
                        format: uuid
                        nullable: true
                      user_mandate_id:
                        type: string
                        format: uuid
                        nullable: true
                      consumed_at:
                        type: string
                        format: date-time
                        nullable: true
                      rejection_reason:
                        type: string
                        nullable: true
                      policy_snapshot:
                        type: object
                        additionalProperties:
{}
                    required:
                      - booking_authorization_id
                      - quote_id
                      - property_id
                      - delegated_user_sub
                      - status
                      - max_charge_amount
                      - currency
                      - authorized_at
                      - expires_at
                      - agent_id
                      - consent_event_id
                      - user_mandate_id
                      - consumed_at
                      - rejection_reason
                      - policy_snapshot
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/integrations/status:
    get:
      summary: "Integration connector status"
      tags:
        - admin
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            connector:
                              type: string
                            state:
                              type: string
                              enum:
                                - healthy
                                - degraded
                                - down
                                - not_configured
                            last_sync_at:
                              type: string
                              format: date-time
                              nullable: true
                            pending_events:
                              type: integer
                              minimum: 0
                            failed_events:
                              type: integer
                              minimum: 0
                            message:
                              type: string
                          required:
                            - connector
                            - state
                            - last_sync_at
                            - pending_events
                            - failed_events
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/baseline:
    get:
      summary: "List captured hotel baselines for the caller tenant"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            property_id:
                              type: string
                              format: uuid
                            bookings_per_week:
                              type: number
                              nullable: true
                            avg_response_time_seconds:
                              type: integer
                              nullable: true
                            payment_success_rate:
                              type: number
                              nullable: true
                            staff_hours_per_week:
                              type: number
                              nullable: true
                            deflection_rate:
                              type: number
                              nullable: true
                            source:
                              type: string
                              enum:
                                - self_reported
                                - imported
                            captured_at:
                              type: string
                              format: date-time
                            captured_by:
                              type: string
                              nullable: true
                            notes:
                              type: string
                              nullable: true
                          required:
                            - property_id
                            - bookings_per_week
                            - avg_response_time_seconds
                            - payment_success_rate
                            - staff_hours_per_week
                            - deflection_rate
                            - source
                            - captured_at
                            - captured_by
                            - notes
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    put:
      summary: "Capture or update pre-platform baseline for a property"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                property_id:
                  type: string
                  format: uuid
                bookings_per_week:
                  type: number
                  minimum: 0
                  nullable: true
                avg_response_time_seconds:
                  type: integer
                  minimum: 0
                  nullable: true
                payment_success_rate:
                  type: number
                  minimum: 0
                  maximum: 1
                  nullable: true
                staff_hours_per_week:
                  type: number
                  minimum: 0
                  nullable: true
                deflection_rate:
                  type: number
                  minimum: 0
                  maximum: 1
                  nullable: true
                source:
                  type: string
                  enum:
                    - self_reported
                    - imported
                  default: self_reported
                captured_by:
                  type: string
                  minLength: 1
                  maxLength: 120
                notes:
                  type: string
                  maxLength: 1000
              required:
                - property_id
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      bookings_per_week:
                        type: number
                        nullable: true
                      avg_response_time_seconds:
                        type: integer
                        nullable: true
                      payment_success_rate:
                        type: number
                        nullable: true
                      staff_hours_per_week:
                        type: number
                        nullable: true
                      deflection_rate:
                        type: number
                        nullable: true
                      source:
                        type: string
                        enum:
                          - self_reported
                          - imported
                      captured_at:
                        type: string
                        format: date-time
                      captured_by:
                        type: string
                        nullable: true
                      notes:
                        type: string
                        nullable: true
                    required:
                      - property_id
                      - bookings_per_week
                      - avg_response_time_seconds
                      - payment_success_rate
                      - staff_hours_per_week
                      - deflection_rate
                      - source
                      - captured_at
                      - captured_by
                      - notes
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/admin/kpi:
    get:
      summary: "Read aggregated KPIs from hotel_daily_kpi"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: from
          required: false
        - schema:
            type: string
            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
          in: query
          name: to
          required: false
        - schema:
            type: string
            enum:
              - chain
              - property
            default: chain
          in: query
          name: view
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      view:
                        type: string
                        enum:
                          - chain
                          - property
                      from:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      to:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      totals:
                        type: object
                        properties:
                          direct_booking_count:
                            type: integer
                            minimum: 0
                          agent_booking_count:
                            type: integer
                            minimum: 0
                          total_booking_count:
                            type: integer
                            minimum: 0
                          cancelled_booking_count:
                            type: integer
                            minimum: 0
                          gross_revenue_minor:
                            type: integer
                            minimum: 0
                          payment_attempt_count:
                            type: integer
                            minimum: 0
                          payment_success_count:
                            type: integer
                            minimum: 0
                          advisor_session_count:
                            type: integer
                            minimum: 0
                          advisor_handoff_count:
                            type: integer
                            minimum: 0
                          guest_request_count:
                            type: integer
                            minimum: 0
                          reentry_total_count:
                            type: integer
                            minimum: 0
                          reentry_confirmed_count:
                            type: integer
                            minimum: 0
                          oversell_incident_count:
                            type: integer
                            minimum: 0
                          payment_success_rate:
                            type: number
                            nullable: true
                          deflection_rate:
                            type: number
                            nullable: true
                          reentry_sla_compliance:
                            type: number
                            nullable: true
                        required:
                          - direct_booking_count
                          - agent_booking_count
                          - total_booking_count
                          - cancelled_booking_count
                          - gross_revenue_minor
                          - payment_attempt_count
                          - payment_success_count
                          - advisor_session_count
                          - advisor_handoff_count
                          - guest_request_count
                          - reentry_total_count
                          - reentry_confirmed_count
                          - oversell_incident_count
                          - payment_success_rate
                          - deflection_rate
                          - reentry_sla_compliance
                        additionalProperties: false
                      daily:
                        type: array
                        items:
                          type: object
                          properties:
                            day:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            direct_booking_count:
                              type: integer
                              minimum: 0
                            agent_booking_count:
                              type: integer
                              minimum: 0
                            total_booking_count:
                              type: integer
                              minimum: 0
                            cancelled_booking_count:
                              type: integer
                              minimum: 0
                            gross_revenue_minor:
                              type: integer
                              minimum: 0
                            payment_attempt_count:
                              type: integer
                              minimum: 0
                            payment_success_count:
                              type: integer
                              minimum: 0
                            advisor_session_count:
                              type: integer
                              minimum: 0
                            advisor_handoff_count:
                              type: integer
                              minimum: 0
                            guest_request_count:
                              type: integer
                              minimum: 0
                            reentry_total_count:
                              type: integer
                              minimum: 0
                            reentry_confirmed_count:
                              type: integer
                              minimum: 0
                            reentry_sla_compliance:
                              type: number
                              nullable: true
                            oversell_incident_count:
                              type: integer
                              minimum: 0
                          required:
                            - day
                            - direct_booking_count
                            - agent_booking_count
                            - total_booking_count
                            - cancelled_booking_count
                            - gross_revenue_minor
                            - payment_attempt_count
                            - payment_success_count
                            - advisor_session_count
                            - advisor_handoff_count
                            - guest_request_count
                            - reentry_total_count
                            - reentry_confirmed_count
                            - reentry_sla_compliance
                            - oversell_incident_count
                          additionalProperties: false
                      properties:
                        type: array
                        items:
                          type: object
                          properties:
                            property_id:
                              type: string
                              format: uuid
                            property_name:
                              type: string
                            totals:
                              type: object
                              properties:
                                direct_booking_count:
                                  type: integer
                                  minimum: 0
                                agent_booking_count:
                                  type: integer
                                  minimum: 0
                                total_booking_count:
                                  type: integer
                                  minimum: 0
                                cancelled_booking_count:
                                  type: integer
                                  minimum: 0
                                gross_revenue_minor:
                                  type: integer
                                  minimum: 0
                                payment_attempt_count:
                                  type: integer
                                  minimum: 0
                                payment_success_count:
                                  type: integer
                                  minimum: 0
                                advisor_session_count:
                                  type: integer
                                  minimum: 0
                                advisor_handoff_count:
                                  type: integer
                                  minimum: 0
                                guest_request_count:
                                  type: integer
                                  minimum: 0
                                reentry_total_count:
                                  type: integer
                                  minimum: 0
                                reentry_confirmed_count:
                                  type: integer
                                  minimum: 0
                                oversell_incident_count:
                                  type: integer
                                  minimum: 0
                                payment_success_rate:
                                  type: number
                                  nullable: true
                                deflection_rate:
                                  type: number
                                  nullable: true
                                reentry_sla_compliance:
                                  type: number
                                  nullable: true
                              required:
                                - direct_booking_count
                                - agent_booking_count
                                - total_booking_count
                                - cancelled_booking_count
                                - gross_revenue_minor
                                - payment_attempt_count
                                - payment_success_count
                                - advisor_session_count
                                - advisor_handoff_count
                                - guest_request_count
                                - reentry_total_count
                                - reentry_confirmed_count
                                - oversell_incident_count
                                - payment_success_rate
                                - deflection_rate
                                - reentry_sla_compliance
                              additionalProperties: false
                          required:
                            - property_id
                            - property_name
                            - totals
                          additionalProperties: false
                      baseline_lift:
                        type: object
                        properties:
                          direct_bookings_per_week:
                            type: number
                            nullable: true
                          baseline_bookings_per_week:
                            type: number
                            nullable: true
                          bookings_per_week_lift_pct:
                            type: number
                            nullable: true
                          baseline_payment_success_rate:
                            type: number
                            nullable: true
                          payment_success_rate_lift_pct:
                            type: number
                            nullable: true
                          baseline_deflection_rate:
                            type: number
                            nullable: true
                          deflection_rate_lift_pct:
                            type: number
                            nullable: true
                        required:
                          - direct_bookings_per_week
                          - baseline_bookings_per_week
                          - bookings_per_week_lift_pct
                          - baseline_payment_success_rate
                          - payment_success_rate_lift_pct
                          - baseline_deflection_rate
                          - deflection_rate_lift_pct
                        additionalProperties: false
                        nullable: true
                    required:
                      - view
                      - from
                      - to
                      - totals
                      - daily
                      - properties
                      - baseline_lift
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/admin/agents:
    post:
      summary: "Register an agent and mint its first bearer credential"
      tags:
        - admin
      description: "Creates a new agent identity scoped to the caller's tenant and mints the first bearer credential. The `plaintext_secret` is returned exactly once — the server stores only a scrypt hash. To rotate later, call POST /v1/admin/agents/{id}/credentials."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                scopes:
                  type: array
                  items:
                    type: string
                    enum:
                      - search:read
                      - quote:read
                      - hold:read
                      - hold:write
                      - booking:read
                      - booking:write
                      - booking:modify
                      - booking:cancel
                      - refund:write
                      - support:read
                      - webhook:manage
                      - admin:read
                      - admin:write
                  minItems: 1
                environment:
                  type: string
                  enum:
                    - live
                    - test
                  default: live
              required:
                - name
                - scopes
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      agent_id:
                        type: string
                      name:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - suspended
                          - revoked
                      tenant_id:
                        type: string
                        format: uuid
                      scopes:
                        type: array
                        items:
                          type: string
                          enum:
                            - search:read
                            - quote:read
                            - hold:read
                            - hold:write
                            - booking:read
                            - booking:write
                            - booking:modify
                            - booking:cancel
                            - refund:write
                            - support:read
                            - webhook:manage
                            - admin:read
                            - admin:write
                      created_at:
                        type: string
                        format: date-time
                      credential:
                        type: object
                        properties:
                          credential_id:
                            type: string
                          kid:
                            type: string
                          prefix:
                            type: string
                            enum:
                              - hsk_live_
                              - hsk_test_
                          created_at:
                            type: string
                            format: date-time
                          expires_at:
                            type: string
                            format: date-time
                            nullable: true
                          revoked_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_used_at:
                            type: string
                            format: date-time
                            nullable: true
                        required:
                          - credential_id
                          - kid
                          - prefix
                          - created_at
                          - expires_at
                          - revoked_at
                          - last_used_at
                        additionalProperties: false
                      plaintext_secret:
                        type: string
                        description: "The bearer secret. Returned ONCE — the server stores only a scrypt hash. Persist this in your secret manager before closing the response. There is no \"forgot password\" — if lost, call POST /v1/admin/agents/{id}/credentials to rotate."
                    required:
                      - agent_id
                      - name
                      - status
                      - tenant_id
                      - scopes
                      - created_at
                      - credential
                      - plaintext_secret
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/agents/{id}:
    get:
      summary: "Fetch an agent with its credential metadata"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      agent_id:
                        type: string
                      name:
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - suspended
                          - revoked
                      tenant_id:
                        type: string
                        format: uuid
                      scopes:
                        type: array
                        items:
                          type: string
                          enum:
                            - search:read
                            - quote:read
                            - hold:read
                            - hold:write
                            - booking:read
                            - booking:write
                            - booking:modify
                            - booking:cancel
                            - refund:write
                            - support:read
                            - webhook:manage
                            - admin:read
                            - admin:write
                      created_at:
                        type: string
                        format: date-time
                      credentials:
                        type: array
                        items:
                          type: object
                          properties:
                            credential_id:
                              type: string
                            kid:
                              type: string
                            prefix:
                              type: string
                              enum:
                                - hsk_live_
                                - hsk_test_
                            created_at:
                              type: string
                              format: date-time
                            expires_at:
                              type: string
                              format: date-time
                              nullable: true
                            revoked_at:
                              type: string
                              format: date-time
                              nullable: true
                            last_used_at:
                              type: string
                              format: date-time
                              nullable: true
                          required:
                            - credential_id
                            - kid
                            - prefix
                            - created_at
                            - expires_at
                            - revoked_at
                            - last_used_at
                          additionalProperties: false
                    required:
                      - agent_id
                      - name
                      - status
                      - tenant_id
                      - scopes
                      - created_at
                      - credentials
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/agents/{id}/credentials:
    post:
      summary: "Rotate an agent credential with an overlap window"
      tags:
        - admin
      description: "Mints a new bearer credential and schedules the previous credential to expire after `overlap_days`. During the overlap, BOTH credentials verify — deploy the new one, then the old one hard-expires. Use overlap_days=0 for an immediate cutover (not recommended for production traffic)."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                overlap_days:
                  type: integer
                  minimum: 0
                  maximum: 90
                  default: 30
              additionalProperties: false
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: id
          required: true
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      credential:
                        type: object
                        properties:
                          credential_id:
                            type: string
                          kid:
                            type: string
                          prefix:
                            type: string
                            enum:
                              - hsk_live_
                              - hsk_test_
                          created_at:
                            type: string
                            format: date-time
                          expires_at:
                            type: string
                            format: date-time
                            nullable: true
                          revoked_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_used_at:
                            type: string
                            format: date-time
                            nullable: true
                        required:
                          - credential_id
                          - kid
                          - prefix
                          - created_at
                          - expires_at
                          - revoked_at
                          - last_used_at
                        additionalProperties: false
                      plaintext_secret:
                        type: string
                        description: "The new bearer secret. Same one-time-only rules as POST /v1/admin/agents."
                    required:
                      - credential
                      - plaintext_secret
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/agents/{id}/credentials/{cred_id}:
    delete:
      summary: "Revoke a credential immediately"
      tags:
        - admin
      description: "Marks the credential as revoked with no grace period. Any subsequent request carrying this bearer fails with `credential_revoked`. For planned rotation with zero downtime, prefer POST /v1/admin/agents/{id}/credentials with overlap_days>0."
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: id
          required: true
        - schema:
            type: string
            minLength: 1
          in: path
          name: cred_id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      credential:
                        type: object
                        properties:
                          credential_id:
                            type: string
                          kid:
                            type: string
                          prefix:
                            type: string
                            enum:
                              - hsk_live_
                              - hsk_test_
                          created_at:
                            type: string
                            format: date-time
                          expires_at:
                            type: string
                            format: date-time
                            nullable: true
                          revoked_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_used_at:
                            type: string
                            format: date-time
                            nullable: true
                        required:
                          - credential_id
                          - kid
                          - prefix
                          - created_at
                          - expires_at
                          - revoked_at
                          - last_used_at
                        additionalProperties: false
                    required:
                      - credential
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/builder-access-requests:
    get:
      summary: "List inbound builder sandbox and live-access requests"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            enum:
              - sandbox
              - production
          in: query
          name: requested_access
          required: false
        - schema:
            type: string
            enum:
              - sandbox_requested
              - sandbox_active
              - live_review
              - live_active
              - suspended
              - rejected
          in: query
          name: status
          required: false
        - schema:
            type: integer
            exclusiveMinimum: true
            minimum: 0
            maximum: 200
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            request_id:
                              type: string
                              format: uuid
                            requested_access:
                              type: string
                              enum:
                                - sandbox
                                - production
                            status:
                              type: string
                              enum:
                                - sandbox_requested
                                - sandbox_active
                                - live_review
                                - live_active
                                - suspended
                                - rejected
                            company_name:
                              type: string
                            product_name:
                              type: string
                            contact_name:
                              type: string
                            contact_email:
                              type: string
                              format: email
                            website_url:
                              type: string
                              nullable: true
                            integration_type:
                              type: string
                              enum:
                                - agent
                                - travel_assistant
                                - concierge
                                - internal_tool
                                - other
                            geography:
                              type: string
                              nullable: true
                            volume_band:
                              type: string
                              enum:
                                - under_1k
                                - 1k_to_10k
                                - 10k_to_50k
                                - over_50k
                            runtime:
                              type: string
                              nullable: true
                            use_case_summary:
                              type: string
                            needs_live_booking:
                              type: boolean
                            notes:
                              type: string
                              nullable: true
                            review_notes:
                              type: string
                              nullable: true
                            reviewed_at:
                              type: string
                              format: date-time
                              nullable: true
                            reviewed_by:
                              type: string
                              nullable: true
                            submitted_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                          required:
                            - request_id
                            - requested_access
                            - status
                            - company_name
                            - product_name
                            - contact_name
                            - contact_email
                            - website_url
                            - integration_type
                            - geography
                            - volume_band
                            - runtime
                            - use_case_summary
                            - needs_live_booking
                            - notes
                            - review_notes
                            - reviewed_at
                            - reviewed_by
                            - submitted_at
                            - updated_at
                          additionalProperties: false
                      total:
                        type: integer
                        minimum: 0
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/builder-access-requests/{id}/review:
    post:
      summary: "Update the review status for a builder access request"
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - sandbox_active
                    - live_active
                    - suspended
                    - rejected
                reviewed_by:
                  type: string
                  minLength: 1
                  maxLength: 120
                review_notes:
                  type: string
                  maxLength: 1000
              required:
                - status
                - reviewed_by
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      request_id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - sandbox_requested
                          - sandbox_active
                          - live_review
                          - live_active
                          - suspended
                          - rejected
                      reviewed_at:
                        type: string
                        format: date-time
                      reviewed_by:
                        type: string
                    required:
                      - request_id
                      - status
                      - reviewed_at
                      - reviewed_by
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
  /v1/admin/webhooks:
    post:
      summary: "Register a webhook endpoint and mint its signing secret"
      tags:
        - admin
      description: "Creates a subscribed endpoint for the caller's tenant. The `plaintext_secret` is returned exactly once — the server retains it to sign outbound deliveries, but the admin portal never discloses it again. To replace a lost secret, call POST /v1/admin/webhooks/{id}/rotate."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                topics:
                  type: array
                  items:
                    type: string
                    enum:
                      - bookings.booking_confirmed
                      - bookings.booking_cancelled
                      - bookings.booking_modified
                      - payments.payment_captured
                      - payments.payment_refunded
                      - holds.hold_expired
                  minItems: 1
                description:
                  type: string
                  maxLength: 512
              required:
                - url
                - topics
              additionalProperties: false
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      endpoint:
                        type: object
                        properties:
                          endpoint_id:
                            type: string
                          tenant_id:
                            type: string
                            format: uuid
                          url:
                            type: string
                            format: uri
                          topics:
                            type: array
                            items:
                              type: string
                              enum:
                                - bookings.booking_confirmed
                                - bookings.booking_cancelled
                                - bookings.booking_modified
                                - payments.payment_captured
                                - payments.payment_refunded
                                - holds.hold_expired
                          status:
                            type: string
                            enum:
                              - active
                              - disabled
                              - revoked
                          description:
                            type: string
                            nullable: true
                          created_at:
                            type: string
                            format: date-time
                          disabled_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_delivery_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_success_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_failure_at:
                            type: string
                            format: date-time
                            nullable: true
                          consecutive_failures:
                            type: integer
                            minimum: 0
                        required:
                          - endpoint_id
                          - tenant_id
                          - url
                          - topics
                          - status
                          - description
                          - created_at
                          - disabled_at
                          - last_delivery_at
                          - last_success_at
                          - last_failure_at
                          - consecutive_failures
                        additionalProperties: false
                      plaintext_secret:
                        type: string
                        description: "The HMAC signing secret. Returned ONCE — the server never discloses it again. Persist in your secret manager. To replace a lost secret, call POST /v1/admin/webhooks/{id}/rotate."
                    required:
                      - endpoint
                      - plaintext_secret
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    get:
      summary: "List registered webhook endpoints"
      tags:
        - admin
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      endpoints:
                        type: array
                        items:
                          type: object
                          properties:
                            endpoint_id:
                              type: string
                            tenant_id:
                              type: string
                              format: uuid
                            url:
                              type: string
                              format: uri
                            topics:
                              type: array
                              items:
                                type: string
                                enum:
                                  - bookings.booking_confirmed
                                  - bookings.booking_cancelled
                                  - bookings.booking_modified
                                  - payments.payment_captured
                                  - payments.payment_refunded
                                  - holds.hold_expired
                            status:
                              type: string
                              enum:
                                - active
                                - disabled
                                - revoked
                            description:
                              type: string
                              nullable: true
                            created_at:
                              type: string
                              format: date-time
                            disabled_at:
                              type: string
                              format: date-time
                              nullable: true
                            last_delivery_at:
                              type: string
                              format: date-time
                              nullable: true
                            last_success_at:
                              type: string
                              format: date-time
                              nullable: true
                            last_failure_at:
                              type: string
                              format: date-time
                              nullable: true
                            consecutive_failures:
                              type: integer
                              minimum: 0
                          required:
                            - endpoint_id
                            - tenant_id
                            - url
                            - topics
                            - status
                            - description
                            - created_at
                            - disabled_at
                            - last_delivery_at
                            - last_success_at
                            - last_failure_at
                            - consecutive_failures
                          additionalProperties: false
                    required:
                      - endpoints
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/webhooks/{id}:
    get:
      summary: "Fetch webhook endpoint metadata"
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      endpoint:
                        type: object
                        properties:
                          endpoint_id:
                            type: string
                          tenant_id:
                            type: string
                            format: uuid
                          url:
                            type: string
                            format: uri
                          topics:
                            type: array
                            items:
                              type: string
                              enum:
                                - bookings.booking_confirmed
                                - bookings.booking_cancelled
                                - bookings.booking_modified
                                - payments.payment_captured
                                - payments.payment_refunded
                                - holds.hold_expired
                          status:
                            type: string
                            enum:
                              - active
                              - disabled
                              - revoked
                          description:
                            type: string
                            nullable: true
                          created_at:
                            type: string
                            format: date-time
                          disabled_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_delivery_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_success_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_failure_at:
                            type: string
                            format: date-time
                            nullable: true
                          consecutive_failures:
                            type: integer
                            minimum: 0
                        required:
                          - endpoint_id
                          - tenant_id
                          - url
                          - topics
                          - status
                          - description
                          - created_at
                          - disabled_at
                          - last_delivery_at
                          - last_success_at
                          - last_failure_at
                          - consecutive_failures
                        additionalProperties: false
                    required:
                      - endpoint
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    patch:
      summary: "Update webhook endpoint configuration"
      tags:
        - admin
      description: "Edit url, topics, description, or transition the endpoint between active and disabled. To permanently tear down, call DELETE /v1/admin/webhooks/{id} — that route revokes the secret so it cannot be re-enabled."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                topics:
                  type: array
                  items:
                    type: string
                    enum:
                      - bookings.booking_confirmed
                      - bookings.booking_cancelled
                      - bookings.booking_modified
                      - payments.payment_captured
                      - payments.payment_refunded
                      - holds.hold_expired
                  minItems: 1
                description:
                  type: string
                  maxLength: 512
                  nullable: true
                status:
                  type: string
                  enum:
                    - active
                    - disabled
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      endpoint:
                        type: object
                        properties:
                          endpoint_id:
                            type: string
                          tenant_id:
                            type: string
                            format: uuid
                          url:
                            type: string
                            format: uri
                          topics:
                            type: array
                            items:
                              type: string
                              enum:
                                - bookings.booking_confirmed
                                - bookings.booking_cancelled
                                - bookings.booking_modified
                                - payments.payment_captured
                                - payments.payment_refunded
                                - holds.hold_expired
                          status:
                            type: string
                            enum:
                              - active
                              - disabled
                              - revoked
                          description:
                            type: string
                            nullable: true
                          created_at:
                            type: string
                            format: date-time
                          disabled_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_delivery_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_success_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_failure_at:
                            type: string
                            format: date-time
                            nullable: true
                          consecutive_failures:
                            type: integer
                            minimum: 0
                        required:
                          - endpoint_id
                          - tenant_id
                          - url
                          - topics
                          - status
                          - description
                          - created_at
                          - disabled_at
                          - last_delivery_at
                          - last_success_at
                          - last_failure_at
                          - consecutive_failures
                        additionalProperties: false
                    required:
                      - endpoint
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
    delete:
      summary: "Revoke a webhook endpoint permanently"
      tags:
        - admin
      description: "Marks the endpoint as revoked. Pending deliveries to this endpoint dead-letter on their next pickup by the dispatcher. Use PATCH with `status: disabled` for a reversible pause."
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      endpoint:
                        type: object
                        properties:
                          endpoint_id:
                            type: string
                          tenant_id:
                            type: string
                            format: uuid
                          url:
                            type: string
                            format: uri
                          topics:
                            type: array
                            items:
                              type: string
                              enum:
                                - bookings.booking_confirmed
                                - bookings.booking_cancelled
                                - bookings.booking_modified
                                - payments.payment_captured
                                - payments.payment_refunded
                                - holds.hold_expired
                          status:
                            type: string
                            enum:
                              - active
                              - disabled
                              - revoked
                          description:
                            type: string
                            nullable: true
                          created_at:
                            type: string
                            format: date-time
                          disabled_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_delivery_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_success_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_failure_at:
                            type: string
                            format: date-time
                            nullable: true
                          consecutive_failures:
                            type: integer
                            minimum: 0
                        required:
                          - endpoint_id
                          - tenant_id
                          - url
                          - topics
                          - status
                          - description
                          - created_at
                          - disabled_at
                          - last_delivery_at
                          - last_success_at
                          - last_failure_at
                          - consecutive_failures
                        additionalProperties: false
                    required:
                      - endpoint
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/webhooks/{id}/rotate:
    post:
      summary: "Rotate a webhook endpoint signing secret"
      tags:
        - admin
      description: "Replaces the HMAC secret for this endpoint. Deliveries signed with the old secret that are already in flight will complete with the new secret on retry — subscribers must accept a brief window where both secrets produce valid signatures if they cache state server-side."
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      endpoint:
                        type: object
                        properties:
                          endpoint_id:
                            type: string
                          tenant_id:
                            type: string
                            format: uuid
                          url:
                            type: string
                            format: uri
                          topics:
                            type: array
                            items:
                              type: string
                              enum:
                                - bookings.booking_confirmed
                                - bookings.booking_cancelled
                                - bookings.booking_modified
                                - payments.payment_captured
                                - payments.payment_refunded
                                - holds.hold_expired
                          status:
                            type: string
                            enum:
                              - active
                              - disabled
                              - revoked
                          description:
                            type: string
                            nullable: true
                          created_at:
                            type: string
                            format: date-time
                          disabled_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_delivery_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_success_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_failure_at:
                            type: string
                            format: date-time
                            nullable: true
                          consecutive_failures:
                            type: integer
                            minimum: 0
                        required:
                          - endpoint_id
                          - tenant_id
                          - url
                          - topics
                          - status
                          - description
                          - created_at
                          - disabled_at
                          - last_delivery_at
                          - last_success_at
                          - last_failure_at
                          - consecutive_failures
                        additionalProperties: false
                      plaintext_secret:
                        type: string
                        description: "The new HMAC signing secret. Same one-time-only rules as POST /v1/admin/webhooks."
                    required:
                      - endpoint
                      - plaintext_secret
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/webhooks/deliveries:
    get:
      summary: "List webhook deliveries (DLQ + history)"
      tags:
        - admin
      description: "Returns recent webhook deliveries scoped to the caller's tenant. Filter `state=dead_lettered` to inspect the DLQ; filter `endpoint_id` to scope to a single subscriber. Default ordering is newest-first."
      parameters:
        - schema:
            type: string
            format: uuid
          in: query
          name: endpoint_id
          required: false
        - schema:
            type: string
            enum:
              - pending
              - delivering
              - delivered
              - failed
              - dead_lettered
          in: query
          name: state
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 200
          in: query
          name: limit
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      deliveries:
                        type: array
                        items:
                          type: object
                          properties:
                            delivery_id:
                              type: string
                              format: uuid
                            endpoint_id:
                              type: string
                              format: uuid
                            outbox_id:
                              type: string
                            topic:
                              type: string
                              enum:
                                - bookings.booking_confirmed
                                - bookings.booking_cancelled
                                - bookings.booking_modified
                                - payments.payment_captured
                                - payments.payment_refunded
                                - holds.hold_expired
                            event_type:
                              type: string
                            aggregate_type:
                              type: string
                            aggregate_id:
                              type: string
                            state:
                              type: string
                              enum:
                                - pending
                                - delivering
                                - delivered
                                - failed
                                - dead_lettered
                            attempt:
                              type: integer
                              minimum: 0
                            max_attempts:
                              type: integer
                              exclusiveMinimum: true
                              minimum: 0
                            next_attempt_at:
                              type: string
                              format: date-time
                            delivered_at:
                              type: string
                              format: date-time
                              nullable: true
                            last_attempt_at:
                              type: string
                              format: date-time
                              nullable: true
                            last_response_status:
                              type: integer
                              nullable: true
                            last_error:
                              type: string
                              nullable: true
                            created_at:
                              type: string
                              format: date-time
                          required:
                            - delivery_id
                            - endpoint_id
                            - outbox_id
                            - topic
                            - event_type
                            - aggregate_type
                            - aggregate_id
                            - state
                            - attempt
                            - max_attempts
                            - next_attempt_at
                            - delivered_at
                            - last_attempt_at
                            - last_response_status
                            - last_error
                            - created_at
                          additionalProperties: false
                    required:
                      - deliveries
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/webhooks/deliveries/{id}/replay:
    post:
      summary: "Replay a dead-lettered webhook delivery"
      tags:
        - admin
      description: "Resets a `dead_lettered` or `delivered` delivery back to `pending` with `attempt=0`. The dispatcher will pick it up on its next scan and re-sign with the current endpoint secret. In-flight deliveries cannot be replayed — wait for them to reach a terminal state first."
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      delivery:
                        type: object
                        properties:
                          delivery_id:
                            type: string
                            format: uuid
                          endpoint_id:
                            type: string
                            format: uuid
                          outbox_id:
                            type: string
                          topic:
                            type: string
                            enum:
                              - bookings.booking_confirmed
                              - bookings.booking_cancelled
                              - bookings.booking_modified
                              - payments.payment_captured
                              - payments.payment_refunded
                              - holds.hold_expired
                          event_type:
                            type: string
                          aggregate_type:
                            type: string
                          aggregate_id:
                            type: string
                          state:
                            type: string
                            enum:
                              - pending
                              - delivering
                              - delivered
                              - failed
                              - dead_lettered
                          attempt:
                            type: integer
                            minimum: 0
                          max_attempts:
                            type: integer
                            exclusiveMinimum: true
                            minimum: 0
                          next_attempt_at:
                            type: string
                            format: date-time
                          delivered_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_attempt_at:
                            type: string
                            format: date-time
                            nullable: true
                          last_response_status:
                            type: integer
                            nullable: true
                          last_error:
                            type: string
                            nullable: true
                          created_at:
                            type: string
                            format: date-time
                        required:
                          - delivery_id
                          - endpoint_id
                          - outbox_id
                          - topic
                          - event_type
                          - aggregate_type
                          - aggregate_id
                          - state
                          - attempt
                          - max_attempts
                          - next_attempt_at
                          - delivered_at
                          - last_attempt_at
                          - last_response_status
                          - last_error
                          - created_at
                        additionalProperties: false
                    required:
                      - delivery
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
  /v1/admin/properties/{id}/payments/readiness:
    get:
      operationId: adminPropertyPaymentReadiness
      summary: "Payment gateway readiness for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      ready_for_live_bookings:
                        type: boolean
                      blockers:
                        type: array
                        items:
                          type: string
                      methods:
                        type: array
                        items:
                          type: object
                          properties:
                            method:
                              type: string
                              enum:
                                - card
                                - paypal
                                - vnpay
                            provider:
                              type: string
                              enum:
                                - stub
                                - stripe
                                - paypal
                                - vnpay
                            enabled:
                              type: boolean
                            state:
                              type: string
                              enum:
                                - ready
                                - blocked
                                - disabled
                            checkout:
                              type: object
                              properties:
                                configured:
                                  type: boolean
                                source:
                                  type: string
                                  enum:
                                    - property
                                    - env
                                    - mixed
                                    - missing
                                    - not_required
                              required:
                                - configured
                                - source
                              additionalProperties: false
                            webhook:
                              type: object
                              properties:
                                configured:
                                  type: boolean
                                source:
                                  type: string
                                  enum:
                                    - property
                                    - env
                                    - mixed
                                    - missing
                                    - not_required
                              required:
                                - configured
                                - source
                              additionalProperties: false
                            blockers:
                              type: array
                              items:
                                type: string
                            warnings:
                              type: array
                              items:
                                type: string
                          required:
                            - method
                            - provider
                            - enabled
                            - state
                            - checkout
                            - webhook
                            - blockers
                            - warnings
                          additionalProperties: false
                    required:
                      - property_id
                      - ready_for_live_bookings
                      - blockers
                      - methods
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/readiness:
    get:
      operationId: adminSmilePmsReadiness
      summary: "Smile PMS onboarding readiness for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      property_configured:
                        type: boolean
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                      room_types:
                        type: object
                        properties:
                          total:
                            type: integer
                            minimum: 0
                          mapped:
                            type: integer
                            minimum: 0
                          unmapped_codes:
                            type: array
                            items:
                              type: string
                        required:
                          - total
                          - mapped
                          - unmapped_codes
                        additionalProperties: false
                      rate_plans:
                        type: object
                        properties:
                          total:
                            type: integer
                            minimum: 0
                          mapped:
                            type: integer
                            minimum: 0
                          unmapped_codes:
                            type: array
                            items:
                              type: string
                        required:
                          - total
                          - mapped
                          - unmapped_codes
                        additionalProperties: false
                      ready_for_inventory_pull:
                        type: boolean
                      ready_for_reservation_pull:
                        type: boolean
                      ready_for_booking_push:
                        type: boolean
                      blockers:
                        type: array
                        items:
                          type: string
                    required:
                      - property_id
                      - vendor
                      - property_configured
                      - runtime
                      - room_types
                      - rate_plans
                      - ready_for_inventory_pull
                      - ready_for_reservation_pull
                      - ready_for_booking_push
                      - blockers
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/test-connection:
    post:
      operationId: adminSmilePmsTestConnection
      summary: "Test Smile PMS connection for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/sync-health:
    post:
      operationId: adminSmilePmsSyncHealth
      summary: "Run Smile PMS sync health check for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      connection:
                        type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          checked_at:
                            type: string
                            format: date-time
                        required:
                          - state
                          - message
                          - checked_at
                        additionalProperties: false
                      catalog:
                        type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          room_types_found:
                            type: integer
                            minimum: 0
                            nullable: true
                          rate_plans_found:
                            type: integer
                            minimum: 0
                            nullable: true
                        required:
                          - state
                          - message
                          - room_types_found
                          - rate_plans_found
                        additionalProperties: false
                      inventory:
                        type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          from:
                            type: string
                            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                          to:
                            type: string
                            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                          days_found:
                            type: integer
                            minimum: 0
                            nullable: true
                        required:
                          - state
                          - message
                          - from
                          - to
                          - days_found
                        additionalProperties: false
                      reservations:
                        type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          since:
                            type: string
                            pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                          reservations_found:
                            type: integer
                            minimum: 0
                            nullable: true
                        required:
                          - state
                          - message
                          - since
                          - reservations_found
                        additionalProperties: false
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - connection
                      - catalog
                      - inventory
                      - reservations
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/import-runs:
    get:
      operationId: adminSupplyImportRuns
      summary: "List recent supply import runs for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 20
            default: 10
          in: query
          name: limit
          required: false
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            property_id:
                              type: string
                              format: uuid
                            import_type:
                              type: string
                            source:
                              type: string
                            file_name:
                              type: string
                              nullable: true
                            state:
                              type: string
                              enum:
                                - success
                                - partial
                                - failed
                            message:
                              type: string
                            created_count:
                              type: integer
                              minimum: 0
                            updated_count:
                              type: integer
                              minimum: 0
                            error_count:
                              type: integer
                              minimum: 0
                            errors:
                              type: array
                              items:
                                type: string
                            details:
                              type: object
                              additionalProperties:
{}
                            created_at:
                              type: string
                              format: date-time
                          required:
                            - id
                            - property_id
                            - import_type
                            - source
                            - file_name
                            - state
                            - message
                            - created_count
                            - updated_count
                            - error_count
                            - errors
                            - details
                            - created_at
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
    post:
      operationId: adminRecordSupplyImportRun
      summary: "Record a supply import run for a property"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                import_type:
                  type: string
                  minLength: 1
                  maxLength: 80
                source:
                  type: string
                  minLength: 1
                  maxLength: 40
                  default: csv
                file_name:
                  type: string
                  maxLength: 255
                state:
                  type: string
                  enum:
                    - success
                    - partial
                    - failed
                message:
                  type: string
                  minLength: 1
                  maxLength: 500
                created_count:
                  type: integer
                  minimum: 0
                  default: 0
                updated_count:
                  type: integer
                  minimum: 0
                  default: 0
                error_count:
                  type: integer
                  minimum: 0
                  default: 0
                errors:
                  type: array
                  items:
                    type: string
                    maxLength: 500
                  default:
[]
                details:
                  type: object
                  additionalProperties:
{}
                  default:
{}
              required:
                - import_type
                - state
                - message
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      property_id:
                        type: string
                        format: uuid
                      import_type:
                        type: string
                      source:
                        type: string
                      file_name:
                        type: string
                        nullable: true
                      state:
                        type: string
                        enum:
                          - success
                          - partial
                          - failed
                      message:
                        type: string
                      created_count:
                        type: integer
                        minimum: 0
                      updated_count:
                        type: integer
                        minimum: 0
                      error_count:
                        type: integer
                        minimum: 0
                      errors:
                        type: array
                        items:
                          type: string
                      details:
                        type: object
                        additionalProperties:
{}
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - id
                      - property_id
                      - import_type
                      - source
                      - file_name
                      - state
                      - message
                      - created_count
                      - updated_count
                      - error_count
                      - errors
                      - details
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/sync-runs:
    get:
      operationId: adminSmilePmsSyncRuns
      summary: "List recent Smile PMS sync runs for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 10
          in: query
          name: limit
          required: false
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            property_id:
                              type: string
                              format: uuid
                            vendor:
                              type: string
                              enum:
                                - smile
                            run_type:
                              type: string
                            state:
                              type: string
                              enum:
                                - success
                                - blocked
                                - failed
                                - not_implemented
                            message:
                              type: string
                            blockers:
                              type: array
                              items:
                                type: string
                            details:
                              type: object
                              additionalProperties:
{}
                            started_at:
                              type: string
                              format: date-time
                            finished_at:
                              type: string
                              format: date-time
                            created_at:
                              type: string
                              format: date-time
                          required:
                            - id
                            - property_id
                            - vendor
                            - run_type
                            - state
                            - message
                            - blockers
                            - details
                            - started_at
                            - finished_at
                            - created_at
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/sync-runs/{runId}/retry:
    post:
      operationId: adminSmilePmsRetrySyncRun
      summary: "Retry a persisted Smile PMS sync run"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
        - schema:
            type: string
            format: uuid
          in: path
          name: runId
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      retried_from_run_id:
                        type: string
                        format: uuid
                      run:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          property_id:
                            type: string
                            format: uuid
                          vendor:
                            type: string
                            enum:
                              - smile
                          run_type:
                            type: string
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          blockers:
                            type: array
                            items:
                              type: string
                          details:
                            type: object
                            additionalProperties:
{}
                          started_at:
                            type: string
                            format: date-time
                          finished_at:
                            type: string
                            format: date-time
                          created_at:
                            type: string
                            format: date-time
                        required:
                          - id
                          - property_id
                          - vendor
                          - run_type
                          - state
                          - message
                          - blockers
                          - details
                          - started_at
                          - finished_at
                          - created_at
                        additionalProperties: false
                    required:
                      - retried_from_run_id
                      - run
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/pms/smile/scheduled-sync-sweep:
    post:
      operationId: adminSmilePmsScheduledSyncSweep
      summary: "Run the default scheduled Smile sync policy across the tenant"
      tags:
        - admin
        - supply
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      vendor:
                        type: string
                        enum:
                          - smile
                      checked_at:
                        type: string
                        format: date-time
                      attention_state:
                        type: string
                        enum:
                          - healthy
                          - watch
                          - attention
                      attention_message:
                        type: string
                      consecutive_attention_sweeps:
                        type: integer
                        minimum: 0
                      total_properties:
                        type: integer
                        minimum: 0
                      triggered_full_sync:
                        type: integer
                        minimum: 0
                      retried_failed_run:
                        type: integer
                        minimum: 0
                      skipped_recent:
                        type: integer
                        minimum: 0
                      skipped_disabled:
                        type: integer
                        minimum: 0
                      attention_property_count:
                        type: integer
                        minimum: 0
                      failed_property_count:
                        type: integer
                        minimum: 0
                      blocked_property_count:
                        type: integer
                        minimum: 0
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            property_id:
                              type: string
                              format: uuid
                            property_name:
                              type: string
                            decision:
                              type: string
                              enum:
                                - skipped_disabled
                                - skipped_recent
                                - retried_failed_run
                                - triggered_full_sync
                            selected_run_id:
                              type: string
                              format: uuid
                              nullable: true
                            selected_run_type:
                              type: string
                              nullable: true
                            run:
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                property_id:
                                  type: string
                                  format: uuid
                                vendor:
                                  type: string
                                  enum:
                                    - smile
                                run_type:
                                  type: string
                                state:
                                  type: string
                                  enum:
                                    - success
                                    - blocked
                                    - failed
                                    - not_implemented
                                message:
                                  type: string
                                blockers:
                                  type: array
                                  items:
                                    type: string
                                details:
                                  type: object
                                  additionalProperties:
{}
                                started_at:
                                  type: string
                                  format: date-time
                                finished_at:
                                  type: string
                                  format: date-time
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - property_id
                                - vendor
                                - run_type
                                - state
                                - message
                                - blockers
                                - details
                                - started_at
                                - finished_at
                                - created_at
                              additionalProperties: false
                              nullable: true
                            next_window_starts_at:
                              type: string
                              format: date-time
                          required:
                            - property_id
                            - property_name
                            - decision
                            - selected_run_id
                            - selected_run_type
                            - run
                            - next_window_starts_at
                          additionalProperties: false
                    required:
                      - vendor
                      - checked_at
                      - attention_state
                      - attention_message
                      - consecutive_attention_sweeps
                      - total_properties
                      - triggered_full_sync
                      - retried_failed_run
                      - skipped_recent
                      - skipped_disabled
                      - attention_property_count
                      - failed_property_count
                      - blocked_property_count
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/pms/smile/scheduled-sync-sweeps:
    get:
      operationId: adminSmilePmsScheduledSyncSweeps
      summary: "List recent tenant-level Smile PMS scheduled sweeps"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 20
            default: 5
          in: query
          name: limit
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            vendor:
                              type: string
                              enum:
                                - smile
                            state:
                              type: string
                              enum:
                                - success
                                - blocked
                                - failed
                                - not_implemented
                            message:
                              type: string
                            attention_state:
                              type: string
                              enum:
                                - healthy
                                - watch
                                - attention
                            attention_message:
                              type: string
                            consecutive_attention_sweeps:
                              type: integer
                              minimum: 0
                            total_properties:
                              type: integer
                              minimum: 0
                            triggered_full_sync:
                              type: integer
                              minimum: 0
                            retried_failed_run:
                              type: integer
                              minimum: 0
                            skipped_recent:
                              type: integer
                              minimum: 0
                            skipped_disabled:
                              type: integer
                              minimum: 0
                            attention_property_count:
                              type: integer
                              minimum: 0
                            failed_property_count:
                              type: integer
                              minimum: 0
                            blocked_property_count:
                              type: integer
                              minimum: 0
                            details:
                              type: object
                              additionalProperties:
{}
                            created_at:
                              type: string
                              format: date-time
                          required:
                            - id
                            - vendor
                            - state
                            - message
                            - attention_state
                            - attention_message
                            - consecutive_attention_sweeps
                            - total_properties
                            - triggered_full_sync
                            - retried_failed_run
                            - skipped_recent
                            - skipped_disabled
                            - attention_property_count
                            - failed_property_count
                            - blocked_property_count
                            - details
                            - created_at
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/scheduled-sync-trigger:
    post:
      operationId: adminSmilePmsScheduledSyncTrigger
      summary: "Run the default scheduled Smile sync policy for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      checked_at:
                        type: string
                        format: date-time
                      decision:
                        type: string
                        enum:
                          - skipped_disabled
                          - skipped_recent
                          - retried_failed_run
                          - triggered_full_sync
                      message:
                        type: string
                      selected_run_id:
                        type: string
                        format: uuid
                        nullable: true
                      selected_run_type:
                        type: string
                        nullable: true
                      next_window_starts_at:
                        type: string
                        format: date-time
                      run:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          property_id:
                            type: string
                            format: uuid
                          vendor:
                            type: string
                            enum:
                              - smile
                          run_type:
                            type: string
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          blockers:
                            type: array
                            items:
                              type: string
                          details:
                            type: object
                            additionalProperties:
{}
                          started_at:
                            type: string
                            format: date-time
                          finished_at:
                            type: string
                            format: date-time
                          created_at:
                            type: string
                            format: date-time
                        required:
                          - id
                          - property_id
                          - vendor
                          - run_type
                          - state
                          - message
                          - blockers
                          - details
                          - started_at
                          - finished_at
                          - created_at
                        additionalProperties: false
                        nullable: true
                    required:
                      - property_id
                      - vendor
                      - checked_at
                      - decision
                      - message
                      - selected_run_id
                      - selected_run_type
                      - next_window_starts_at
                      - run
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/full-sync:
    post:
      operationId: adminSmilePmsFullSync
      summary: "Run full Smile PMS sync for a property"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                to:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                since:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      from:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      to:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      since:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      inventory:
                        type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          updated:
                            type: integer
                            minimum: 0
                          days_found:
                            type: integer
                            minimum: 0
                            nullable: true
                        required:
                          - state
                          - message
                          - updated
                          - days_found
                        additionalProperties: false
                      reservations:
                        type: object
                        properties:
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          reservations_found:
                            type: integer
                            minimum: 0
                            nullable: true
                        required:
                          - state
                          - message
                          - reservations_found
                        additionalProperties: false
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                      run:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          property_id:
                            type: string
                            format: uuid
                          vendor:
                            type: string
                            enum:
                              - smile
                          run_type:
                            type: string
                          state:
                            type: string
                            enum:
                              - success
                              - blocked
                              - failed
                              - not_implemented
                          message:
                            type: string
                          blockers:
                            type: array
                            items:
                              type: string
                          details:
                            type: object
                            additionalProperties:
{}
                          started_at:
                            type: string
                            format: date-time
                          finished_at:
                            type: string
                            format: date-time
                          created_at:
                            type: string
                            format: date-time
                        required:
                          - id
                          - property_id
                          - vendor
                          - run_type
                          - state
                          - message
                          - blockers
                          - details
                          - started_at
                          - finished_at
                          - created_at
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - from
                      - to
                      - since
                      - inventory
                      - reservations
                      - runtime
                      - run
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/inventory-sync:
    post:
      operationId: adminSmilePmsInventorySync
      summary: "Run Smile PMS inventory sync for a property"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                to:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
              required:
                - from
                - to
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      from:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      to:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      days_found:
                        type: integer
                        minimum: 0
                        nullable: true
                      updated:
                        type: integer
                        minimum: 0
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - from
                      - to
                      - days_found
                      - updated
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/reservation-sync:
    post:
      operationId: adminSmilePmsReservationSync
      summary: "Run Smile PMS reservation sync for a property"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                since:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
              required:
                - since
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      since:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      reservations_found:
                        type: integer
                        minimum: 0
                        nullable: true
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - since
                      - reservations_found
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/catalog-preview:
    post:
      operationId: adminSmilePmsCatalogPreview
      summary: "Preview Smile PMS metadata import for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      room_types_found:
                        type: integer
                        minimum: 0
                        nullable: true
                      rate_plans_found:
                        type: integer
                        minimum: 0
                        nullable: true
                      room_types:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            name:
                              type: string
                          required:
                            - code
                            - name
                          additionalProperties: false
                      rate_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            name:
                              type: string
                            room_code:
                              type: string
                          required:
                            - code
                            - name
                          additionalProperties: false
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - room_types_found
                      - rate_plans_found
                      - room_types
                      - rate_plans
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/room-types:
    get:
      operationId: adminListRoomTypes
      summary: "List room types for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            code:
                              type: string
                            name:
                              type: string
                            description:
                              type: string
                              nullable: true
                            max_occupancy:
                              type: number
                            bed_type:
                              type: string
                              nullable: true
                            floor_size_sqm:
                              type: number
                              nullable: true
                            amenities:
                              type: array
                              items:
                                type: string
                            images:
                              type: array
                              items:
                                type: string
                            smoking_allowed:
                              type: boolean
                            default_inventory:
                              type: number
                            pms_room_type_code:
                              type: string
                              nullable: true
                            channel_manager_room_type_code:
                              type: string
                              nullable: true
                            rate_plan_count:
                              type: number
                            created_at:
                              type: string
                          required:
                            - id
                            - code
                            - name
                            - description
                            - max_occupancy
                            - bed_type
                            - floor_size_sqm
                            - amenities
                            - images
                            - smoking_allowed
                            - default_inventory
                            - pms_room_type_code
                            - channel_manager_room_type_code
                            - rate_plan_count
                            - created_at
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
    post:
      operationId: adminCreateRoomType
      summary: "Create a room type"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  minLength: 1
                  maxLength: 50
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                description:
                  type: string
                  maxLength: 2000
                  nullable: true
                  default: null
                max_occupancy:
                  type: integer
                  minimum: 1
                  maximum: 20
                bed_type:
                  type: string
                  maxLength: 50
                  nullable: true
                  default: null
                floor_size_sqm:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  nullable: true
                  default: null
                amenities:
                  type: array
                  items:
                    type: string
                  default:
[]
                images:
                  type: array
                  items:
                    type: string
                    format: uri
                  default:
[]
                smoking_allowed:
                  type: boolean
                  default: false
                default_inventory:
                  type: integer
                  minimum: 0
                  default: 0
                pms_room_type_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                  default: null
                channel_manager_room_type_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                  default: null
              required:
                - code
                - name
                - max_occupancy
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      code:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      max_occupancy:
                        type: number
                      bed_type:
                        type: string
                        nullable: true
                      floor_size_sqm:
                        type: number
                        nullable: true
                      amenities:
                        type: array
                        items:
                          type: string
                      images:
                        type: array
                        items:
                          type: string
                      smoking_allowed:
                        type: boolean
                      default_inventory:
                        type: number
                      pms_room_type_code:
                        type: string
                        nullable: true
                      channel_manager_room_type_code:
                        type: string
                        nullable: true
                      rate_plan_count:
                        type: number
                      created_at:
                        type: string
                    required:
                      - id
                      - code
                      - name
                      - description
                      - max_occupancy
                      - bed_type
                      - floor_size_sqm
                      - amenities
                      - images
                      - smoking_allowed
                      - default_inventory
                      - pms_room_type_code
                      - channel_manager_room_type_code
                      - rate_plan_count
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/admin/properties/{id}/pms/smile/inventory-preview:
    post:
      operationId: adminSmilePmsInventoryPreview
      summary: "Preview Smile PMS inventory pull for a property"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                to:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
              required:
                - from
                - to
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      from:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      to:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      days_found:
                        type: integer
                        minimum: 0
                        nullable: true
                      days:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            room_type_id:
                              type: string
                              format: uuid
                            available:
                              type: integer
                              minimum: 0
                            stop_sell:
                              type: boolean
                          required:
                            - date
                            - room_type_id
                            - available
                            - stop_sell
                          additionalProperties: false
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - from
                      - to
                      - days_found
                      - days
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/reservation-preview:
    post:
      operationId: adminSmilePmsReservationPreview
      summary: "Preview Smile PMS reservation pull for a property"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                since:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
              required:
                - since
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      since:
                        type: string
                        pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                      reservations_found:
                        type: integer
                        minimum: 0
                        nullable: true
                      reservations:
                        type: array
                        items:
                          type: object
                          properties:
                            external_id:
                              type: string
                            property_id:
                              type: string
                              format: uuid
                            room_type_id:
                              type: string
                              format: uuid
                            rate_plan_code:
                              type: string
                            check_in:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            check_out:
                              type: string
                              pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                            guest_name:
                              type: string
                            guest_email:
                              type: string
                            state:
                              type: string
                              enum:
                                - pending
                                - confirmed
                                - cancelled
                                - checked_in
                                - checked_out
                                - no_show
                            total_amount:
                              type: integer
                              minimum: 0
                            total_currency:
                              type: string
                            rooms:
                              type: integer
                              exclusiveMinimum: true
                              minimum: 0
                            updated_at:
                              type: string
                              format: date-time
                          required:
                            - external_id
                            - property_id
                            - room_type_id
                            - check_in
                            - check_out
                            - guest_name
                            - state
                            - total_amount
                            - total_currency
                            - rooms
                            - updated_at
                          additionalProperties: false
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - since
                      - reservations_found
                      - reservations
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/booking-push-preview:
    post:
      operationId: adminSmilePmsBookingPushPreview
      summary: "Preview Smile PMS booking push payload for a property"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                room_type_id:
                  type: string
                  format: uuid
                rate_plan_id:
                  type: string
                  format: uuid
                check_in:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                check_out:
                  type: string
                  pattern: "^\\d{4}-\\d{2}-\\d{2}$"
                rooms:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                guest_full_name:
                  type: string
                  minLength: 1
                  maxLength: 200
                guest_email:
                  type: string
                  format: email
                guest_phone:
                  type: string
                  minLength: 3
                  maxLength: 40
                total_amount:
                  type: integer
                  minimum: 0
                total_currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                  pattern: "^[A-Z]{3}$"
                confirmation_code:
                  type: string
                  minLength: 3
                  maxLength: 64
                booking_id:
                  type: string
                  minLength: 3
                  maxLength: 120
                dry_run:
                  type: boolean
                  default: true
              required:
                - room_type_id
                - rate_plan_id
                - check_in
                - check_out
                - rooms
                - guest_full_name
                - guest_email
                - guest_phone
                - total_amount
                - total_currency
                - confirmation_code
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      dry_run:
                        type: boolean
                      payload:
                        type: object
                        additionalProperties:
{}
                        nullable: true
                      external_ref:
                        type: string
                        nullable: true
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - dry_run
                      - payload
                      - external_ref
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/pms/smile/cancellation-preview:
    post:
      operationId: adminSmilePmsCancellationPreview
      summary: "Preview Smile PMS cancellation payload for a property"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                booking_id:
                  type: string
                  minLength: 1
                  maxLength: 120
                external_ref:
                  type: string
                  minLength: 1
                  maxLength: 120
                reason:
                  type: string
                  maxLength: 500
                dry_run:
                  type: boolean
                  default: true
              required:
                - booking_id
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      property_id:
                        type: string
                        format: uuid
                      vendor:
                        type: string
                        enum:
                          - smile
                      state:
                        type: string
                        enum:
                          - success
                          - blocked
                          - failed
                          - not_implemented
                      checked_at:
                        type: string
                        format: date-time
                      message:
                        type: string
                      blockers:
                        type: array
                        items:
                          type: string
                      endpoint:
                        type: string
                        nullable: true
                      property_code:
                        type: string
                        nullable: true
                      dry_run:
                        type: boolean
                      payload:
                        type: object
                        additionalProperties:
{}
                        nullable: true
                      external_ref:
                        type: string
                        nullable: true
                      runtime:
                        type: object
                        properties:
                          active:
                            type: boolean
                          connector:
                            type: string
                          configured:
                            type: boolean
                        required:
                          - active
                          - connector
                          - configured
                        additionalProperties: false
                    required:
                      - property_id
                      - vendor
                      - state
                      - checked_at
                      - message
                      - blockers
                      - endpoint
                      - property_code
                      - dry_run
                      - payload
                      - external_ref
                      - runtime
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/properties/{id}/room-types/{rtId}:
    put:
      operationId: adminUpdateRoomType
      summary: "Update a room type"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  minLength: 1
                  maxLength: 50
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                description:
                  type: string
                  maxLength: 2000
                  nullable: true
                  default: null
                max_occupancy:
                  type: integer
                  minimum: 1
                  maximum: 20
                bed_type:
                  type: string
                  maxLength: 50
                  nullable: true
                  default: null
                floor_size_sqm:
                  type: number
                  exclusiveMinimum: true
                  minimum: 0
                  nullable: true
                  default: null
                amenities:
                  type: array
                  items:
                    type: string
                  default:
[]
                images:
                  type: array
                  items:
                    type: string
                    format: uri
                  default:
[]
                smoking_allowed:
                  type: boolean
                  default: false
                default_inventory:
                  type: integer
                  minimum: 0
                  default: 0
                pms_room_type_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                  default: null
                channel_manager_room_type_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                  default: null
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
        - schema:
            type: string
            format: uuid
          in: path
          name: rtId
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      code:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      max_occupancy:
                        type: number
                      bed_type:
                        type: string
                        nullable: true
                      floor_size_sqm:
                        type: number
                        nullable: true
                      amenities:
                        type: array
                        items:
                          type: string
                      images:
                        type: array
                        items:
                          type: string
                      smoking_allowed:
                        type: boolean
                      default_inventory:
                        type: number
                      pms_room_type_code:
                        type: string
                        nullable: true
                      channel_manager_room_type_code:
                        type: string
                        nullable: true
                      rate_plan_count:
                        type: number
                      created_at:
                        type: string
                    required:
                      - id
                      - code
                      - name
                      - description
                      - max_occupancy
                      - bed_type
                      - floor_size_sqm
                      - amenities
                      - images
                      - smoking_allowed
                      - default_inventory
                      - pms_room_type_code
                      - channel_manager_room_type_code
                      - rate_plan_count
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
    delete:
      operationId: adminDeleteRoomType
      summary: "Delete a room type"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
        - schema:
            type: string
            format: uuid
          in: path
          name: rtId
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      deleted:
                        type: boolean
                    required:
                      - deleted
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/admin/properties/{id}/rate-plans:
    get:
      operationId: adminListRatePlans
      summary: "List rate plans for a property"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            room_type_id:
                              type: string
                            code:
                              type: string
                            name:
                              type: string
                            currency:
                              type: string
                            base_rate_per_night:
                              type: number
                            meal_plan:
                              type: string
                            cancellation_kind:
                              type: string
                            free_cancellation_hours_before_checkin:
                              type: number
                            cancellation_fee_pct_after_cutoff:
                              type: number
                            pms_rate_plan_code:
                              type: string
                              nullable: true
                            channel_manager_rate_plan_code:
                              type: string
                              nullable: true
                            created_at:
                              type: string
                          required:
                            - id
                            - room_type_id
                            - code
                            - name
                            - currency
                            - base_rate_per_night
                            - meal_plan
                            - cancellation_kind
                            - free_cancellation_hours_before_checkin
                            - cancellation_fee_pct_after_cutoff
                            - pms_rate_plan_code
                            - channel_manager_rate_plan_code
                            - created_at
                          additionalProperties: false
                    required:
                      - items
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: false
    post:
      operationId: adminCreateRatePlan
      summary: "Create a rate plan"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                room_type_id:
                  type: string
                  format: uuid
                code:
                  type: string
                  minLength: 1
                  maxLength: 50
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                base_rate_per_night:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                meal_plan:
                  type: string
                  enum:
                    - room_only
                    - breakfast_included
                    - half_board
                    - full_board
                  default: room_only
                cancellation_kind:
                  type: string
                  enum:
                    - flexible
                    - moderate
                    - strict
                    - non_refundable
                  default: flexible
                free_cancellation_hours_before_checkin:
                  type: integer
                  minimum: 0
                  default: 48
                cancellation_fee_pct_after_cutoff:
                  type: integer
                  minimum: 0
                  maximum: 100
                  default: 100
                pms_rate_plan_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                  default: null
                channel_manager_rate_plan_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                  default: null
              required:
                - room_type_id
                - code
                - name
                - currency
                - base_rate_per_night
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        201:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      room_type_id:
                        type: string
                      code:
                        type: string
                      name:
                        type: string
                      currency:
                        type: string
                      base_rate_per_night:
                        type: number
                      meal_plan:
                        type: string
                      cancellation_kind:
                        type: string
                      free_cancellation_hours_before_checkin:
                        type: number
                      cancellation_fee_pct_after_cutoff:
                        type: number
                      pms_rate_plan_code:
                        type: string
                        nullable: true
                      channel_manager_rate_plan_code:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                    required:
                      - id
                      - room_type_id
                      - code
                      - name
                      - currency
                      - base_rate_per_night
                      - meal_plan
                      - cancellation_kind
                      - free_cancellation_hours_before_checkin
                      - cancellation_fee_pct_after_cutoff
                      - pms_rate_plan_code
                      - channel_manager_rate_plan_code
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/admin/properties/{id}/rate-plans/{rpId}:
    put:
      operationId: adminUpdateRatePlan
      summary: "Update a rate plan"
      tags:
        - admin
        - supply
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  minLength: 1
                  maxLength: 50
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                base_rate_per_night:
                  type: integer
                  exclusiveMinimum: true
                  minimum: 0
                meal_plan:
                  type: string
                  enum:
                    - room_only
                    - breakfast_included
                    - half_board
                    - full_board
                  default: room_only
                cancellation_kind:
                  type: string
                  enum:
                    - flexible
                    - moderate
                    - strict
                    - non_refundable
                  default: flexible
                free_cancellation_hours_before_checkin:
                  type: integer
                  minimum: 0
                  default: 48
                cancellation_fee_pct_after_cutoff:
                  type: integer
                  minimum: 0
                  maximum: 100
                  default: 100
                pms_rate_plan_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                  default: null
                channel_manager_rate_plan_code:
                  type: string
                  minLength: 1
                  maxLength: 120
                  nullable: true
                  default: null
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
        - schema:
            type: string
            format: uuid
          in: path
          name: rpId
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      room_type_id:
                        type: string
                      code:
                        type: string
                      name:
                        type: string
                      currency:
                        type: string
                      base_rate_per_night:
                        type: number
                      meal_plan:
                        type: string
                      cancellation_kind:
                        type: string
                      free_cancellation_hours_before_checkin:
                        type: number
                      cancellation_fee_pct_after_cutoff:
                        type: number
                      pms_rate_plan_code:
                        type: string
                        nullable: true
                      channel_manager_rate_plan_code:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                    required:
                      - id
                      - room_type_id
                      - code
                      - name
                      - currency
                      - base_rate_per_night
                      - meal_plan
                      - cancellation_kind
                      - free_cancellation_hours_before_checkin
                      - cancellation_fee_pct_after_cutoff
                      - pms_rate_plan_code
                      - channel_manager_rate_plan_code
                      - created_at
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
    delete:
      operationId: adminDeleteRatePlan
      summary: "Delete a rate plan"
      tags:
        - admin
        - supply
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
        - schema:
            type: string
            format: uuid
          in: path
          name: rpId
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      deleted:
                        type: boolean
                    required:
                      - deleted
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
        404:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        409:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      detail:
                        type: object
                        additionalProperties:
{}
                      remediation:
                        type: string
                      retry_after:
                        type: integer
                        minimum: 0
                        nullable: true
                      docs_url:
                        type: string
                      trace_id:
                        type: string
                      next_actions:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              enum:
                                - search
                                - quote
                                - requote
                                - create_hold
                                - confirm
                                - cancel
                                - release
                                - extend
                                - retry
                                - get
                                - get_audit
                                - get_refund
                                - issue_refund
                            method:
                              type: string
                              enum:
                                - GET
                                - POST
                                - PUT
                                - DELETE
                                - PATCH
                            href:
                              type: string
                            body_hint:
                              type: object
                              additionalProperties:
{}
                            expires_at:
                              type: string
                              format: date-time
                          required:
                            - rel
                            - method
                            - href
                          additionalProperties: false
                    required:
                      - code
                      - message
                      - detail
                      - remediation
                      - retry_after
                      - docs_url
                      - trace_id
                      - next_actions
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/admin/crawl/jobs:
    post:
      operationId: createCrawlJob
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                property_id:
                  type: string
                  format: uuid
                url:
                  type: string
                  format: uri
                page_limit:
                  type: integer
                  minimum: 1
                  maximum: 200
                  default: 30
                include_paths:
                  type: array
                  items:
                    type: string
                exclude_paths:
                  type: array
                  items:
                    type: string
              required:
                - property_id
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      tenant_id:
                        type: string
                        format: uuid
                      property_id:
                        type: string
                        format: uuid
                        nullable: true
                      target_url:
                        type: string
                      crawl_mode:
                        type: string
                      status:
                        type: string
                      page_limit:
                        type: number
                      pages_crawled:
                        type: number
                      pages_extracted:
                        type: number
                      error_message:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                      started_at:
                        type: string
                        nullable: true
                      completed_at:
                        type: string
                        nullable: true
                      created_by:
                        type: string
                        nullable: true
                    required:
                      - id
                      - tenant_id
                      - property_id
                      - target_url
                      - crawl_mode
                      - status
                      - page_limit
                      - pages_crawled
                      - pages_extracted
                      - error_message
                      - created_at
                      - started_at
                      - completed_at
                      - created_by
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: true
    get:
      operationId: listCrawlJobs
      tags:
        - admin
      parameters:
        - schema:
            type: string
            enum:
              - pending
              - running
              - done
              - failed
              - cancelled
          in: query
          name: status
          required: false
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            tenant_id:
                              type: string
                              format: uuid
                            property_id:
                              type: string
                              format: uuid
                              nullable: true
                            target_url:
                              type: string
                            crawl_mode:
                              type: string
                            status:
                              type: string
                            page_limit:
                              type: number
                            pages_crawled:
                              type: number
                            pages_extracted:
                              type: number
                            error_message:
                              type: string
                              nullable: true
                            created_at:
                              type: string
                            started_at:
                              type: string
                              nullable: true
                            completed_at:
                              type: string
                              nullable: true
                            created_by:
                              type: string
                              nullable: true
                          required:
                            - id
                            - tenant_id
                            - property_id
                            - target_url
                            - crawl_mode
                            - status
                            - page_limit
                            - pages_crawled
                            - pages_extracted
                            - error_message
                            - created_at
                            - started_at
                            - completed_at
                            - created_by
                          additionalProperties: false
                      total:
                        type: number
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/crawl/jobs/{id}:
    get:
      operationId: getCrawlJob
      tags:
        - admin
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      job:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          tenant_id:
                            type: string
                            format: uuid
                          property_id:
                            type: string
                            format: uuid
                            nullable: true
                          target_url:
                            type: string
                          crawl_mode:
                            type: string
                          status:
                            type: string
                          page_limit:
                            type: number
                          pages_crawled:
                            type: number
                          pages_extracted:
                            type: number
                          error_message:
                            type: string
                            nullable: true
                          created_at:
                            type: string
                          started_at:
                            type: string
                            nullable: true
                          completed_at:
                            type: string
                            nullable: true
                          created_by:
                            type: string
                            nullable: true
                        required:
                          - id
                          - tenant_id
                          - property_id
                          - target_url
                          - crawl_mode
                          - status
                          - page_limit
                          - pages_crawled
                          - pages_extracted
                          - error_message
                          - created_at
                          - started_at
                          - completed_at
                          - created_by
                        additionalProperties: false
                      pages:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            url:
                              type: string
                            http_status:
                              type: number
                              nullable: true
                            page_type:
                              type: string
                              nullable: true
                            content_hash:
                              type: string
                              nullable: true
                            crawled_at:
                              type: string
                          required:
                            - id
                            - url
                            - http_status
                            - page_type
                            - content_hash
                            - crawled_at
                          additionalProperties: false
                      candidates_summary:
                        type: object
                        properties:
                          pending:
                            type: number
                          accepted:
                            type: number
                          rejected:
                            type: number
                        required:
                          - pending
                          - accepted
                          - rejected
                        additionalProperties: false
                    required:
                      - job
                      - pages
                      - candidates_summary
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/crawl/candidates:
    get:
      operationId: listCrawlCandidates
      tags:
        - admin
      parameters:
        - schema:
            type: string
            enum:
              - pending
              - accepted
              - rejected
              - edited
          in: query
          name: review_status
          required: false
        - schema:
            type: string
            enum:
              - property
              - room_type
              - policy
          in: query
          name: entity_type
          required: false
        - schema:
            type: string
            format: uuid
          in: query
          name: property_id
          required: false
        - schema:
            type: string
            format: uuid
          in: query
          name: crawl_job_id
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            crawl_job_id:
                              type: string
                              format: uuid
                            crawl_page_id:
                              type: string
                              format: uuid
                            property_id:
                              type: string
                              format: uuid
                              nullable: true
                            entity_type:
                              type: string
                            entity_key:
                              type: string
                            extracted_data:
                              type: object
                              additionalProperties:
{}
                            confidence:
                              type: number
                            extraction_method:
                              type: string
                            review_status:
                              type: string
                            reviewed_at:
                              type: string
                              nullable: true
                            reviewed_by:
                              type: string
                              nullable: true
                            created_at:
                              type: string
                          required:
                            - id
                            - crawl_job_id
                            - crawl_page_id
                            - property_id
                            - entity_type
                            - entity_key
                            - extracted_data
                            - confidence
                            - extraction_method
                            - review_status
                            - reviewed_at
                            - reviewed_by
                            - created_at
                          additionalProperties: false
                      total:
                        type: number
                    required:
                      - items
                      - total
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: false
  /v1/admin/crawl/candidates/{id}/accept:
    post:
      operationId: acceptCrawlCandidate
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                overrides:
                  type: object
                  additionalProperties:
{}
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      candidate_id:
                        type: string
                        format: uuid
                      review_status:
                        type: string
                      entity_type:
                        type: string
                      entity_key:
                        type: string
                    required:
                      - candidate_id
                      - review_status
                      - entity_type
                      - entity_key
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/admin/crawl/candidates/{id}/reject:
    post:
      operationId: rejectCrawlCandidate
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  maxLength: 500
              additionalProperties: false
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      candidate_id:
                        type: string
                        format: uuid
                      review_status:
                        type: string
                    required:
                      - candidate_id
                      - review_status
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: true
  /v1/admin/crawl/candidates/bulk-accept:
    post:
      operationId: bulkAcceptCrawlCandidates
      tags:
        - admin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                crawl_job_id:
                  type: string
                  format: uuid
                min_confidence:
                  type: number
                  minimum: 0
                  maximum: 1
                  default: 0.85
                entity_types:
                  type: array
                  items:
                    type: string
                    enum:
                      - property
                      - room_type
                      - policy
              required:
                - crawl_job_id
              additionalProperties: false
      responses:
        200:
          description: "Default Response"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      accepted_count:
                        type: number
                      skipped_count:
                        type: number
                    required:
                      - accepted_count
                      - skipped_count
                    additionalProperties: false
                  trace_id:
                    type: string
                  next_actions:
                    type: array
                    items:
                      type: object
                      properties:
                        rel:
                          type: string
                          enum:
                            - search
                            - quote
                            - requote
                            - create_hold
                            - confirm
                            - cancel
                            - release
                            - extend
                            - retry
                            - get
                            - get_audit
                            - get_refund
                            - issue_refund
                        method:
                          type: string
                          enum:
                            - GET
                            - POST
                            - PUT
                            - DELETE
                            - PATCH
                        href:
                          type: string
                        body_hint:
                          type: object
                          additionalProperties:
{}
                        expires_at:
                          type: string
                          format: date-time
                      required:
                        - rel
                        - method
                        - href
                      additionalProperties: false
                  expires_at:
                    type: string
                    format: date-time
                  receipt:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - booking_confirmed
                          - booking_cancelled
                          - refund_issued
                      issuer:
                        type: string
                      issued_at:
                        type: string
                      subject:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                      payload_hash:
                        type: string
                        pattern: "^sha256:[0-9a-f]{64}$"
                      algorithm:
                        type: string
                        enum:
                          - HS256
                      kid:
                        type: string
                        default: receipt-v1
                      signature:
                        type: string
                        minLength: 1
                    required:
                      - kind
                      - issuer
                      - issued_at
                      - subject
                      - payload_hash
                      - algorithm
                      - signature
                    additionalProperties: false
                required:
                  - data
                  - trace_id
                  - next_actions
                additionalProperties: false
      x-openai-isConsequential: true
servers:
  - url: https://api.hostrail.dev
    description: "Production — live tenants and real payment capture"
  - url: http://localhost:4000
    description: "Local development (host Postgres + StubPaymentProvider)"
security:
  - AgentBearer:
[]
  - TenantHeader:
[]
tags:
  - name: discovery
    description: "Entry points agents use to discover the API (service index, agent card, receipts)"
  - name: health
    description: "Liveness and readiness probes — exempt from rate limiting"
  - name: supply
    description: "Properties, room types, rate plans — the catalog an agent quotes against"
  - name: commerce
    description: "Search → quote → hold → book → cancel — the deterministic money path"
  - name: admin
    description: "Hotel staff operations: bookings, refunds, inventory, content ingest"
x-agent-contract:
  envelope:
    success_fields:
      - data
      - trace_id
      - next_actions
      - expires_at
      - receipt
    error_fields:
      - error.code
      - error.message
      - error.detail
      - error.remediation
      - error.retry_after
      - error.docs_url
      - error.trace_id
      - error.next_actions
    match_on: error.code
    description: "Agents match on `error.code` (stable), not HTTP status or message strings. See ADR-0011."
  flows:
    - id: book_a_room
      steps:
        - search_availability
        - create_quote
        - create_hold
        - confirm_booking
      description: "Golden path: discover → lock price → reserve inventory → pay."
    - id: rebook_after_hold_expiry
      steps:
        - create_quote
        - create_hold
        - confirm_booking
      description: "Recovery path when `hold_expired` (410) fires: requote, rehold."
    - id: cancel_with_refund
      steps:
        - get_booking
        - cancel_booking
      description: "Cancel a booking. Fee + refund computed from frozen policy_snapshot."
    - id: prove_what_happened
      steps:
        - get_booking
        - get_booking_audit
      description: "Reconstruct the booking history from outbox events."
  discovery:
    agent_card: https://api.hostrail.dev/.well-known/agent-card.json
    ai_plugin: https://api.hostrail.dev/.well-known/ai-plugin.json
    error_catalog: https://docs.hostrail.dev/errors
  idempotency:
    header: Idempotency-Key
    body_field: idempotency_key
    scoped_endpoints:
      - /v1/holds
      - /v1/bookings
    replay_marker_header: Idempotent-Replayed
  rate_limit:
    default_per_tenant_per_minute: 100
    key_header: "Authorization (preferred) / X-Tenant-Id (dev fallback)"
    exempt_paths:
      - /healthz
      - /readyz
    retry_after_header: Retry-After