{
  "openapi": "3.1.0",
  "info": {
    "title": "Lilla Älva Availability API",
    "description": "Public availability API for Lilla Älva, a holiday cabin in Sweden. Returns the date ranges that are UNAVAILABLE (already booked or blocked), from today forward. Any dates not covered by a returned range are open. Booking is not done via API: guests submit a booking request through the form on the website at https://lilla-alva.com/en, and the owner confirms by email.",
    "version": "1.0.0",
    "contact": {
      "url": "https://lilla-alva.com/en"
    }
  },
  "servers": [
    {
      "url": "https://lilla-alva.com"
    }
  ],
  "paths": {
    "/api/availability": {
      "get": {
        "operationId": "getAvailability",
        "summary": "List blocked (unavailable) date ranges",
        "description": "Returns all blocked (unavailable) date ranges from today forward. Each event is a half-open range: the cabin is unavailable from startDate up to but not including endDate (end-exclusive, all-day dates). An empty events array means the cabin is fully open for the foreseeable future. No authentication required.",
        "responses": {
          "200": {
            "description": "Blocked date ranges. Dates outside these ranges are available.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["events"],
                  "properties": {
                    "events": {
                      "type": "array",
                      "description": "Blocked (UNAVAILABLE) date ranges, from today forward. Empty array = fully available.",
                      "items": {
                        "type": "object",
                        "required": ["startDate", "endDate"],
                        "properties": {
                          "startDate": {
                            "type": "string",
                            "format": "date",
                            "description": "First unavailable date (inclusive), e.g. 2026-09-01."
                          },
                          "endDate": {
                            "type": "string",
                            "format": "date",
                            "description": "End of the unavailable range (exclusive) — this date itself is available as a check-in date, e.g. 2026-09-05."
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "events": [
                    { "startDate": "2026-09-01", "endDate": "2026-09-05" }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
