{
  "openapi": "3.1.0",
  "info": {
    "title": "Hôtel Celtic, Paris: hotel data and booking requests",
    "version": "1.0.0",
    "description": "Official API of Hôtel Celtic (15 rue d’Odessa, 75014 Paris). Read hotel facts, get indicative prices for dates, and send booking requests to the front desk.",
    "contact": {
      "email": "hotelceltic@wanadoo.fr"
    }
  },
  "servers": [
    {
      "url": "https://hotel-celtic.com"
    }
  ],
  "paths": {
    "/hotel.json": {
      "get": {
        "operationId": "getHotel",
        "summary": "All hotel facts (rooms, prices, policies, location, FAQ) in French and English",
        "responses": {
          "200": {
            "description": "Hotel data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/availability": {
      "get": {
        "operationId": "checkAvailability",
        "summary": "Indicative total price for given dates and guests, and how to book",
        "description": "Availability is not published in real time; the response says so and gives the booking options.",
        "parameters": [
          {
            "name": "checkin",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Arrival date, YYYY-MM-DD"
          },
          {
            "name": "checkout",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Departure date, YYYY-MM-DD (max 30 nights)"
          },
          {
            "name": "adults",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 3,
              "default": 2
            }
          },
          {
            "name": "children",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2,
              "default": 0
            },
            "description": "Children up to 5 years old"
          },
          {
            "name": "room",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "simple",
                "double",
                "twin",
                "triple"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicative prices and booking options",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters"
          }
        }
      }
    },
    "/api/demande": {
      "post": {
        "operationId": "requestBooking",
        "summary": "Send a booking request to the front desk (answered by email)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "firstName",
                  "lastName",
                  "email",
                  "arrival",
                  "departure",
                  "adults"
                ],
                "properties": {
                  "firstName": {
                    "type": "string"
                  },
                  "lastName": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "arrival": {
                    "type": "string",
                    "format": "date"
                  },
                  "departure": {
                    "type": "string",
                    "format": "date"
                  },
                  "adults": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  },
                  "children": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "room": {
                    "type": "string",
                    "enum": [
                      "simple",
                      "double",
                      "twin",
                      "triple"
                    ]
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 1500
                  },
                  "offers": {
                    "type": "boolean",
                    "description": "Guest accepts to receive the hotel’s offers by email"
                  },
                  "lang": {
                    "type": "string",
                    "enum": [
                      "fr",
                      "en"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request sent to the hotel"
          },
          "400": {
            "description": "Invalid request"
          },
          "503": {
            "description": "Email relay not available: contact the hotel by phone or email"
          }
        }
      }
    }
  }
}