openapi: 3.1.0
info:
  title: Avrupa Rüyası Public Tours API
  version: 1.0.0
  description: Read-only tour catalog for agents and integrations. No personal data.
servers:
  - url: https://www.avruparuyasi.com.tr
paths:
  /api/public/tours:
    get:
      operationId: listTours
      summary: List published tours
      responses:
        "200":
          description: Tour list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/TourSummary"
  /api/public/tours/{slug}:
    get:
      operationId: getTour
      summary: Tour detail with departures
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Tour detail
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TourDetail"
        "404":
          description: Not found
components:
  schemas:
    TourSummary:
      type: object
      properties:
        slug:
          type: string
        name:
          type: string
        url:
          type: string
          format: uri
        durationNights:
          type: integer
        listPrice:
          type: string
          description: Numeric string, no currency symbols
        priceCurrency:
          type: string
          description: ISO 4217
    TourDetail:
      allOf:
        - $ref: "#/components/schemas/TourSummary"
        - type: object
          properties:
            description:
              type: string
            departures:
              type: array
              items:
                $ref: "#/components/schemas/Departure"
    Departure:
      type: object
      properties:
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
        availability:
          type: string
          enum:
            - https://schema.org/InStock
            - https://schema.org/LimitedAvailability
            - https://schema.org/SoldOut
        occupancyPercent:
          type: number
