{
  "openapi": "3.1.0",
  "info": {
    "title": "Kwipps API",
    "version": "1.2.0",
    "summary": "A Kwipps restaurant's or hotel's bookings on any website, and the desk from your own server.",
    "description": "Documentation: https://kwipps.com/restaurants/api and https://kwipps.com/hotels/api. This file is generated from the API's code and checked against it on every change.\n\n**Keys.** Send the key in `X-Kwipps-Key`. A publishable key (`kw_pk_live_` + 32 letters and digits) lives in a web page, works only from the websites listed for it, and reads the business and sends booking or stay requests. A secret key (`kw_sk_live_`…) lives on the business's server only, is refused whenever a browser sends it (an `Origin` header), and can also do what the console does (the `v2` routes).\n\n**The subscription.** The API answers only for a business with an active Kwipps subscription on Tools, Business or Pro; otherwise every keyed call is `402`. It is checked on every request.\n\n**Limits.** 120 requests a minute per key; 10 booking requests and 10 stay requests a minute per key. The windows turn on the minute.\n\n**Headers.** Every answer carries `Content-Type: application/json; charset=utf-8` (a preflight's 204 has no body), `X-Request-Id` and `Cache-Control`. A browser on a listed website gets `Access-Control-Allow-Origin` with its own origin, and may read X-Request-Id, Retry-After, Idempotent-Replayed, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, RateLimit-Policy.\n\n**Webhooks.** Up to 5 per business, signed, retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h, 24 h, then given up after 8 attempts.",
    "contact": {
      "email": "info@kwipps.com",
      "url": "https://kwipps.com/restaurants/api"
    }
  },
  "servers": [
    {
      "url": "https://nebrrtkdrsljywhkxxrs.supabase.co/functions/v1/api"
    }
  ],
  "externalDocs": {
    "description": "The restaurant API",
    "url": "https://kwipps.com/restaurants/api"
  },
  "tags": [
    {
      "name": "Restaurant",
      "description": "A publishable key: the venue, availability, booking requests, the menu, events."
    },
    {
      "name": "Restaurant bookings",
      "description": "A secret key (v2): what the console does to bookings."
    },
    {
      "name": "Webhooks",
      "description": "A secret key (v2): endpoints that are told the moment something changes."
    },
    {
      "name": "Hotel",
      "description": "A publishable key: the hotel, availability and prices, stay requests.",
      "externalDocs": {
        "url": "https://kwipps.com/hotels/api"
      }
    },
    {
      "name": "Hotel stays",
      "description": "A secret key: what the desk does to stays.",
      "externalDocs": {
        "url": "https://kwipps.com/hotels/api"
      }
    }
  ],
  "paths": {
    "/v1/venue": {
      "get": {
        "operationId": "getVenue",
        "summary": "The restaurant: name, phone, address, opening hours, language, currency, and whether it takes bookings.",
        "tags": [
          "Restaurant"
        ],
        "x-kwipps-since": "v1",
        "security": [
          {
            "publishableKey": []
          },
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The language of the questions' labels."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Venue"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`origin_not_allowed`, `secret_key_in_browser`",
            "x-kwipps-codes": [
              "origin_not_allowed",
              "secret_key_in_browser"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/availability": {
      "get": {
        "operationId": "getAvailability",
        "summary": "The dates open for booking in the next 30 days, and the free times on one of them — for a table, or for an appointment with a service and, optionally, a person.",
        "tags": [
          "Restaurant"
        ],
        "x-kwipps-since": "v1",
        "security": [
          {
            "publishableKey": []
          },
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Optional; without it, the first open date."
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Appointments: the service (default the first)."
          },
          {
            "name": "staff",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Appointments: one person."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Availability"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`origin_not_allowed`, `secret_key_in_browser`",
            "x-kwipps-codes": [
              "origin_not_allowed",
              "secret_key_in_browser"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`bookings_off`",
            "x-kwipps-codes": [
              "bookings_off"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/booking-requests": {
      "post": {
        "operationId": "postBookingRequests",
        "summary": "Send a booking request. The restaurant confirms it by email.",
        "tags": [
          "Restaurant"
        ],
        "x-kwipps-since": "v1",
        "security": [
          {
            "publishableKey": []
          },
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingRequestAnswer"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`origin_not_allowed`, `secret_key_in_browser`",
            "x-kwipps-codes": [
              "origin_not_allowed",
              "secret_key_in_browser"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`bookings_off`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "bookings_off",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/menu": {
      "get": {
        "operationId": "getMenu",
        "summary": "The current menu, with any dish that is off today marked.",
        "tags": [
          "Restaurant"
        ],
        "x-kwipps-since": "v1",
        "security": [
          {
            "publishableKey": []
          },
          {
            "secretKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Menu"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`origin_not_allowed`, `secret_key_in_browser`",
            "x-kwipps-codes": [
              "origin_not_allowed",
              "secret_key_in_browser"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "getEvents",
        "summary": "Upcoming published events.",
        "tags": [
          "Restaurant"
        ],
        "x-kwipps-since": "v1",
        "security": [
          {
            "publishableKey": []
          },
          {
            "secretKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Events"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`origin_not_allowed`, `secret_key_in_browser`",
            "x-kwipps-codes": [
              "origin_not_allowed",
              "secret_key_in_browser"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/hotel": {
      "get": {
        "operationId": "getHotel",
        "summary": "The hotel: room types with what they sleep and their lowest price, rate plans, extras, check-in and check-out times, the cancellation rule, the tourist tax, and whether it takes bookings.",
        "tags": [
          "Hotel"
        ],
        "x-kwipps-since": "v1",
        "security": [
          {
            "publishableKey": []
          },
          {
            "secretKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hotel"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`origin_not_allowed`, `secret_key_in_browser`",
            "x-kwipps-codes": [
              "origin_not_allowed",
              "secret_key_in_browser"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/hotel/availability": {
      "get": {
        "operationId": "getHotelAvailability",
        "summary": "What is free for a check-in and a check-out, for a number of adults and children, and what each room type costs for those nights: the nights, the tourist tax, the total and the deposit.",
        "tags": [
          "Hotel"
        ],
        "x-kwipps-since": "v1",
        "security": [
          {
            "publishableKey": []
          },
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "check_in",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Arrival."
          },
          {
            "name": "check_out",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "The morning of departure."
          },
          {
            "name": "adults",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Default 2."
          },
          {
            "name": "children",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Default 0."
          },
          {
            "name": "children_ages",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Ages, comma-separated, for the tourist tax's bands."
          },
          {
            "name": "rate_plan_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Default the first plan."
          },
          {
            "name": "extras",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "id:quantity, comma-separated."
          },
          {
            "name": "coupon",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A code the hotel gave out."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The language of the reasons."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HotelAvailability"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`origin_not_allowed`, `secret_key_in_browser`",
            "x-kwipps-codes": [
              "origin_not_allowed",
              "secret_key_in_browser"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`bookings_off`",
            "x-kwipps-codes": [
              "bookings_off"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`refused`",
            "x-kwipps-codes": [
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stay-requests": {
      "post": {
        "operationId": "postStayRequests",
        "summary": "Send a stay request. The hotel confirms it by email — or at once, when it has switched that on and a room is free.",
        "tags": [
          "Hotel"
        ],
        "x-kwipps-since": "v1",
        "security": [
          {
            "publishableKey": []
          },
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayRequestAnswer"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`origin_not_allowed`, `secret_key_in_browser`",
            "x-kwipps-codes": [
              "origin_not_allowed",
              "secret_key_in_browser"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`bookings_off`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "bookings_off",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings": {
      "get": {
        "operationId": "getBookings",
        "summary": "The bookings on a date (?date=) or a range (?from=&to=), requests and cancellations included.",
        "tags": [
          "Restaurant bookings"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "One day."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "A range's first day."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "A range's last day."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingList"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`",
            "x-kwipps-codes": [
              "conflict"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`refused`",
            "x-kwipps-codes": [
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postBookings",
        "summary": "Take a booking, confirmed at once — a till, a phone system, another booking tool. The console's own rules apply.",
        "tags": [
          "Restaurant bookings"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResult"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings/{id}/confirm": {
      "post": {
        "operationId": "postBookingsByIdConfirm",
        "summary": "Confirm a request. The guest is emailed, exactly as when the restaurant presses Confirm.",
        "tags": [
          "Restaurant bookings"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Decision"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings/{id}/decline": {
      "post": {
        "operationId": "postBookingsByIdDecline",
        "summary": "Decline a request. The guest is emailed.",
        "tags": [
          "Restaurant bookings"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Decision"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings/{id}/waitlist": {
      "post": {
        "operationId": "postBookingsByIdWaitlist",
        "summary": "Put a request on the waiting list. It can still be confirmed later.",
        "tags": [
          "Restaurant bookings"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Decision"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings/{id}/cancel": {
      "post": {
        "operationId": "postBookingsByIdCancel",
        "summary": "Cancel a booking; notify_guest emails them, with an optional reason.",
        "tags": [
          "Restaurant bookings"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingCancel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cancelled"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bookings/{id}": {
      "patch": {
        "operationId": "patchBookingsById",
        "summary": "Move a booking: a new date, time or party size. A table somebody else holds is refused.",
        "tags": [
          "Restaurant bookings"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingMove"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResult"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks": {
      "get": {
        "operationId": "getWebhooks",
        "summary": "The webhooks, with when each last delivered or failed.",
        "tags": [
          "Webhooks"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookList"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`",
            "x-kwipps-codes": [
              "conflict"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`refused`",
            "x-kwipps-codes": [
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postWebhooks",
        "summary": "Add a webhook: an https address and the events it wants. The signing secret is in the answer, once.",
        "tags": [
          "Webhooks"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreated"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}": {
      "delete": {
        "operationId": "deleteWebhooksById",
        "summary": "Delete a webhook.",
        "tags": [
          "Webhooks"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{id}/test": {
      "post": {
        "operationId": "postWebhooksByIdTest",
        "summary": "Send a signed ping to one webhook, within a minute.",
        "tags": [
          "Webhooks"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "responses": {
          "202": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queued"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stays": {
      "get": {
        "operationId": "getStays",
        "summary": "The stays touching a range of nights (?from=&to=), requests and cancellations included; ?status= narrows.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "First night."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Last night."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to one status."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayList"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`",
            "x-kwipps-codes": [
              "conflict"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`refused`",
            "x-kwipps-codes": [
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postStays",
        "summary": "Take a stay, confirmed at once — a phone booking, a walk-in, another system. The console's own rules apply: the room type must be free on every night.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayResult"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stays/{id}": {
      "get": {
        "operationId": "getStaysById",
        "summary": "One stay, with its bill: the balance and what has been paid.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayResult"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`",
            "x-kwipps-codes": [
              "conflict"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`refused`",
            "x-kwipps-codes": [
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchStaysById",
        "summary": "Change a stay: dates, guests, room type, rate plan, room, extras, or who it is for. The price is worked out again unless keep_price is true; a room somebody else holds is refused.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayResult"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stays/{id}/confirm": {
      "post": {
        "operationId": "postStaysByIdConfirm",
        "summary": "Confirm a request. The guest is emailed, exactly as when the desk presses Confirm.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayDecide"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayStatus"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stays/{id}/decline": {
      "post": {
        "operationId": "postStaysByIdDecline",
        "summary": "Decline a request. The guest is emailed.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayDecide"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayStatus"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stays/{id}/cancel": {
      "post": {
        "operationId": "postStaysByIdCancel",
        "summary": "Cancel a stay; notify_guest emails them, with an optional message. The answer says what the cancellation rule allows charging.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayStatusChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayStatus"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stays/{id}/check-in": {
      "post": {
        "operationId": "postStaysByIdCheckIn",
        "summary": "Check the guest in, into room_id (or the room already assigned). The room must be free for the whole stay.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayStatusChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayStatus"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stays/{id}/check-out": {
      "post": {
        "operationId": "postStaysByIdCheckOut",
        "summary": "Check the guest out. The room is marked as needing cleaning.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayStatusChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayStatus"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stays/{id}/no-show": {
      "post": {
        "operationId": "postStaysByIdNoShow",
        "summary": "Mark a confirmed stay as a no-show.",
        "tags": [
          "Hotel stays"
        ],
        "x-kwipps-since": "v2",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "pattern": "^[\\x21-\\x7e]+$"
            },
            "description": "A key of your own per request (a UUID). The same key again gets the first answer back, for 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayStatusChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StayStatus"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "x-kwipps-codes": [
              "bad_request"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`",
            "x-kwipps-codes": [
              "invalid_key"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "`plan_excludes_api`, `subscription_required`",
            "x-kwipps-codes": [
              "plan_excludes_api",
              "subscription_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`forbidden`, `origin_not_allowed`, `secret_key_in_browser`, `secret_key_required`",
            "x-kwipps-codes": [
              "forbidden",
              "origin_not_allowed",
              "secret_key_in_browser",
              "secret_key_required"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "x-kwipps-codes": [
              "not_found"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`conflict`, `idempotency_in_progress`",
            "x-kwipps-codes": [
              "conflict",
              "idempotency_in_progress"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused`, `refused`",
            "x-kwipps-codes": [
              "idempotency_key_reused",
              "refused"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "x-kwipps-codes": [
              "rate_limited"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/Cache-Control"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`server_error`",
            "x-kwipps-codes": [
              "server_error"
            ],
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "booking.requested": {
      "post": {
        "summary": "booking.requested",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "booking.requested"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "booking.confirmed": {
      "post": {
        "summary": "booking.confirmed",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "booking.confirmed"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "booking.declined": {
      "post": {
        "summary": "booking.declined",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "booking.declined"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "booking.waitlisted": {
      "post": {
        "summary": "booking.waitlisted",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "booking.waitlisted"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "booking.cancelled": {
      "post": {
        "summary": "booking.cancelled",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "booking.cancelled"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "booking.no_show": {
      "post": {
        "summary": "booking.no_show",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "booking.no_show"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "booking.moved": {
      "post": {
        "summary": "booking.moved",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "booking.moved"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "order.paid": {
      "post": {
        "summary": "order.paid",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "order.paid"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "stay.requested": {
      "post": {
        "summary": "stay.requested",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stay.requested"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "stay.confirmed": {
      "post": {
        "summary": "stay.confirmed",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stay.confirmed"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "stay.declined": {
      "post": {
        "summary": "stay.declined",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stay.declined"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "stay.cancelled": {
      "post": {
        "summary": "stay.cancelled",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stay.cancelled"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "stay.checked_in": {
      "post": {
        "summary": "stay.checked_in",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stay.checked_in"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "stay.checked_out": {
      "post": {
        "summary": "stay.checked_out",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stay.checked_out"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "stay.no_show": {
      "post": {
        "summary": "stay.no_show",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stay.no_show"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "stay.changed": {
      "post": {
        "summary": "stay.changed",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stay.changed"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StayEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    },
    "ping": {
      "post": {
        "summary": "A test from the console or POST /v1/webhooks/{id}/test.",
        "parameters": [
          {
            "name": "Kwipps-Event",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ping"
              ]
            }
          },
          {
            "name": "Kwipps-Delivery",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The delivery's id, as `id` in the body."
          },
          {
            "name": "Kwipps-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the webhook's secret>. Refuse a t more than 300 seconds away and compare in constant time."
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Kwipps-Webhooks/1"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PingEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Delivered. Anything else (or no answer in 10 s, or a redirect) is tried again."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "publishableKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Kwipps-Key",
        "description": "kw_pk_live_…, for a web page."
      },
      "secretKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Kwipps-Key",
        "description": "kw_sk_live_…, for a server. Never in a browser."
      }
    },
    "headers": {
      "X-Request-Id": {
        "description": "New for every request, and in our logs with the route and the status. Quote it when you write to us.",
        "schema": {
          "type": "string"
        }
      },
      "Cache-Control": {
        "description": "no-store on everything, except a publishable key's 200 from /v1/venue, /v1/menu, /v1/events, /v1/hotel: private, max-age=60.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Limit": {
        "description": "The tightest limit that applied to this request, per minute.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Policy": {
        "description": "The limits that applied, as limit;w=60 (per key; plus the booking or stay request limit on those routes).",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the minute window turns and the count starts again.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Remaining": {
        "description": "0 on a 429. Not sent otherwise: the limiter answers only yes or no.",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait: the window's turn on a 429, 2 on idempotency_in_progress.",
        "schema": {
          "type": "integer"
        }
      },
      "Idempotent-Replayed": {
        "description": "true when this is the stored answer to an earlier call with the same Idempotency-Key.",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "enum": [
                  "invalid_key",
                  "origin_not_allowed",
                  "secret_key_in_browser",
                  "secret_key_required",
                  "subscription_required",
                  "plan_excludes_api",
                  "rate_limited",
                  "bad_request",
                  "not_found",
                  "forbidden",
                  "conflict",
                  "bookings_off",
                  "refused",
                  "idempotency_key_reused",
                  "idempotency_in_progress",
                  "server_error"
                ],
                "description": "Stable; branch on this."
              },
              "message": {
                "type": "string",
                "description": "Safe to show to a person; written in the guest's language where the refusal is the business's own rule."
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ],
        "description": "Every error has this shape."
      },
      "Question": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "enum": [
              "text",
              "check"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "label": {
            "type": "string",
            "description": "In `?lang=` or the venue's language."
          }
        },
        "required": [
          "id",
          "type",
          "required",
          "label"
        ]
      },
      "Service": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration_minutes": {
            "type": "integer"
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "In the currency's major units (85 = CHF 85.00); null is \"on request\"."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "staff_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Who gives it; empty means anybody."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "duration_minutes",
          "price",
          "currency",
          "staff_ids"
        ]
      },
      "StaffMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "role"
        ]
      },
      "Venue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "hours": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^\\d{2}:\\d{2}$"
                },
                "minItems": 2,
                "maxItems": 2
              }
            },
            "description": "Opening hours by day (mon…sun): a list of [from, to]."
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "bookings": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "kind": {
                "enum": [
                  "table",
                  "appointment"
                ]
              },
              "max_party_size": {
                "type": "integer"
              },
              "page_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A table restaurant's own booking page (`<its website>/book/`), which the widget's \"Book a table\" button opens; null for an appointment business."
              }
            },
            "required": [
              "enabled",
              "kind",
              "max_party_size",
              "page_url"
            ]
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Service"
            },
            "description": "Only for `kind: appointment`: what can be booked online."
          },
          "staff": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffMember"
            },
            "description": "Only for `kind: appointment`: who can be booked."
          },
          "sms": {
            "type": "boolean",
            "description": "The business texts guests who tick `sms_opt_in`."
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Question"
            },
            "description": "The business's own questions on its booking form (up to five)."
          }
        },
        "required": [
          "id",
          "name",
          "phone",
          "address",
          "hours",
          "language",
          "currency",
          "bookings",
          "sms",
          "questions"
        ]
      },
      "TableAvailability": {
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "table"
            ]
          },
          "dates": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            },
            "description": "Open for booking in the next 30 days."
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "times": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "description": "Free on `date`."
          },
          "max_party_size": {
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "dates",
          "date",
          "times",
          "max_party_size"
        ]
      },
      "AppointmentAvailability": {
        "type": "object",
        "properties": {
          "kind": {
            "enum": [
              "appointment"
            ]
          },
          "service": {
            "type": "string",
            "format": "uuid"
          },
          "staff": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "duration_minutes": {
            "type": "integer"
          },
          "dates": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            }
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "times": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            }
          },
          "free": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Who could take each start (staff ids); \"\" is the business itself when nobody is listed."
          }
        },
        "required": [
          "kind",
          "service",
          "staff",
          "duration_minutes",
          "dates",
          "date",
          "times",
          "free"
        ]
      },
      "Availability": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/TableAvailability"
          },
          {
            "$ref": "#/components/schemas/AppointmentAvailability"
          }
        ]
      },
      "BookingRequest": {
        "type": "object",
        "properties": {
          "setup_intent": {
            "type": "string",
            "description": "Confirmed Stripe SetupIntent for this venue, required when its party-size card policy applies. Public booking requests cannot bypass the policy; staff-created bookings use /v1/bookings."
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "party": {
            "type": "integer",
            "description": "Tables; leave out for an appointment."
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "lang": {
            "type": "string",
            "description": "The language of the guest's emails and of any refusal (en, de, fr, es, it, pt)."
          },
          "service": {
            "type": "string",
            "format": "uuid",
            "description": "Appointments: the service."
          },
          "staff": {
            "type": "string",
            "format": "uuid",
            "description": "Appointments: the person, optional."
          },
          "sms_opt_in": {
            "type": "boolean",
            "description": "The guest's own tick; counts only when the venue's `sms` is true."
          },
          "answers": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "boolean"
              ]
            },
            "description": "Question id → text, or true/false for a box. Send it and every question counts as asked."
          }
        },
        "required": [
          "date",
          "time",
          "name"
        ],
        "description": "`date`, `time`, `party` (or `service` for an appointment) and `name` are required, and an `email` or a `phone`, as kwipps.com/restaurants/api says."
      },
      "BookingRequestAnswer": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "requested",
              "confirmed"
            ]
          },
          "message": {
            "type": "string",
            "description": "For the guest, in their language."
          },
          "duplicate": {
            "enum": [
              true
            ],
            "description": "The same request was made moments ago; nothing new was stored."
          }
        },
        "required": [
          "status",
          "message"
        ]
      },
      "MenuItem": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Major units; null is \"market price\"."
          },
          "off": {
            "type": "boolean",
            "description": "Taken off today."
          }
        },
        "required": [
          "name",
          "price",
          "off"
        ]
      },
      "Menu": {
        "type": "object",
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MenuItem"
                  }
                }
              },
              "required": [
                "name",
                "items"
              ]
            }
          }
        },
        "required": [
          "currency",
          "sections"
        ]
      },
      "Event": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "starts_time": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "ends_on": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "ends_time": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Major units."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "photo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "link_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "title",
          "summary",
          "starts_on",
          "starts_time",
          "ends_on",
          "ends_time",
          "price",
          "currency",
          "photo_url",
          "link_url"
        ]
      },
      "Events": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          }
        },
        "required": [
          "events"
        ]
      },
      "Answer": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "description": "As it read when they booked."
          },
          "answer": {
            "type": [
              "string",
              "boolean"
            ]
          }
        },
        "required": [
          "question",
          "answer"
        ]
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "requested",
              "confirmed",
              "declined",
              "waitlisted",
              "cancelled",
              "no_show",
              "expired"
            ],
            "type": "string"
          },
          "confirmed_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "restaurant, confirm_at_once or guest; null unless confirmed."
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "party": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Answer"
            }
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "service": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration_minutes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "seated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "left_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "confirmed_by",
          "date",
          "time",
          "party",
          "name",
          "email",
          "phone",
          "notes",
          "answers",
          "source",
          "service",
          "duration_minutes",
          "seated_at",
          "left_at",
          "created_at",
          "updated_at"
        ],
        "description": "A booking has this shape everywhere: the list, a create, a move, and inside a webhook."
      },
      "BookingList": {
        "type": "object",
        "properties": {
          "bookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            }
          }
        },
        "required": [
          "bookings"
        ]
      },
      "BookingResult": {
        "type": "object",
        "properties": {
          "booking": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Booking"
              },
              {
                "type": "null"
              }
            ]
          },
          "unchanged": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The console's own notes; the booking was taken regardless."
          },
          "guest_emailed": {
            "type": "boolean"
          }
        },
        "required": [
          "booking",
          "unchanged",
          "warnings",
          "guest_emailed"
        ]
      },
      "BookingCreate": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "party": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "notify_guest": {
            "type": "boolean"
          }
        },
        "required": [
          "date",
          "time",
          "party"
        ],
        "description": "`date`, `time`, `party` and a `name` or `phone` are required."
      },
      "BookingMove": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "party": {
            "type": "integer"
          }
        },
        "required": []
      },
      "BookingCancel": {
        "type": "object",
        "properties": {
          "notify_guest": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": []
      },
      "Decision": {
        "type": "object",
        "properties": {
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "confirmed, declined or waitlisted."
          }
        },
        "required": [
          "status"
        ]
      },
      "Cancelled": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "cancelled"
            ]
          },
          "guest_emailed": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "guest_emailed"
        ]
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "enum": [
                "booking.requested",
                "booking.confirmed",
                "booking.declined",
                "booking.waitlisted",
                "booking.cancelled",
                "booking.no_show",
                "booking.moved",
                "order.paid",
                "stay.requested",
                "stay.confirmed",
                "stay.declined",
                "stay.cancelled",
                "stay.checked_in",
                "stay.checked_out",
                "stay.no_show",
                "stay.changed"
              ]
            },
            "description": "Empty means every event."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_success_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_failure_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the last attempt failed — \"answered 500\", a timeout, \"… — given up after 8 attempts\", or that the subscription lapsed."
          },
          "disabled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "created_at",
          "last_success_at",
          "last_failure_at",
          "last_status",
          "last_error",
          "disabled_at"
        ]
      },
      "WebhookList": {
        "type": "object",
        "properties": {
          "webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            }
          }
        },
        "required": [
          "webhooks"
        ]
      },
      "WebhookCreate": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "https, a public name, the standard port."
          },
          "events": {
            "type": "array",
            "items": {
              "enum": [
                "booking.requested",
                "booking.confirmed",
                "booking.declined",
                "booking.waitlisted",
                "booking.cancelled",
                "booking.no_show",
                "booking.moved",
                "order.paid",
                "stay.requested",
                "stay.confirmed",
                "stay.declined",
                "stay.cancelled",
                "stay.checked_in",
                "stay.checked_out",
                "stay.no_show",
                "stay.changed"
              ]
            }
          }
        },
        "required": [
          "url"
        ]
      },
      "WebhookCreated": {
        "type": "object",
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/Webhook"
          },
          "secret": {
            "type": "string",
            "description": "whsec_…, shown this once. Sign-check every delivery with it."
          }
        },
        "required": [
          "webhook",
          "secret"
        ]
      },
      "Deleted": {
        "type": "object",
        "properties": {
          "deleted": {
            "enum": [
              true
            ]
          }
        },
        "required": [
          "deleted"
        ]
      },
      "Queued": {
        "type": "object",
        "properties": {
          "queued": {
            "enum": [
              true
            ]
          }
        },
        "required": [
          "queued"
        ]
      },
      "Hotel": {
        "type": "object",
        "properties": {
          "bookings": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "confirm_at_once": {
                "type": "boolean"
              },
              "min_lead_days": {
                "type": "integer"
              },
              "horizon_days": {
                "type": "integer"
              },
              "max_nights": {
                "type": "integer"
              },
              "children_allowed": {
                "type": "boolean"
              },
              "pets_allowed": {
                "type": "boolean"
              }
            },
            "required": [
              "enabled",
              "confirm_at_once",
              "min_lead_days",
              "horizon_days",
              "max_nights",
              "children_allowed",
              "pets_allowed"
            ]
          },
          "check_in_from": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "check_out_until": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "currency": {
            "type": "string"
          },
          "deposit_percent": {
            "type": "number"
          },
          "cancellation": {
            "type": "object",
            "properties": {
              "free_until_days_before": {
                "type": "integer"
              },
              "then_nights_charged": {
                "type": "integer"
              }
            },
            "required": [
              "free_until_days_before",
              "then_nights_charged"
            ]
          },
          "tourist_tax": {
            "type": "object",
            "properties": {
              "per_person_per_night": {
                "type": "integer",
                "description": "Minor units."
              },
              "children_free_under": {
                "type": "integer"
              },
              "children_half_under": {
                "type": "integer"
              }
            },
            "required": [
              "per_person_per_night",
              "children_free_under",
              "children_half_under"
            ]
          },
          "room_types": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "beds": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "size_m2": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max_adults": {
                  "type": "integer"
                },
                "max_children": {
                  "type": "integer"
                },
                "from_amount": {
                  "type": "integer",
                  "description": "The base price per night, minor units."
                },
                "photos": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "amenities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "names": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "The name in other languages."
                },
                "descriptions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "slug",
                "description",
                "beds",
                "size_m2",
                "max_adults",
                "max_children",
                "from_amount",
                "photos",
                "amenities",
                "names",
                "descriptions"
              ]
            }
          },
          "rate_plans": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "refundable": {
                  "type": "boolean"
                },
                "breakfast_included": {
                  "type": "boolean"
                },
                "pay_when": {
                  "enum": [
                    "booking",
                    "arrival"
                  ]
                },
                "min_stay": {
                  "type": "integer"
                },
                "long_stay_discounts": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "nights": {
                            "type": "integer"
                          },
                          "percent": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "nights",
                          "percent"
                        ]
                      }
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Its own tiers; null means the hotel's."
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "refundable",
                "breakfast_included",
                "pay_when",
                "min_stay",
                "long_stay_discounts"
              ]
            }
          },
          "extras": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "amount": {
                  "type": "integer",
                  "description": "Minor units."
                },
                "per": {
                  "enum": [
                    "stay",
                    "night",
                    "person",
                    "person_night"
                  ]
                },
                "mandatory": {
                  "type": "boolean"
                },
                "room_type_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Empty means every room type."
                },
                "daily_limit": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "offered_on": {
                  "enum": [
                    "every",
                    "arrival",
                    "departure"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "amount",
                "per",
                "mandatory",
                "room_type_ids",
                "daily_limit",
                "offered_on"
              ]
            }
          },
          "long_stay_discounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "nights": {
                  "type": "integer"
                },
                "percent": {
                  "type": "number"
                }
              },
              "required": [
                "nights",
                "percent"
              ]
            }
          },
          "arrival_time": {
            "type": "object",
            "properties": {
              "asked": {
                "enum": [
                  "off",
                  "optional",
                  "required"
                ]
              },
              "earliest": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^\\d{2}:\\d{2}$"
              },
              "latest": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^\\d{2}:\\d{2}$"
              }
            },
            "required": [
              "asked",
              "earliest",
              "latest"
            ]
          },
          "booking_questions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "enum": [
                    "text",
                    "tick"
                  ]
                },
                "required": {
                  "type": "boolean"
                },
                "labels": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "required",
                "labels"
              ]
            }
          }
        },
        "required": [
          "bookings",
          "check_in_from",
          "check_out_until",
          "currency",
          "deposit_percent",
          "cancellation",
          "tourist_tax",
          "room_types",
          "rate_plans",
          "extras",
          "long_stay_discounts",
          "arrival_time",
          "booking_questions"
        ]
      },
      "RoomTypeAvailability": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "free": {
            "type": "integer"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it is not free, or why an extra or a coupon was left out, in the guest's language."
          },
          "nightly": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "amount": {
                  "type": "integer"
                }
              },
              "required": [
                "date",
                "amount"
              ]
            }
          },
          "room_amount": {
            "type": "integer"
          },
          "extras": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer"
                },
                "amount": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "name",
                "quantity",
                "amount"
              ]
            }
          },
          "extras_amount": {
            "type": "integer"
          },
          "discounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "long_stay",
                    "coupon"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "amount": {
                  "type": "integer",
                  "description": "Minor units, positive: what came off the room."
                },
                "percent": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "kind",
                "label",
                "amount",
                "percent",
                "code"
              ]
            }
          },
          "discount_amount": {
            "type": "integer"
          },
          "tourist_tax_amount": {
            "type": "integer"
          },
          "total_amount": {
            "type": "integer"
          },
          "deposit_amount": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "free",
          "reason"
        ],
        "description": "The price fields are sent only when the type can be booked for those dates."
      },
      "HotelAvailability": {
        "type": "object",
        "properties": {
          "check_in": {
            "type": "string",
            "format": "date"
          },
          "check_out": {
            "type": "string",
            "format": "date"
          },
          "nights": {
            "type": "integer"
          },
          "adults": {
            "type": "integer"
          },
          "children": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "rate_plan": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "breakfast_included": {
                "type": "boolean"
              },
              "refundable": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "breakfast_included",
              "refundable"
            ]
          },
          "confirm_at_once": {
            "type": "boolean"
          },
          "room_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomTypeAvailability"
            }
          }
        },
        "required": [
          "check_in",
          "check_out",
          "nights",
          "adults",
          "children",
          "currency",
          "rate_plan",
          "confirm_at_once",
          "room_types"
        ]
      },
      "StayRequest": {
        "type": "object",
        "properties": {
          "setup_intent": {
            "type": "string",
            "description": "Confirmed Stripe SetupIntent for this hotel, required when it accepts card holds. Public stay requests cannot bypass the policy; staff-created stays use /v1/stays."
          },
          "check_in": {
            "type": "string",
            "format": "date"
          },
          "check_out": {
            "type": "string",
            "format": "date"
          },
          "adults": {
            "type": "integer"
          },
          "children": {
            "type": "integer"
          },
          "children_ages": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "room_type_id": {
            "type": "string",
            "format": "uuid"
          },
          "rate_plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "lang": {
            "type": "string"
          },
          "arrival_time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "answers": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "boolean"
              ]
            }
          },
          "extras": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "quantity"
              ]
            }
          },
          "coupon": {
            "type": "string"
          }
        },
        "required": [
          "check_in",
          "check_out",
          "adults",
          "room_type_id",
          "name",
          "email"
        ]
      },
      "StayRequestAnswer": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "requested",
              "confirmed"
            ]
          },
          "reference": {
            "type": "string",
            "description": "The stay's reference (may be empty when the request was held for review)."
          },
          "message": {
            "type": "string"
          },
          "total_amount": {
            "type": "integer"
          },
          "discount_amount": {
            "type": "integer"
          },
          "duplicate": {
            "enum": [
              true
            ]
          },
          "pay_url": {
            "type": "string",
            "description": "Stripe Checkout, when the hotel takes a deposit by card."
          }
        },
        "required": [
          "status",
          "reference",
          "message"
        ]
      },
      "Stay": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "status": {
            "enum": [
              "requested",
              "confirmed",
              "declined",
              "cancelled",
              "checked_in",
              "checked_out",
              "no_show",
              "expired"
            ],
            "type": "string"
          },
          "check_in": {
            "type": "string",
            "format": "date"
          },
          "check_out": {
            "type": "string",
            "format": "date"
          },
          "nights": {
            "type": "integer"
          },
          "adults": {
            "type": "integer"
          },
          "children": {
            "type": "integer"
          },
          "room_type_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "room_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "room_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "rate_plan_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "rate_plan": {
            "type": [
              "string",
              "null"
            ]
          },
          "breakfast_included": {
            "type": "boolean"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "channel": {
            "type": [
              "string",
              "null"
            ]
          },
          "channel_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "room_amount": {
            "type": "integer"
          },
          "extras_amount": {
            "type": "integer"
          },
          "tourist_tax_amount": {
            "type": "integer"
          },
          "total_amount": {
            "type": "integer"
          },
          "discount_amount": {
            "type": "integer"
          },
          "coupon_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "discounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "enum": [
                    "long_stay",
                    "coupon"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "amount": {
                  "type": "integer",
                  "description": "Minor units, positive: what came off the room."
                },
                "percent": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "kind",
                "label",
                "amount",
                "percent",
                "code"
              ]
            }
          },
          "deposit_amount": {
            "type": "integer"
          },
          "deposit_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid_amount": {
            "type": "integer"
          },
          "invoice_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "checked_in_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checked_out_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "arrival_time": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "question": {
                  "type": "string"
                },
                "answer": {
                  "type": [
                    "string",
                    "boolean"
                  ]
                }
              },
              "required": [
                "id",
                "question",
                "answer"
              ]
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "reference",
          "status",
          "check_in",
          "check_out",
          "nights",
          "adults",
          "children",
          "room_type_id",
          "room_type",
          "room_id",
          "rate_plan_id",
          "rate_plan",
          "breakfast_included",
          "name",
          "email",
          "phone",
          "country",
          "notes",
          "source",
          "channel",
          "channel_ref",
          "currency",
          "room_amount",
          "extras_amount",
          "tourist_tax_amount",
          "total_amount",
          "discount_amount",
          "coupon_code",
          "discounts",
          "deposit_amount",
          "deposit_status",
          "paid_amount",
          "invoice_number",
          "checked_in_at",
          "checked_out_at",
          "cancelled_at",
          "arrival_time",
          "answers",
          "created_at",
          "updated_at"
        ],
        "description": "Never the decision token, the address hash, the Stripe ids or the registration form. Money in minor units."
      },
      "StayList": {
        "type": "object",
        "properties": {
          "stays": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stay"
            }
          }
        },
        "required": [
          "stays"
        ]
      },
      "StayResult": {
        "type": "object",
        "properties": {
          "stay": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Stay"
              },
              {
                "type": "null"
              }
            ]
          },
          "repriced": {
            "type": "boolean"
          },
          "guest_emailed": {
            "type": "boolean"
          },
          "balance_amount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "GET /v1/stays/{id} only: what is still owed."
          },
          "paid_amount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "GET /v1/stays/{id} only."
          }
        },
        "required": [
          "stay",
          "repriced",
          "guest_emailed"
        ]
      },
      "StayStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "guest_emailed": {
            "type": "boolean"
          },
          "cancel_fee_amount": {
            "type": "integer",
            "description": "What the cancellation rule allows charging, minor units."
          }
        },
        "required": [
          "status",
          "guest_emailed",
          "cancel_fee_amount"
        ]
      },
      "StayCreate": {
        "type": "object",
        "properties": {
          "check_in": {
            "type": "string",
            "format": "date"
          },
          "check_out": {
            "type": "string",
            "format": "date"
          },
          "adults": {
            "type": "integer"
          },
          "children": {
            "type": "integer"
          },
          "children_ages": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "room_type_id": {
            "type": "string",
            "format": "uuid"
          },
          "rate_plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "room_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "owner_note": {
            "type": "string"
          },
          "channel_ref": {
            "type": "string"
          },
          "notify_guest": {
            "type": "boolean"
          },
          "lang": {
            "type": "string"
          },
          "arrival_time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "extras": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "quantity"
              ]
            }
          }
        },
        "required": [
          "check_in",
          "check_out",
          "adults",
          "room_type_id",
          "name"
        ]
      },
      "StayUpdate": {
        "type": "object",
        "properties": {
          "check_in": {
            "type": "string",
            "format": "date"
          },
          "check_out": {
            "type": "string",
            "format": "date"
          },
          "adults": {
            "type": "integer"
          },
          "children": {
            "type": "integer"
          },
          "children_ages": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "room_type_id": {
            "type": "string",
            "format": "uuid"
          },
          "rate_plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "room_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "owner_note": {
            "type": "string"
          },
          "arrival_time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          },
          "extras": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "quantity": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "quantity"
              ]
            }
          },
          "keep_price": {
            "type": "boolean"
          },
          "notify_guest": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [],
        "description": "Only what is sent changes."
      },
      "StayDecide": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "required": []
      },
      "StayStatusChange": {
        "type": "object",
        "properties": {
          "room_id": {
            "type": "string",
            "format": "uuid"
          },
          "notify_guest": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": []
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_amount": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Minor units."
                }
              },
              "required": [
                "name",
                "quantity",
                "unit_amount"
              ]
            }
          },
          "total_amount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "paid_amount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "pickup_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "items",
          "total_amount",
          "paid_amount",
          "currency",
          "name",
          "email",
          "phone",
          "notes",
          "pickup_at",
          "source",
          "paid_at",
          "created_at"
        ],
        "description": "An order for collection. Amounts in minor units, as Stripe gives them."
      },
      "BookingEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The delivery's id: a retry of the same delivery has the same id."
          },
          "type": {
            "enum": [
              "booking.requested",
              "booking.confirmed",
              "booking.declined",
              "booking.waitlisted",
              "booking.cancelled",
              "booking.no_show",
              "booking.moved"
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "api_version": {
            "enum": [
              "v1"
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "booking": {
                "$ref": "#/components/schemas/Booking"
              }
            },
            "required": [
              "booking"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "created",
          "api_version",
          "data"
        ]
      },
      "OrderEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The delivery's id: a retry of the same delivery has the same id."
          },
          "type": {
            "enum": [
              "order.paid"
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "api_version": {
            "enum": [
              "v1"
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "order": {
                "$ref": "#/components/schemas/Order"
              }
            },
            "required": [
              "order"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "created",
          "api_version",
          "data"
        ]
      },
      "StayEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The delivery's id: a retry of the same delivery has the same id."
          },
          "type": {
            "enum": [
              "stay.requested",
              "stay.confirmed",
              "stay.declined",
              "stay.cancelled",
              "stay.checked_in",
              "stay.checked_out",
              "stay.no_show",
              "stay.changed"
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "api_version": {
            "enum": [
              "v1"
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "stay": {
                "$ref": "#/components/schemas/Stay"
              }
            },
            "required": [
              "stay"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "created",
          "api_version",
          "data"
        ]
      },
      "PingEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The delivery's id: a retry of the same delivery has the same id."
          },
          "type": {
            "enum": [
              "ping"
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "api_version": {
            "enum": [
              "v1"
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "required": [
              "message"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "created",
          "api_version",
          "data"
        ]
      }
    }
  }
}
