openapi: 3.1.0
info:
  title: Edelweiss Hotel Polyana API
  version: 1.0.0
  description: Official public REST API and structured data feeds for Hotel Edelweiss (Polyana resort, Zakarpattia, Ukraine). Provides real-time room tariffs (SSOT 2026), verified Booking.com rating (9.1/10), balneological profile for 'Polyana Kvasova' mineral water, Google Hotel Center XML feed, and search services.
  contact:
    name: Edelweiss Hotel Administration
    url: https://edelweiss-hotel.com.ua/contacts
    email: welcome@edelweiss-hotel.com.ua
  license:
    name: CC BY-ND 4.0
    url: https://creativecommons.org/licenses/by-nd/4.0/
servers:
  - url: https://edelweiss-hotel.com.ua
    description: Production server
tags:
  - name: Hotel Information
    description: Public factual data, ratings, room tariffs, and resort profiles
  - name: Availability & Pricing
    description: Real-time rates and XML listing feeds for Google Hotels & OTA aggregators
  - name: Search
    description: Public content and room search query endpoint
  - name: AI & LLM Manifests
    description: Structured Markdown and text discovery endpoints for AI agents
paths:
  /api/quote/:
    get:
      tags:
        - Availability & Pricing
      summary: Real-time Room Rate & Stay Quote Calculator
      description: Calculates exact cost for a stay given check-in, check-out dates, room type, and optional full-board meals or military discounts.
      operationId: calculateStayQuote
      parameters:
        - name: check_in
          in: query
          required: true
          description: Check-in date (YYYY-MM-DD)
          schema:
            type: string
            format: date
            example: '2026-10-01'
        - name: check_out
          in: query
          required: true
          description: Check-out date (YYYY-MM-DD)
          schema:
            type: string
            format: date
            example: '2026-10-05'
        - name: room
          in: query
          required: false
          description: Room category key or slug ('standart', 'superior-triple', 'classic-lux', 'lux')
          schema:
            type: string
            enum: [standard, superior-triple, classic-lux, lux]
            default: standard
        - name: guests
          in: query
          required: false
          description: Number of guests staying
          schema:
            type: integer
            default: 2
            minimum: 1
            maximum: 5
        - name: meals
          in: query
          required: false
          description: Include 3-times daily full-board dining (600 UAH/person/day)
          schema:
            type: boolean
            default: false
        - name: military
          in: query
          required: false
          description: Apply 10% discount for Armed Forces of Ukraine (AFU/ZSU) servicemen and veterans
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Detailed quote calculation with itemized cost breakdown and direct booking URL
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Cache-Control:
              schema:
                type: string
                example: public, max-age=300
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StayQuote'
        '400':
          description: Invalid date range or exceeding maximum room capacity
  /api/ai-info/:
    get:
      tags:
        - Hotel Information
      summary: Comprehensive Hotel Information & Room Tariffs (JSON)
      description: Returns full master SSOT hotel metadata, room tariffs for 2026, verified Booking.com rating (9.1/10), balneological medical profile ('Polyana Kvasova' mineral water), amenities, infrastructure, and policies.
      operationId: getHotelAiInfo
      responses:
        '200':
          description: Hotel details and room tariffs successfully retrieved
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
              description: CORS header permitting cross-origin requests from any client
            Cache-Control:
              schema:
                type: string
                example: public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800
              description: HTTP caching directive
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HotelAiData'
  /api/google-hotels/:
    get:
      tags:
        - Availability & Pricing
      summary: Google Hotel Center XML Feed
      description: Outputs real-time pricing and room listing XML feed compliant with Google Hotels standard schema. Includes live rates, room category codes, capacity, and direct booking URLs.
      operationId: getGoogleHotelsXml
      responses:
        '200':
          description: Valid Google Hotel Center XML feed
          content:
            application/xml:
              schema:
                type: string
  /api/search:
    get:
      tags:
        - Search
      summary: Live Search across Rooms & Hotel Services
      description: Performs fast search across published rooms, services, FAQs, and articles.
      operationId: searchContent
      parameters:
        - name: q
          in: query
          required: true
          description: Search query string (minimum 2 characters)
          schema:
            type: string
            example: люкс
        - name: lang
          in: query
          required: false
          description: Language code ('uk' or 'en')
          schema:
            type: string
            enum:
              - uk
              - en
            default: uk
        - name: per_page
          in: query
          required: false
          description: Maximum number of results to return
          schema:
            type: integer
            default: 20
      responses:
        '200':
          description: Search results array
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                  total:
                    type: integer
                  query:
                    type: string
  /llms.txt:
    get:
      tags:
        - AI & LLM Manifests
      summary: LLM Standard Knowledge Manifest (Markdown)
      description: Structured Markdown context file conforming to the llmstxt.org specification for LLMs, ChatGPT, Claude, and Perplexity.
      operationId: getLlmsTxt
      responses:
        '200':
          description: Plaintext Markdown content
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    HotelAiData:
      type: object
      properties:
        hotel:
          type: object
          properties:
            id:
              type: string
            nameUk:
              type: string
            nameEn:
              type: string
            stars:
              type: integer
            totalRooms:
              type: integer
            floors:
              type: integer
            website:
              type: string
              format: uri
            directBookingUrl:
              type: string
              format: uri
        rating:
          type: object
          properties:
            booking:
              type: number
            google:
              type: number
            totalReviews:
              type: integer
            badge:
              type: string
        location:
          type: object
          properties:
            addressUk:
              type: string
            addressEn:
              type: string
            country:
              type: string
            postalCode:
              type: string
        roomTariffs2026:
          type: array
          items:
            $ref: '#/components/schemas/RoomTariff'
    RoomTariff:
      type: object
      properties:
        key:
          type: string
        canonicalSlug:
          type: string
        nameUk:
          type: string
        nameEn:
          type: string
        pricePerNightUah:
          type: number
        areaSqm:
          type: number
        capacityGuests:
          type: integer
        hasBalcony:
          type: boolean
    StayQuote:
      type: object
      properties:
        quote:
          type: object
          properties:
            hotel:
              type: object
              properties:
                id:
                  type: string
                nameUk:
                  type: string
                nameEn:
                  type: string
                phone:
                  type: string
                website:
                  type: string
                  format: uri
            dates:
              type: object
              properties:
                checkIn:
                  type: string
                  format: date
                checkOut:
                  type: string
                  format: date
                nights:
                  type: integer
            room:
              type: object
              properties:
                key:
                  type: string
                slug:
                  type: string
                nameUk:
                  type: string
                nameEn:
                  type: string
                areaSqm:
                  type: number
                capacity:
                  type: integer
                hasBalcony:
                  type: boolean
                baseRatePerNightUah:
                  type: number
            occupancy:
              type: object
              properties:
                guests:
                  type: integer
                extraBed:
                  type: boolean
            costBreakdown:
              type: object
              properties:
                currency:
                  type: string
                  example: UAH
                baseAccommodationUah:
                  type: number
                militaryDiscountUah:
                  type: number
                netAccommodationUah:
                  type: number
                mealsUah:
                  type: number
                extraBedUah:
                  type: number
                resortTaxUah:
                  type: number
                grandTotalUah:
                  type: number
            notes:
              type: object
              properties:
                resortTax:
                  type: string
                meals:
                  type: string
                bestRateGuarantee:
                  type: string
            directBookingUrl:
              type: string
              format: uri
