{
  "openapi": "3.1.0",
  "info": {
    "title": "Hotel Alisei & Spa Booking API",
    "version": "1.0.0",
    "description": "API for checking room availability, apartment rates, booking accommodations, and agent authentication at Hotel Alisei & Spa, Las Terrenas, Dominican Republic.",
    "contact": {
      "name": "Hotel Alisei Concierge",
      "url": "https://aliseihotelspa.com/contact.html",
      "email": "info@aliseihotelspa.com"
    }
  },
  "servers": [
    {
      "url": "https://aliseihotelspa.com",
      "description": "Production Server"
    },
    {
      "url": "https://pc.aliseihotelspa.com",
      "description": "Development Server"
    }
  ],
  "paths": {
    "/api/v1/booking/availability": {
      "get": {
        "summary": "Check room and apartment availability",
        "description": "Returns available apartment categories (Tipo A, B, Honeymoon Suite, Studio, Villa), rates, and occupancy rules for specified dates.",
        "operationId": "getAvailability",
        "parameters": [
          {
            "name": "checkIn",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-12-15"
          },
          {
            "name": "checkOut",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-12-20"
          },
          {
            "name": "adults",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 2
            }
          },
          {
            "name": "children",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Available apartments with rates and terms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available_rooms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "room_type": { "type": "string" },
                          "name": { "type": "string" },
                          "max_occupancy": { "type": "integer" },
                          "nightly_rate_usd": { "type": "number" },
                          "total_estimate_usd": { "type": "number" },
                          "currency": { "type": "string", "example": "USD" },
                          "amenities": {
                            "type": "array",
                            "items": { "type": "string" }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/agent/register": {
      "post": {
        "summary": "Register AI Agent",
        "description": "Register an autonomous agent via ID-JAG or anonymous flow per auth.md specification.",
        "operationId": "registerAgent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identity_type": {
                    "type": "string",
                    "enum": ["anonymous", "identity_assertion"]
                  },
                  "assertion_type": {
                    "type": "string",
                    "enum": ["urn:ietf:params:oauth:token-type:id-jag", "verified_email"]
                  },
                  "assertion": { "type": "string" },
                  "requested_scopes": {
                    "type": "array",
                    "items": { "type": "string" }
                  }
                },
                "required": ["identity_type"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Token issued successfully" },
          "400": { "description": "Invalid registration request" }
        }
      }
    },
    "/agent/claim": {
      "post": {
        "summary": "Initiate Claim Ceremony",
        "description": "Request user verification code to escalate scopes to booking permissions.",
        "operationId": "claimAgent",
        "responses": {
          "200": { "description": "Claim ceremony challenge initiated" }
        }
      }
    }
  }
}
