{
 "openapi": "3.1.0",
 "info": {
  "title": "Hammergut Neidberg – holiday apartments (Saxon Switzerland)",
  "version": "1.0.0",
  "description": "Live availability, exact prices and booking requests for 4 holiday apartments and 1 holiday house in the historic Hammergut Neidberg, Bielatal, Saxon Switzerland, Germany. Booked directly with the hosts, no portal fees. A booking request only becomes binding after the guest clicks the confirmation link in the e-mail (15 minutes). Also available as MCP server: https://www.ferien-in-der-saechsischen-schweiz.de/mcp.php",
  "contact": {
   "name": "Tom und Katrin Jäger GbR",
   "email": "mail@ferien-in-der-saechsischen-schweiz.de",
   "url": "https://www.ferien-in-der-saechsischen-schweiz.de/"
  }
 },
 "servers": [
  {
   "url": "https://www.ferien-in-der-saechsischen-schweiz.de"
  }
 ],
 "paths": {
  "/agent.php/info": {
   "get": {
    "operationId": "getPropertyInfo",
    "summary": "Property facts, conditions and booking flow",
    "responses": {
     "200": {
      "description": "Property information"
     }
    }
   }
  },
  "/agent.php/accommodations": {
   "get": {
    "operationId": "listAccommodations",
    "summary": "The 5 bookable units with capacity, beds, amenities and photos",
    "responses": {
     "200": {
      "description": "List of accommodations"
     }
    }
   }
  },
  "/agent.php/availability": {
   "get": {
    "operationId": "checkAvailability",
    "summary": "Live availability and prices for a stay (EUR incl. VAT, tourist tax shown separately)",
    "parameters": [
     {
      "name": "checkin",
      "in": "query",
      "schema": {
       "type": "string",
       "format": "date"
      },
      "description": "Arrival YYYY-MM-DD"
     },
     {
      "name": "checkout",
      "in": "query",
      "schema": {
       "type": "string",
       "format": "date"
      },
      "description": "Departure YYYY-MM-DD"
     },
     {
      "name": "adults",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0
      }
     },
     {
      "name": "children_7_17",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0
      }
     },
     {
      "name": "children_3_6",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0
      }
     },
     {
      "name": "guests",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0
      },
      "description": "Total guests if ages unknown"
     },
     {
      "name": "pets",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 0
      }
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "de",
        "fr",
        "cs",
        "nl",
        "pl",
        "it"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Availability per accommodation incl. total price, tourist tax, next free period and booking link"
     },
     "400": {
      "description": "Invalid request"
     }
    }
   }
  },
  "/agent.php/booking-request": {
   "post": {
    "operationId": "createBookingRequest",
    "summary": "Create a booking request on behalf of the guest (guest must confirm by e-mail within 15 minutes)",
    "description": "Only call after the guest explicitly asked to book, confirmed unit, dates, guests and total price, and agreed to the privacy policy https://www.ferien-in-der-saechsischen-schweiz.de/datenschutz.html. Nothing is charged; payment is by bank transfer after confirmation.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "unit_ids",
         "checkin",
         "checkout",
         "adults",
         "guest",
         "privacy_consent"
        ],
        "properties": {
         "unit_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "minItems": 1,
          "maxItems": 4
         },
         "checkin": {
          "type": "string",
          "format": "date"
         },
         "checkout": {
          "type": "string",
          "format": "date"
         },
         "adults": {
          "type": "integer",
          "minimum": 1
         },
         "children_7_17": {
          "type": "integer"
         },
         "children_3_6": {
          "type": "integer"
         },
         "children_0_2": {
          "type": "integer"
         },
         "guests_per_unit": {
          "type": "array",
          "items": {
           "type": "integer"
          }
         },
         "pets": {
          "type": "integer"
         },
         "baby_cot": {
          "type": "boolean"
         },
         "high_chair": {
          "type": "boolean"
         },
         "bike_garage": {
          "type": "boolean"
         },
         "guest": {
          "type": "object",
          "required": [
           "name",
           "email",
           "street",
           "zip",
           "city"
          ],
          "properties": {
           "name": {
            "type": "string"
           },
           "email": {
            "type": "string",
            "format": "email"
           },
           "phone": {
            "type": "string"
           },
           "street": {
            "type": "string"
           },
           "zip": {
            "type": "string"
           },
           "city": {
            "type": "string"
           },
           "country": {
            "type": "string"
           }
          }
         },
         "privacy_consent": {
          "type": "boolean",
          "const": true
         },
         "lang": {
          "type": "string",
          "enum": [
           "en",
           "de",
           "fr",
           "cs",
           "nl",
           "pl",
           "it"
          ]
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Request created, pending guest confirmation"
     },
     "400": {
      "description": "Not accepted (reason in error)"
     },
     "429": {
      "description": "Too many requests"
     }
    }
   }
  }
 }
}