{
 "openapi": "3.1.0",
 "info": {
  "title": "Bookare API",
  "version": "1.0.0",
  "description": "Everything Bookare does, without the Bookare screens: run a venue from your own systems (admin), or build your own booking site or app on top of it (public and customer). Each venue has its own address: https://<venue>.bookare.app/api/v1 (or its own domain). All answers are JSON {\"data\": …}; errors are {\"error\": {\"code\", \"message\", \"field\"?}}. Dates are YYYY-MM-DD and times HH:MM in the venue’s time zone (Europe/Athens); timestamps are ISO 8601 UTC; money is in euro. Send Accept-Language or ?lang=el|en for texts in a language. Full guide: docs/API.md.",
  "contact": {
   "email": "hello@bookare.app",
   "url": "https://bookare.app/agents"
  }
 },
 "servers": [
  {
   "url": "https://{venue}.bookare.app/api/v1",
   "variables": {
    "venue": {
     "default": "yourvenue"
    }
   }
  }
 ],
 "security": [],
 "tags": [
  {
   "name": "Public",
   "description": "No key. What the venue shows publicly, and guest bookings (appointments, tables, stays)."
  },
  {
   "name": "Customer sign-in",
   "description": "Email code → customer token (Authorization: Bearer)."
  },
  {
   "name": "Customer",
   "description": "A signed-in customer: their bookings, packs, payments, notifications."
  }
 ],
 "paths": {
  "/public/venue": {
   "get": {
    "operationId": "getPublicVenue",
    "tags": [
     "Public"
    ],
    "summary": "The venue: name, contact details, hours, languages, how it takes bookings",
    "description": "The venue: name, contact details, hours, languages, how it takes bookings",
    "security": [],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        },
        "example": {
         "data": {
          "name": "Move Studio",
          "booking_mode": "classes",
          "currency": "EUR",
          "timezone": "Europe/Athens"
         }
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/class-types": {
   "get": {
    "operationId": "getPublicClassTypes",
    "tags": [
     "Public"
    ],
    "summary": "Kinds of class",
    "description": "Kinds of class\n\nAvailable for gyms and studios.",
    "security": [],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/classes": {
   "get": {
    "operationId": "getPublicClasses",
    "tags": [
     "Public"
    ],
    "summary": "Classes on the calendar with free spots",
    "description": "Scheduled classes between two dates (at most 31 days; default: today and the next 7 days). Drop-in types (no set times) are not listed. Members book with POST /me/bookings.\n\nAvailable for gyms and studios.",
    "security": [],
    "parameters": [
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "First day. YYYY-MM-DD, venue time (Europe/Athens).",
       "format": "date",
       "example": "2026-12-01"
      },
      "description": "First day. YYYY-MM-DD, venue time (Europe/Athens)."
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Last day. YYYY-MM-DD, venue time (Europe/Athens).",
       "format": "date",
       "example": "2026-12-01"
      },
      "description": "Last day. YYYY-MM-DD, venue time (Europe/Athens)."
     },
     {
      "name": "class_type_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Only this kind of class."
      },
      "description": "Only this kind of class."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        },
        "example": {
         "data": [
          {
           "id": "tpl1:2026-12-01",
           "class_type_id": "ct1",
           "class_type": "Pilates Reformer",
           "date": "2026-12-01",
           "time": "18:00",
           "starts_at": "2026-12-01T16:00:00.000Z",
           "minutes": 50,
           "spots": 6,
           "spots_left": 2,
           "instructor": "Eleni",
           "off_peak": false
          }
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/packs": {
   "get": {
    "operationId": "getPublicPacks",
    "tags": [
     "Public"
    ],
    "summary": "Packs for sale",
    "description": "Packs anyone can buy, with prices. Members buy with POST /me/packs; special packs for chosen members appear in GET /me/packs/available.\n\nAvailable for gyms and studios.",
    "security": [],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/services": {
   "get": {
    "operationId": "getPublicServices",
    "tags": [
     "Public"
    ],
    "summary": "Services that can be booked, with duration and price",
    "description": "Services that can be booked, with duration and price\n\nAvailable for venues with appointments.",
    "security": [],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/staff": {
   "get": {
    "operationId": "getPublicStaff",
    "tags": [
     "Public"
    ],
    "summary": "Staff customers can choose",
    "description": "Staff customers can choose\n\nAvailable for venues with appointments.",
    "security": [],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/slots": {
   "get": {
    "operationId": "getPublicSlots",
    "tags": [
     "Public"
    ],
    "summary": "Free times on a day",
    "description": "Appointments: pass service_id (and optionally staff_id). Restaurants: pass party. Times respect opening hours, how soon and how far ahead the venue takes bookings, and what is already booked.\n\nAvailable for venues with appointments, restaurants and bars.",
    "security": [],
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "The day. YYYY-MM-DD, venue time (Europe/Athens).",
       "format": "date",
       "example": "2026-12-01"
      },
      "description": "The day. YYYY-MM-DD, venue time (Europe/Athens)."
     },
     {
      "name": "service_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Appointments: the service (required)."
      },
      "description": "Appointments: the service (required)."
     },
     {
      "name": "staff_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Appointments: only with this person."
      },
      "description": "Appointments: only with this person."
     },
     {
      "name": "party",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Restaurants: number of people (default 2).",
       "example": 2
      },
      "description": "Restaurants: number of people (default 2)."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        },
        "example": {
         "data": [
          {
           "time": "18:30",
           "starts_at": "2026-12-01T16:30:00.000Z",
           "ends_at": "2026-12-01T17:15:00.000Z"
          }
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/appointments": {
   "post": {
    "operationId": "postPublicAppointments",
    "tags": [
     "Public"
    ],
    "summary": "Book an appointment or a table as a guest",
    "description": "Books a free time from GET /public/slots. The guest gets a confirmation email with a link to view or cancel. Limited to 10 bookings an hour per IP and 5 per email. If the venue confirms by hand, status is \"requested\" until it does.\n\nAvailable for venues with appointments, restaurants and bars.",
    "security": [],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        },
        "example": {
         "data": {
          "code": "AP-7K2QF",
          "status": "confirmed",
          "date": "2026-12-01",
          "time": "18:30",
          "manage_url": "https://studio.bookare.app/book/b/AP-7K2QF?k=…"
         }
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "date": {
          "type": "string",
          "description": "The day. YYYY-MM-DD, venue time (Europe/Athens).",
          "format": "date",
          "example": "2026-12-01"
         },
         "time": {
          "type": "string",
          "description": "Start time HH:MM, as returned by /public/slots.",
          "example": "18:30"
         },
         "service_id": {
          "type": "string",
          "description": "Appointments: the service."
         },
         "staff_id": {
          "type": "string",
          "description": "Appointments: a specific person (optional)."
         },
         "party": {
          "type": "integer",
          "description": "Restaurants: number of people.",
          "example": 2
         },
         "name": {
          "type": "string",
          "description": "Guest’s full name.",
          "example": "Maria Papadopoulou"
         },
         "email": {
          "type": "string",
          "description": "Guest’s email: the confirmation and the link to view or cancel go here.",
          "example": "maria@example.com"
         },
         "phone": {
          "type": "string",
          "description": "Guest’s phone, international or local format.",
          "example": "+30 691 234 5678"
         },
         "note": {
          "type": "string",
          "description": "Optional note for the venue."
         },
         "consent": {
          "type": "boolean",
          "description": "Must be true: the guest accepted the venue’s terms and privacy notice (show them a checkbox)."
         }
        },
        "required": [
         "date",
         "time",
         "name",
         "email",
         "phone",
         "consent"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/public/units": {
   "get": {
    "operationId": "getPublicUnits",
    "tags": [
     "Public"
    ],
    "summary": "Rooms, homes, pitches and other units",
    "description": "Rooms, homes, pitches and other units\n\nAvailable for stays.",
    "security": [],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/availability": {
   "get": {
    "operationId": "getPublicAvailability",
    "tags": [
     "Public"
    ],
    "summary": "Free units and total prices for dates",
    "description": "Free units and total prices for dates\n\nAvailable for stays.",
    "security": [],
    "parameters": [
     {
      "name": "check_in",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Arrival. YYYY-MM-DD, venue time (Europe/Athens).",
       "format": "date",
       "example": "2026-12-01"
      },
      "description": "Arrival. YYYY-MM-DD, venue time (Europe/Athens)."
     },
     {
      "name": "check_out",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Departure. YYYY-MM-DD, venue time (Europe/Athens).",
       "format": "date",
       "example": "2026-12-01"
      },
      "description": "Departure. YYYY-MM-DD, venue time (Europe/Athens)."
     },
     {
      "name": "guests",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Number of guests (default 2).",
       "example": 2
      },
      "description": "Number of guests (default 2)."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        },
        "example": {
         "data": [
          {
           "unit_id": "u1",
           "name": "Double room",
           "available": true,
           "free": 2,
           "nights": 3,
           "total_eur": 210,
           "per_night": [
            {
             "date": "2026-07-01",
             "eur": 70
            }
           ]
          }
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/public/stay-bookings": {
   "post": {
    "operationId": "postPublicStayBookings",
    "tags": [
     "Public"
    ],
    "summary": "Book a stay as a guest",
    "description": "Books a unit for the dates. The guest gets a confirmation email with a link to view, pay (if the venue takes cards) or cancel. Limited to 10 bookings an hour per IP and 5 per email.\n\nAvailable for stays.",
    "security": [],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        },
        "example": {
         "data": {
          "code": "BK-7K2QF4",
          "status": "confirmed",
          "total_eur": 210,
          "manage_url": "https://rooms.bookare.app/stay/b/BK-7K2QF4?k=…"
         }
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "unit_id": {
          "type": "string",
          "description": "From /public/availability."
         },
         "check_in": {
          "type": "string",
          "description": "Arrival. YYYY-MM-DD, venue time (Europe/Athens).",
          "format": "date",
          "example": "2026-12-01"
         },
         "check_out": {
          "type": "string",
          "description": "Departure. YYYY-MM-DD, venue time (Europe/Athens).",
          "format": "date",
          "example": "2026-12-01"
         },
         "guests": {
          "type": "integer",
          "description": "Number of guests.",
          "example": 2
         },
         "name": {
          "type": "string",
          "description": "Guest’s full name.",
          "example": "Maria Papadopoulou"
         },
         "email": {
          "type": "string",
          "description": "Guest’s email: the confirmation and the link to view or cancel go here.",
          "example": "maria@example.com"
         },
         "phone": {
          "type": "string",
          "description": "Guest’s phone, international or local format.",
          "example": "+30 691 234 5678"
         },
         "note": {
          "type": "string",
          "description": "Optional note for the venue."
         },
         "consent": {
          "type": "boolean",
          "description": "Must be true: the guest accepted the venue’s terms and privacy notice (show them a checkbox)."
         }
        },
        "required": [
         "unit_id",
         "check_in",
         "check_out",
         "guests",
         "name",
         "email",
         "phone",
         "consent"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/auth/code": {
   "post": {
    "operationId": "postAuthCode",
    "tags": [
     "Customer sign-in"
    ],
    "summary": "Send a sign-in code to an email",
    "description": "Step 1. Sends a 6-digit code to the email (valid 10 minutes) and returns a challenge to send back with the code. Works for new and existing customers. Limited per email and per IP.",
    "security": [],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        },
        "example": {
         "data": {
          "challenge": "Xb7…",
          "expires_in": 600
         }
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "email": {
          "type": "string",
          "description": "The customer’s email.",
          "example": "maria@example.com"
         }
        },
        "required": [
         "email"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/auth/token": {
   "post": {
    "operationId": "postAuthToken",
    "tags": [
     "Customer sign-in"
    ],
    "summary": "Exchange the code for a customer token",
    "description": "Step 2. Returns a bearer token valid 90 days. For gyms and studios, someone without an account must sign up in the same call: pass signup (name, phone, consent; the venue approves new members). If signup is missing for a new email, the answer is 422 signup_required and the code is NOT used up. Venues with appointments or stays create the account by themselves.",
    "security": [],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        },
        "example": {
         "data": {
          "token": "q8…",
          "token_type": "Bearer",
          "expires_in": 7776000,
          "customer": {
           "id": "u1",
           "name": "Maria",
           "status": "active"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "email": {
          "type": "string",
          "description": "The same email as step 1."
         },
         "code": {
          "type": "string",
          "description": "The 6-digit code from the email.",
          "example": "482913"
         },
         "challenge": {
          "type": "string",
          "description": "The challenge from step 1."
         },
         "signup": {
          "type": "object",
          "description": "Gyms and studios, new members only: { name, phone, goal?, injuries?, medical?, wants_news?, consent: true } — consent to keep their details (and health answers) as the venue’s privacy notice says."
         }
        },
        "required": [
         "email",
         "code",
         "challenge"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   },
   "delete": {
    "operationId": "deleteAuthToken",
    "tags": [
     "Customer sign-in"
    ],
    "summary": "Sign out (revoke this token)",
    "description": "Sign out (revoke this token)",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/me": {
   "get": {
    "operationId": "getMe",
    "tags": [
     "Customer"
    ],
    "summary": "The signed-in customer",
    "description": "status is \"pending\" until the venue approves a new member (gyms and studios); bookings are refused until then.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "patch": {
    "operationId": "patchMe",
    "tags": [
     "Customer"
    ],
    "summary": "Change name, phone or news consent",
    "description": "Change name, phone or news consent",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Full name."
         },
         "phone": {
          "type": "string",
          "description": "Phone."
         },
         "wants_news": {
          "type": "boolean",
          "description": "Offers and news by email and phone notifications."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/me/notifications": {
   "get": {
    "operationId": "getMeNotifications",
    "tags": [
     "Customer"
    ],
    "summary": "Notifications (reminders, class changes, offers, news)",
    "description": "Notifications (reminders, class changes, offers, news)\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/me/offers": {
   "get": {
    "operationId": "getMeOffers",
    "tags": [
     "Customer"
    ],
    "summary": "Offers from the venue that apply now",
    "description": "Offers from the venue that apply now\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/me/bookings": {
   "get": {
    "operationId": "getMeBookings",
    "tags": [
     "Customer"
    ],
    "summary": "The customer’s class bookings",
    "description": "The customer’s class bookings\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [
     {
      "name": "scope",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Default upcoming.",
       "enum": [
        "upcoming",
        "past",
        "all"
       ]
      },
      "description": "Default upcoming."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "postMeBookings",
    "tags": [
     "Customer"
    ],
    "summary": "Book a class",
    "description": "Uses the pack that expires first and covers this class, unless member_pack_id is given. Refused with a reason when there is no suitable pack, the class is full or the account is not approved yet.\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "class_id": {
          "type": "string",
          "description": "From GET /public/classes."
         },
         "member_pack_id": {
          "type": "string",
          "description": "Optional: a specific pack from GET /me/packs."
         }
        },
        "required": [
         "class_id"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/me/bookings/{booking_id}": {
   "delete": {
    "operationId": "deleteMeBookings/Booking_id",
    "tags": [
     "Customer"
    ],
    "summary": "Cancel a class booking",
    "description": "Before the venue’s free-cancellation time the class goes back to the pack; after it, the booking is cancelled but the class is charged (late: true).\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [
     {
      "name": "booking_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/me/packs": {
   "get": {
    "operationId": "getMePacks",
    "tags": [
     "Customer"
    ],
    "summary": "The customer’s packs",
    "description": "The customer’s packs\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "postMePacks",
    "tags": [
     "Customer"
    ],
    "summary": "Buy a pack",
    "description": "One unpaid pack at a time (409 otherwise). method must be one the venue accepts (see payment_methods). For card, then call POST /me/packs/{id}/checkout. The customer gets a confirmation email.\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "pack_id": {
          "type": "string",
          "description": "From GET /me/packs/available."
         },
         "method": {
          "type": "string",
          "description": "How they will pay.",
          "enum": [
           "cash",
           "iris",
           "card"
          ]
         },
         "code": {
          "type": "string",
          "description": "Optional coupon code."
         }
        },
        "required": [
         "pack_id",
         "method"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/me/packs/available": {
   "get": {
    "operationId": "getMePacksAvailable",
    "tags": [
     "Customer"
    ],
    "summary": "Packs this customer can buy, with coupon prices",
    "description": "Includes special packs for this member or their groups, and applies automatic coupons; pass code to apply a coupon code.\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [
     {
      "name": "code",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Optional coupon code."
      },
      "description": "Optional coupon code."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/me/packs/{member_pack_id}/checkout": {
   "post": {
    "operationId": "postMePacks/Member_pack_idCheckout",
    "tags": [
     "Customer"
    ],
    "summary": "Start a card payment for an unpaid pack",
    "description": "Returns where to send the customer: a URL to open (type redirect) or a form to post (type form). After paying they come back to the venue’s account page; the pack shows as paid in GET /me/packs.\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [
     {
      "name": "member_pack_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/me/packs/{member_pack_id}": {
   "delete": {
    "operationId": "deleteMePacks/Member_pack_id",
    "tags": [
     "Customer"
    ],
    "summary": "Cancel an unpaid, unused pack",
    "description": "Cancel an unpaid, unused pack\n\nAvailable for gyms and studios.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [
     {
      "name": "member_pack_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/me/appointments": {
   "get": {
    "operationId": "getMeAppointments",
    "tags": [
     "Customer"
    ],
    "summary": "The customer’s appointments or table bookings",
    "description": "The customer’s appointments or table bookings\n\nAvailable for venues with appointments, restaurants and bars.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/me/stays": {
   "get": {
    "operationId": "getMeStays",
    "tags": [
     "Customer"
    ],
    "summary": "The customer’s stay bookings",
    "description": "The customer’s stay bookings\n\nAvailable for stays.",
    "security": [
     {
      "customerToken": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/venue": {
   "get": {
    "operationId": "get_venue",
    "tags": [
     "Admin · Venue"
    ],
    "summary": "The venue: details, plan, booking rules, counts",
    "description": "Name, type, contact details, booking rules, payment methods and today’s numbers for the connected venue. Call this first.\n\nAvailable for every venue.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "patch": {
    "operationId": "update_venue",
    "tags": [
     "Admin · Venue"
    ],
    "summary": "Change name, address, phones, email, website, opening hours",
    "description": "Changes the venue’s name, legal name, address, phones, contact email, website or opening hours: what customers see at the bottom of every page and in emails. Only the fields you send change; send an empty value to clear one. The venue type, country and booking address cannot be changed here.\n\nAvailable for every venue.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Venue name (2-80 characters)."
         },
         "legal_name": {
          "type": "string",
          "description": "The business’s legal name, shown on the privacy page as the data controller."
         },
         "street": {
          "type": "string",
          "description": "Street and number, e.g. \"Agias Lavras 5-7\"."
         },
         "city": {
          "type": "string",
          "description": "City or area, e.g. \"Zografou\"."
         },
         "postal_code": {
          "type": "string",
          "description": "Postal code, e.g. \"157 73\"."
         },
         "phones": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Up to two phone numbers, the main one first. Numbers without a country code are taken as the venue’s country."
         },
         "email": {
          "type": "string",
          "description": "Contact email shown to customers."
         },
         "website": {
          "type": "string",
          "description": "The venue’s own website, full address like https://example.gr. Used for the “back to site” button."
         },
         "opening_hours": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Opening hours, one line per group of days (up to 7 lines), e.g. [\"Mon–Wed 09:00–13:00 & 16:00–21:00\", \"Sat 09:00–14:00\"]. Empty list clears them."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/venue/branding": {
   "put": {
    "operationId": "set_branding",
    "tags": [
     "Admin · Venue"
    ],
    "summary": "Set the logo (from a link) and colours",
    "description": "Sets the venue logo from a public https link to a PNG, JPG or WebP file (up to 300 KB), and/or its three colours as #rrggbb: hot (buttons, highlights), fresh (light accent), sun (yellow accent). Colours need the Plus or Pro plan (included in the trial).\n\nAvailable for every venue.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "logo_url": {
          "type": "string"
         },
         "hot": {
          "type": "string"
         },
         "fresh": {
          "type": "string"
         },
         "sun": {
          "type": "string"
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/embed-code": {
   "get": {
    "operationId": "get_embed_code",
    "tags": [
     "Admin · Venue"
    ],
    "summary": "Widget, button and link to put booking on a website",
    "description": "Copy-paste code to show this venue’s timetable, packs, services, tables or stays on any website (WordPress, Wix, Squarespace, Webflow, plain HTML), plus a \"Book online\" button and the booking page link.\n\nAvailable for every venue.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/dns-instructions": {
   "get": {
    "operationId": "get_dns_instructions",
    "tags": [
     "Admin · Venue"
    ],
    "summary": "How to use an own domain for the booking pages",
    "description": "How the venue can use its own address (e.g. book.yourgym.com) for its booking pages. Available on the Pro plan; the owner switches it on in Settings → Link and domain after adding the DNS record.\n\nAvailable for every venue.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Optional, e.g. book.yourgym.com."
      },
      "description": "Optional, e.g. book.yourgym.com."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/claim-link": {
   "post": {
    "operationId": "get_claim_link",
    "tags": [
     "Admin · Venue"
    ],
    "summary": "New claim link for the owner (draft venues only)",
    "description": "A new link for the owner to claim this draft venue (the previous link stops working). The owner opens it, confirms with a code sent to their email and accepts the terms; then the booking pages open to customers. Until then the venue takes no members or bookings and sends no emails, and it is deleted automatically on its expiry date.\n\nAvailable for draft venues made by an AI agent.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/templates": {
   "get": {
    "operationId": "list_templates",
    "tags": [
     "Admin · Setup"
    ],
    "summary": "Ready-made setups for this kind of venue",
    "description": "Typical setups for this kind of venue (classes and timetable and packs, or services, or tables and hours, or units). Apply one with setup_from_template, then adjust anything with the other tools.\n\nAvailable for every venue.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/templates/{template_id}/apply": {
   "post": {
    "operationId": "setup_from_template",
    "tags": [
     "Admin · Setup"
    ],
    "summary": "Set the venue up from a template in one call",
    "description": "Fills an empty or new venue with a typical setup in one call: e.g. \"pilates\" adds class types, a weekly timetable, packs with prices and booking rules. Prices are suggestions: adjust them afterwards (update_pack, add_service…). replace_starter = true removes the empty starter class type made at sign-up.\n\nAvailable for every venue.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "template_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "replace_starter": {
          "type": "boolean",
          "description": "Default true."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/class-types": {
   "get": {
    "operationId": "list_class_types",
    "tags": [
     "Admin · Classes"
    ],
    "summary": "Kinds of class",
    "description": "The kinds of class the venue runs (e.g. Pilates Reformer, Fitness), with default spots.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "create_class_type",
    "tags": [
     "Admin · Classes"
    ],
    "summary": "Add a kind of class",
    "description": "Adds a kind of class (e.g. \"Yoga Flow\") that can then be put on the weekly timetable.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "spots": {
          "type": "integer",
          "description": "Default spots per class (1-50)."
         },
         "colour": {
          "type": "string",
          "enum": [
           "fresh",
           "hot",
           "sun",
           "ink",
           "chip"
          ],
          "description": "fresh = light green, hot = red, sun = yellow, ink = dark, chip = grey."
         },
         "booked_with_packs": {
          "type": "boolean",
          "description": "Default true. False = only the venue books it, no pack is charged."
         },
         "drop_in": {
          "type": "boolean",
          "description": "True = no times on the timetable: people just come in and check in (e.g. the gym floor). Each check-in takes one class from their pack, at most once a day."
         }
        },
        "required": [
         "name",
         "spots"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/class-types/{class_type_id}": {
   "patch": {
    "operationId": "update_class_type",
    "tags": [
     "Admin · Classes"
    ],
    "summary": "Change a kind of class",
    "description": "Renames a class type or changes its default spots, colour, whether packs are charged or whether it is drop-in. Spots apply to classes created from now on.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "class_type_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "spots": {
          "type": "integer"
         },
         "colour": {
          "type": "string",
          "enum": [
           "fresh",
           "hot",
           "sun",
           "ink",
           "chip"
          ]
         },
         "booked_with_packs": {
          "type": "boolean"
         },
         "drop_in": {
          "type": "boolean",
          "description": "True = no times on the timetable: people just come in and check in (e.g. the gym floor). Each check-in takes one class from their pack, at most once a day."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   },
   "delete": {
    "operationId": "delete_class_type",
    "tags": [
     "Admin · Classes"
    ],
    "summary": "Delete a kind of class that was never used",
    "description": "Deletes a class type that has never been on the timetable. One that has classes or history cannot be deleted; rename it instead.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "class_type_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/instructors": {
   "get": {
    "operationId": "list_instructors",
    "tags": [
     "Admin · Classes"
    ],
    "summary": "Instructors",
    "description": "Instructors that can be put on a class.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "add_instructor",
    "tags": [
     "Admin · Classes"
    ],
    "summary": "Add an instructor",
    "description": "Adds a name to the instructors that can be put on a class.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         }
        },
        "required": [
         "name"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/timetable": {
   "get": {
    "operationId": "get_timetable",
    "tags": [
     "Admin · Timetable"
    ],
    "summary": "The weekly timetable",
    "description": "The repeating weekly timetable: one row per weekly class. Classes on the calendar are generated from these.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "add_weekly_class",
    "tags": [
     "Admin · Timetable"
    ],
    "summary": "Add a weekly class",
    "description": "Adds a repeating class to the weekly timetable. Classes for the coming days appear on the calendar at once.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "weekday": {
          "type": "integer",
          "description": "0 = Monday … 6 = Sunday."
         },
         "time": {
          "type": "string",
          "description": "Start time in the venue’s local time, HH:MM (24h)."
         },
         "class_type_id": {
          "type": "string"
         },
         "instructor_id": {
          "type": "string",
          "description": "Optional. From list_instructors."
         },
         "spots": {
          "type": "integer",
          "description": "Optional. Defaults to the class type’s spots (1-50)."
         },
         "duration_minutes": {
          "type": "integer",
          "description": "Optional, default 60 (15-240)."
         },
         "off_peak": {
          "type": "boolean",
          "description": "Optional. Marks the class as off-peak."
         }
        },
        "required": [
         "weekday",
         "time",
         "class_type_id"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/timetable/{weekly_class_id}": {
   "patch": {
    "operationId": "update_weekly_class",
    "tags": [
     "Admin · Timetable"
    ],
    "summary": "Change a weekly class (from a date on)",
    "description": "Moves a weekly class to another day or time, or changes its type, instructor, spots, duration or off-peak mark. Only the fields you send change. Dates that already have bookings stay at the old time.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "weekly_class_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "weekday": {
          "type": "integer",
          "description": "0 = Monday … 6 = Sunday."
         },
         "time": {
          "type": "string",
          "description": "Start time in the venue’s local time, HH:MM (24h)."
         },
         "class_type_id": {
          "type": "string"
         },
         "instructor_id": {
          "type": "string",
          "description": "Optional. From list_instructors."
         },
         "spots": {
          "type": "integer",
          "description": "Optional. Defaults to the class type’s spots (1-50)."
         },
         "duration_minutes": {
          "type": "integer",
          "description": "Optional, default 60 (15-240)."
         },
         "off_peak": {
          "type": "boolean",
          "description": "Optional. Marks the class as off-peak."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   },
   "delete": {
    "operationId": "remove_weekly_class",
    "tags": [
     "Admin · Timetable"
    ],
    "summary": "Remove a weekly class",
    "description": "Takes a class off the weekly timetable. Future dates without bookings disappear; dates that already have bookings stay.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "weekly_class_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/booking-rules": {
   "put": {
    "operationId": "set_booking_rules",
    "tags": [
     "Admin · Timetable"
    ],
    "summary": "Cancellation window, days ahead, bookings before payment",
    "description": "Sets how many hours before a class a member can cancel free, how many classes can be booked on an unpaid pack, and how many days ahead members can book. Only the fields you send change.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "free_cancellation_hours_before": {
          "type": "integer",
          "description": "0-168"
         },
         "bookings_allowed_on_unpaid_pack": {
          "type": "integer",
          "description": "0-50"
         },
         "days_ahead_members_can_book": {
          "type": "integer",
          "description": "1-60"
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/classes": {
   "get": {
    "operationId": "list_classes",
    "tags": [
     "Admin · Bookings"
    ],
    "summary": "Classes on the calendar between two dates, with how full they are",
    "description": "Actual classes between two dates (at most 31 days), with how many spots are taken. Defaults to today and the next 7 days.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "First day, YYYY-MM-DD. Default: today."
      },
      "description": "First day, YYYY-MM-DD. Default: today."
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Last day, YYYY-MM-DD. Default: from + 7 days."
      },
      "description": "Last day, YYYY-MM-DD. Default: from + 7 days."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/classes/{class_id}": {
   "get": {
    "operationId": "get_class",
    "tags": [
     "Admin · Bookings"
    ],
    "summary": "One class with its bookings",
    "description": "A single class with everyone booked on it (members and guests) and their attendance.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "class_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/classes/{class_id}/bookings": {
   "post": {
    "operationId": "book_class",
    "tags": [
     "Admin · Bookings"
    ],
    "summary": "Book a member or a guest into a class",
    "description": "Books a member (one class is taken from their pack) or a guest by name on a class. free = true books a member without charging a pack (a gift).\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "class_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "member_id": {
          "type": "string"
         },
         "guest_name": {
          "type": "string",
          "description": "For a person without an account. Leave out member_id."
         },
         "free": {
          "type": "boolean"
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/bookings/{booking_id}": {
   "delete": {
    "operationId": "cancel_booking",
    "tags": [
     "Admin · Bookings"
    ],
    "summary": "Cancel a booking (the class goes back to the pack)",
    "description": "Cancels one booking. When the venue cancels, the class always goes back to the member’s pack.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "booking_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/bookings/{booking_id}/attendance": {
   "put": {
    "operationId": "set_attendance",
    "tags": [
     "Admin · Bookings"
    ],
    "summary": "Mark attended, no-show or booked",
    "description": "Marks a booking as attended or no_show, or puts it back to booked.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "booking_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "status": {
          "type": "string",
          "enum": [
           "attended",
           "no_show",
           "booked"
          ]
         }
        },
        "required": [
         "status"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/members": {
   "get": {
    "operationId": "list_members",
    "tags": [
     "Admin · Members"
    ],
    "summary": "Members (search, filter by status, 50 per page)",
    "description": "Members of the venue. Search by part of a name, email or phone; filter by status. Returns at most 50 per call. Health answers are never included.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "search",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Part of a name, email or phone."
      },
      "description": "Part of a name, email or phone."
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "active",
        "pending",
        "disabled",
        "rejected"
       ],
       "description": "pending = signed up, waiting for approval."
      },
      "description": "pending = signed up, waiting for approval."
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Skip this many, for the next page."
      },
      "description": "Skip this many, for the next page."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "create_member",
    "tags": [
     "Admin · Members"
    ],
    "summary": "Add a member",
    "description": "Adds a member with name and email or phone. Use only for a person who asked the venue to register them. No health details can be stored this way. The plan’s member limit applies.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Full name."
         },
         "email": {
          "type": "string"
         },
         "phone": {
          "type": "string"
         },
         "address": {
          "type": "string"
         },
         "activate": {
          "type": "boolean",
          "description": "True = can buy packs and book at once. Default false (waits for approval)."
         }
        },
        "required": [
         "name"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/members/{member_id}": {
   "get": {
    "operationId": "get_member",
    "tags": [
     "Admin · Members"
    ],
    "summary": "A member with packs, bookings and history",
    "description": "A member’s details, groups, packs, upcoming bookings and recent history. Health answers are not available through this connection.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "member_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "patch": {
    "operationId": "update_member",
    "tags": [
     "Admin · Members"
    ],
    "summary": "Change a member’s details",
    "description": "Changes a member’s name, phone or address. The email cannot be changed through this connection (whoever controls the email controls the account); do that on the member’s page.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "member_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "phone": {
          "type": "string"
         },
         "address": {
          "type": "string"
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/members/{member_id}/status": {
   "put": {
    "operationId": "set_member_status",
    "tags": [
     "Admin · Members"
    ],
    "summary": "Approve, deactivate or reject a member",
    "description": "active = approve a waiting sign-up or re-enable an account (a newly approved member gets an email). disabled = the member can no longer sign in or book; nothing is deleted.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "member_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "status": {
          "type": "string",
          "enum": [
           "active",
           "disabled"
          ]
         }
        },
        "required": [
         "status"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/members/{member_id}/packs": {
   "post": {
    "operationId": "give_pack",
    "tags": [
     "Admin · Members"
    ],
    "summary": "Give a member a pack",
    "description": "Adds a pack on sale to a member’s account, as if they took it at the desk. Set paid to true only if the money was actually received.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "member_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "pack_id": {
          "type": "string",
          "description": "From list_packs."
         },
         "paid": {
          "type": "boolean",
          "description": "Default false (shows as unpaid)."
         },
         "method": {
          "type": "string",
          "enum": [
           "cash",
           "iris"
          ],
          "description": "How it is or will be paid. Default cash (at the store)."
         }
        },
        "required": [
         "pack_id"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/member-packs/{member_pack_id}/paid": {
   "put": {
    "operationId": "set_pack_paid",
    "tags": [
     "Admin · Members"
    ],
    "summary": "Mark a member’s pack paid or unpaid",
    "description": "Records that a member’s pack was paid (and how), or puts it back to unpaid. Use only when the owner says the money was received.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "member_pack_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "paid": {
          "type": "boolean"
         },
         "method": {
          "type": "string",
          "enum": [
           "cash",
           "card",
           "iris"
          ],
          "description": "Needed when paid is true."
         }
        },
        "required": [
         "paid"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/member-packs/{member_pack_id}/pay-later": {
   "put": {
    "operationId": "allow_booking_before_payment",
    "tags": [
     "Admin · Members"
    ],
    "summary": "Let a member book before paying, until a date",
    "description": "For an unpaid member pack (\"I will pay in a few days\"): how many classes the member can book before paying, and until when. classes = a number, or all = true for all classes. Leave both out (or reset = true) to go back to the venue’s general rule. After the until date the general rule applies again.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "member_pack_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "classes": {
          "type": "integer",
          "description": "Up to this many classes before payment (0-200)."
         },
         "all": {
          "type": "boolean",
          "description": "True: all the classes of the pack."
         },
         "until": {
          "type": "string",
          "description": "Optional last day, YYYY-MM-DD (usually the day they said they would pay)."
         },
         "reset": {
          "type": "boolean",
          "description": "True: back to the general rule."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/unpaid": {
   "get": {
    "operationId": "list_unpaid",
    "tags": [
     "Admin · Members"
    ],
    "summary": "Unpaid member packs",
    "description": "Packs members have taken but not paid for yet, oldest first.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/packs": {
   "get": {
    "operationId": "list_packs",
    "tags": [
     "Admin · Packs"
    ],
    "summary": "Packs on sale",
    "description": "The packs the venue sells (including hidden ones), in the order members see them.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "create_pack",
    "tags": [
     "Admin · Packs"
    ],
    "summary": "Create a pack",
    "description": "Adds a new pack to what the venue sells. It is visible to members straight away unless you hide it with set_pack_visibility.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Name shown to members, e.g. \"Move 10\"."
         },
         "classes": {
          "type": "integer",
          "description": "How many classes the pack holds (1-200). Leave out when unlimited is true."
         },
         "unlimited": {
          "type": "boolean",
          "description": "True for unlimited classes until it expires."
         },
         "valid_days": {
          "type": "integer",
          "description": "Days the pack is valid from the day it is bought (1-730)."
         },
         "price_eur": {
          "type": "number",
          "description": "Price in euro, e.g. 59.9."
         },
         "tagline": {
          "type": "string",
          "description": "One short line under the name."
         },
         "description": {
          "type": "string",
          "description": "Longer description shown with the pack."
         },
         "class_type_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Class types the pack can be used for. Empty list = all."
         },
         "off_peak_only": {
          "type": "boolean",
          "description": "True if it can be used only for classes marked off-peak."
         },
         "on_sale_until": {
          "type": "string",
          "description": "YYYY-MM-DD: a limited-time pack members can buy until the end of that day. Empty string = always on sale."
         }
        },
        "required": [
         "name",
         "valid_days",
         "price_eur"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/packs/{pack_id}": {
   "patch": {
    "operationId": "update_pack",
    "tags": [
     "Admin · Packs"
    ],
    "summary": "Change a pack",
    "description": "Changes a pack on sale. Only the fields you send change. Packs members have already bought keep their own terms and are not affected.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "pack_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Name shown to members, e.g. \"Move 10\"."
         },
         "classes": {
          "type": "integer",
          "description": "How many classes the pack holds (1-200). Leave out when unlimited is true."
         },
         "unlimited": {
          "type": "boolean",
          "description": "True for unlimited classes until it expires."
         },
         "valid_days": {
          "type": "integer",
          "description": "Days the pack is valid from the day it is bought (1-730)."
         },
         "price_eur": {
          "type": "number",
          "description": "Price in euro, e.g. 59.9."
         },
         "tagline": {
          "type": "string",
          "description": "One short line under the name."
         },
         "description": {
          "type": "string",
          "description": "Longer description shown with the pack."
         },
         "class_type_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Class types the pack can be used for. Empty list = all."
         },
         "off_peak_only": {
          "type": "boolean",
          "description": "True if it can be used only for classes marked off-peak."
         },
         "on_sale_until": {
          "type": "string",
          "description": "YYYY-MM-DD: a limited-time pack members can buy until the end of that day. Empty string = always on sale."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   },
   "delete": {
    "operationId": "delete_pack",
    "tags": [
     "Admin · Packs"
    ],
    "summary": "Delete a pack",
    "description": "Permanently removes a pack from what the venue sells. Packs members already bought are kept. Prefer set_pack_visibility unless the owner clearly asked to delete.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "pack_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/packs/{pack_id}/visibility": {
   "put": {
    "operationId": "set_pack_visibility",
    "tags": [
     "Admin · Packs"
    ],
    "summary": "Activate or deactivate a pack",
    "description": "visible = false deactivates a pack: it is hidden and can no longer be bought; members who have it keep it. visible = true activates it again. This is the safe way to stop selling a pack.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "pack_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "visible": {
          "type": "boolean"
         }
        },
        "required": [
         "visible"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/coupons": {
   "get": {
    "operationId": "list_coupons",
    "tags": [
     "Admin · Coupons"
    ],
    "summary": "Coupons",
    "description": "Coupons for buying packs: automatic ones and ones with a code, with who and which packs they are for, dates and how often they were used.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "create_coupon",
    "tags": [
     "Admin · Coupons"
    ],
    "summary": "Create a coupon",
    "description": "Creates a coupon for buying packs. kind: percent (value = % off), amount (value_eur off), extra (value = free classes added), bonus (value = % more classes, same price and expiry: 30 turns 10 classes into 13; 100 = 1+1, double). Free classes do not apply to unlimited packs. Without code it applies automatically to the members it is for; with code the member types it when buying.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Shown to members next to the price, e.g. \"New Year\"."
         },
         "kind": {
          "type": "string",
          "enum": [
           "percent",
           "amount",
           "extra",
           "bonus"
          ]
         },
         "value": {
          "type": "integer",
          "description": "percent: 1-100; extra: 1-100 classes; bonus: 1-500 (% more classes, 100 = 1+1). Not for amount."
         },
         "value_eur": {
          "type": "number",
          "description": "Only for kind amount, e.g. 10."
         },
         "code": {
          "type": "string",
          "description": "Optional code, 3-30 Latin letters, digits or dashes. Leave out for an automatic coupon."
         },
         "from": {
          "type": "string",
          "description": "Optional first day, YYYY-MM-DD."
         },
         "until": {
          "type": "string",
          "description": "Optional last day, YYYY-MM-DD."
         },
         "member_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Only for these members (with group_ids). Leave both out for all members."
         },
         "group_ids": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "pack_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Only for these packs (from list_packs). Leave out for all packs."
         },
         "max_uses": {
          "type": "integer",
          "description": "Total uses. Leave out for no limit."
         },
         "per_member": {
          "type": "integer",
          "description": "Uses per member, 0 = no limit. Default 1."
         }
        },
        "required": [
         "name",
         "kind"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/coupons/{coupon_id}/active": {
   "put": {
    "operationId": "set_coupon_active",
    "tags": [
     "Admin · Coupons"
    ],
    "summary": "Pause or resume a coupon",
    "description": "Pauses a coupon (it stops applying) or resumes it. Packs already bought with it are not affected.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "coupon_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "active": {
          "type": "boolean"
         }
        },
        "required": [
         "active"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/sales": {
   "get": {
    "operationId": "get_sales",
    "tags": [
     "Admin · Sales"
    ],
    "summary": "Pack sales between two dates",
    "description": "Packs paid between two dates (at most 366 days): total, by payment method and by pack. Defaults to this month so far.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "YYYY-MM-DD. Default: first day of this month."
      },
      "description": "YYYY-MM-DD. Default: first day of this month."
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "YYYY-MM-DD. Default: today."
      },
      "description": "YYYY-MM-DD. Default: today."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/import": {
   "get": {
    "operationId": "import_status",
    "tags": [
     "Admin · Import"
    ],
    "summary": "What has been brought over so far",
    "description": "For moving a venue from another system. Shows how many members, packs, bookings and check-ins were imported (and how many exist in total). Order of a move: first set up class types, instructors, packs on sale and the weekly timetable with the usual tools; then import_members, import_member_packs, import_bookings and import_visits, in that order, up to 100 rows per call. Nothing is emailed to anyone, and re-running with the same external_id values does not create duplicates.\n\nAvailable for venues with classes (gyms and studios).",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/import/members": {
   "post": {
    "operationId": "import_members",
    "tags": [
     "Admin · Import"
    ],
    "summary": "Bring over members (up to 100 per call)",
    "description": "Moving from another system: adds up to 100 existing or former members at once, with their join date and status. No email is sent. A row whose external_id was imported before, or whose email already exists here, is reported as existing and left as it is (use update_member to change it). Needs email, phone or external_id per row. Members who joined in the last 90 days count towards the plan’s member limit.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "members": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "external_id": {
             "type": "string",
             "description": "The member’s id in the old system. Strongly recommended: re-running skips them, and packs and bookings can point to it."
            },
            "name": {
             "type": "string",
             "description": "Full name."
            },
            "email": {
             "type": "string"
            },
            "phone": {
             "type": "string"
            },
            "street": {
             "type": "string"
            },
            "city": {
             "type": "string"
            },
            "postal_code": {
             "type": "string"
            },
            "joined": {
             "type": "string",
             "description": "When they joined, YYYY-MM-DD. Default today."
            },
            "status": {
             "type": "string",
             "enum": [
              "active",
              "disabled",
              "pending"
             ],
             "description": "Default active. disabled = former member who can no longer sign in."
            },
            "wants_news": {
             "type": "boolean",
             "description": "True only if they agreed in the old system to receive offers and news."
            },
            "groups": {
             "type": "array",
             "items": {
              "type": "string"
             },
             "description": "Group names (e.g. \"Morning team\"). Missing groups are created. Also added to members that already exist."
            }
           },
           "required": [
            "name"
           ]
          },
          "description": "Up to 100 rows."
         }
        },
        "required": [
         "members"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/import/packs": {
   "post": {
    "operationId": "import_member_packs",
    "tags": [
     "Admin · Import"
    ],
    "summary": "Bring over members’ packs",
    "description": "Moving from another system: adds up to 100 member packs at once, current or past, with their start and expiry dates, classes already used, price and whether (and when) they were paid. No email is sent and no receipt is asked for. Import members first. Bookings imported later do not take classes again: classes_used is what counts.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "packs": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "external_id": {
             "type": "string",
             "description": "The pack’s id in the old system."
            },
            "member_id": {
             "type": "string"
            },
            "member_external_id": {
             "type": "string",
             "description": "The member’s external_id from import_members."
            },
            "member_email": {
             "type": "string",
             "description": "Or the member’s email."
            },
            "pack_id": {
             "type": "string",
             "description": "Optional. A pack on sale (list_packs) to copy name, classes, price and class types from; any field you send wins."
            },
            "name": {
             "type": "string",
             "description": "Pack name. Needed without pack_id."
            },
            "classes": {
             "type": "integer",
             "description": "Classes the pack held in total (1-1000). Leave out when unlimited."
            },
            "unlimited": {
             "type": "boolean"
            },
            "classes_used": {
             "type": "integer",
             "description": "Classes already used in the old system, including classes already booked for the future. Default 0."
            },
            "starts": {
             "type": "string",
             "description": "Start / purchase date, YYYY-MM-DD. Default today."
            },
            "expires": {
             "type": "string",
             "description": "Last day it can be used, YYYY-MM-DD. Default starts + the pack’s valid days (needs pack_id)."
            },
            "price_eur": {
             "type": "number"
            },
            "paid": {
             "type": "boolean",
             "description": "True if it was paid. Default false."
            },
            "paid_on": {
             "type": "string",
             "description": "Payment date, YYYY-MM-DD. Default starts."
            },
            "method": {
             "type": "string",
             "enum": [
              "cash",
              "iris",
              "card"
             ],
             "description": "How it was (or will be) paid. Default cash."
            },
            "class_type_ids": {
             "type": "array",
             "items": {
              "type": "string"
             },
             "description": "Class types it can be used for. Empty or missing = all (or as pack_id)."
            },
            "off_peak_only": {
             "type": "boolean"
            }
           }
          },
          "description": "Up to 100 rows."
         }
        },
        "required": [
         "packs"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/import/bookings": {
   "post": {
    "operationId": "import_bookings",
    "tags": [
     "Admin · Import"
    ],
    "summary": "Bring over bookings and attendance history",
    "description": "Moving from another system: adds up to 100 bookings at once, past (with attendance) or upcoming. Each row names the class by class_id, or by date, time and class_type_id; a past class that is not on the calendar is created. An upcoming class must already be on the calendar (add the weekly timetable first). Nothing is emailed and no pack is charged again (classes_used on the imported pack already counts them); the booking is linked to the member’s pack so a later cancellation gives the class back.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "bookings": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "external_id": {
             "type": "string",
             "description": "The booking’s id in the old system."
            },
            "member_id": {
             "type": "string"
            },
            "member_external_id": {
             "type": "string"
            },
            "member_email": {
             "type": "string",
             "description": "Or the member’s email."
            },
            "guest_name": {
             "type": "string",
             "description": "For a person without an account. Leave out the member fields."
            },
            "class_id": {
             "type": "string",
             "description": "A class from list_classes. Or give date, time and class_type_id instead."
            },
            "date": {
             "type": "string",
             "description": "YYYY-MM-DD"
            },
            "time": {
             "type": "string",
             "description": "Start time HH:MM, venue local time."
            },
            "class_type_id": {
             "type": "string"
            },
            "class_type": {
             "type": "string",
             "description": "Or the class type’s name."
            },
            "instructor_id": {
             "type": "string",
             "description": "Only used when a past class has to be created."
            },
            "duration_minutes": {
             "type": "integer",
             "description": "Only used when a class has to be created. Default 60."
            },
            "status": {
             "type": "string",
             "enum": [
              "booked",
              "attended",
              "no_show",
              "cancelled",
              "late_cancel"
             ],
             "description": "Default: attended for past classes, booked for future ones. Future classes take only booked or cancelled."
            },
            "member_pack_id": {
             "type": "string",
             "description": "The member pack it was booked with."
            },
            "pack_external_id": {
             "type": "string",
             "description": "Or the pack’s external_id from import_member_packs. Without either, the member’s pack that covered that day is linked."
            },
            "free": {
             "type": "boolean",
             "description": "True = not booked with a pack (gift, free class)."
            },
            "trial": {
             "type": "boolean",
             "description": "The member’s trial class."
            }
           }
          },
          "description": "Up to 100 rows."
         }
        },
        "required": [
         "bookings"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/import/visits": {
   "post": {
    "operationId": "import_visits",
    "tags": [
     "Admin · Import"
    ],
    "summary": "Bring over drop-in check-ins",
    "description": "Moving from another system: adds up to 100 past check-ins at once for drop-in class types (no times on the timetable, people just come in), one per member, class type and day. No pack is charged again; the visit is linked to the given pack, or the member’s pack that covered that day.\n\nAvailable for venues with classes (gyms and studios).\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "visits": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "external_id": {
             "type": "string"
            },
            "member_id": {
             "type": "string"
            },
            "member_external_id": {
             "type": "string"
            },
            "member_email": {
             "type": "string",
             "description": "Or the member’s email."
            },
            "class_type_id": {
             "type": "string",
             "description": "A drop-in class type (no times on the timetable, people just check in)."
            },
            "class_type": {
             "type": "string",
             "description": "Or the class type’s name."
            },
            "date": {
             "type": "string",
             "description": "YYYY-MM-DD"
            },
            "time": {
             "type": "string",
             "description": "HH:MM. Default 12:00."
            },
            "member_pack_id": {
             "type": "string"
            },
            "pack_external_id": {
             "type": "string"
            }
           },
           "required": [
            "date"
           ]
          },
          "description": "Up to 100 rows."
         }
        },
        "required": [
         "visits"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/agenda": {
   "get": {
    "operationId": "get_agenda_setup",
    "tags": [
     "Admin · Appointments and tables"
    ],
    "summary": "Services, staff or tables, and opening hours",
    "description": "What the venue offers by appointment (services with duration and price, staff) or, for restaurants, its tables; and the opening hours.\n\nAvailable for venues with appointments or tables.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/services": {
   "post": {
    "operationId": "add_service",
    "tags": [
     "Admin · Appointments and tables"
    ],
    "summary": "Add a service",
    "description": "Adds a service customers can book by appointment, e.g. \"Women’s haircut\", 45 minutes, €25. It is done by the staff listed (default: all staff). Not for restaurants.\n\nAvailable for venues with appointments or tables.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "minutes": {
          "type": "integer",
          "description": "5-480."
         },
         "price_eur": {
          "type": "number",
          "description": "Leave out for \"price on request\"."
         },
         "description": {
          "type": "string"
         },
         "staff_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Default: all staff."
         }
        },
        "required": [
         "name",
         "minutes"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/staff": {
   "post": {
    "operationId": "add_staff",
    "tags": [
     "Admin · Appointments and tables"
    ],
    "summary": "Add a staff member",
    "description": "Adds a person customers can book with. They do all services unless service_ids is given. Not for restaurants.\n\nAvailable for venues with appointments or tables.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "First name is enough, e.g. \"Maria\"."
         },
         "service_ids": {
          "type": "array",
          "items": {
           "type": "string"
          }
         }
        },
        "required": [
         "name"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/tables": {
   "post": {
    "operationId": "add_table",
    "tags": [
     "Admin · Appointments and tables"
    ],
    "summary": "Add tables",
    "description": "Restaurants and bars: adds a table (or several identical ones) with its seats. Online bookings get the smallest free table that fits the party.\n\nAvailable for venues with appointments or tables.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "e.g. \"Table\" or \"Terrace\". Numbered automatically when count > 1."
         },
         "seats": {
          "type": "integer",
          "description": "1-30."
         },
         "count": {
          "type": "integer",
          "description": "How many identical tables, default 1 (max 40)."
         },
         "from_party_of": {
          "type": "integer",
          "description": "Smallest party it is given to online, default 1."
         }
        },
        "required": [
         "name",
         "seats"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/opening-hours": {
   "put": {
    "operationId": "set_opening_hours",
    "tags": [
     "Admin · Appointments and tables"
    ],
    "summary": "Replace the hours that can be booked",
    "description": "Replaces the hours when appointments or tables can be booked. One row per period, several per day allowed (e.g. 10:00-14:00 and 17:00-21:00). Days not listed are closed. For restaurants \"to\" is the last time a table can be booked.\n\nAvailable for venues with appointments or tables.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "hours": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "weekday": {
             "type": "integer",
             "description": "0 = Monday … 6 = Sunday"
            },
            "from": {
             "type": "string"
            },
            "to": {
             "type": "string"
            }
           }
          }
         }
        },
        "required": [
         "hours"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/stay-options": {
   "get": {
    "operationId": "list_stay_options",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Allowed unit kinds, beds and amenities",
    "description": "The fixed lists used by the other tools: unit kinds, bed kinds, amenity keys for units and for the venue (with their English and Greek labels).\n\nAvailable for stays venues.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/units": {
   "get": {
    "operationId": "list_units",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Units (rooms, homes, pitches…)",
    "description": "Everything the venue rents by the night (rooms, homes, caravans, pitches) with price, capacity, beds, amenities and photos. Includes hidden units.\n\nAvailable for stays venues.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "create_unit",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Add a unit",
    "description": "Adds something the venue rents by the night: a room, apartment, home, caravan, glamping tent or pitch. For several identical ones (e.g. 20 pitches) create one unit and set identical_units. Guests can see and book it straight away unless shown_to_guests or takes_bookings is false.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Name guests see, e.g. \"Sea-view studio\" or \"Tent or camper pitch\"."
         },
         "kind": {
          "type": "string",
          "enum": [
           "room",
           "apartment",
           "home",
           "caravan",
           "glamping",
           "pitch",
           "other"
          ],
          "description": "What it is."
         },
         "price_per_night_eur": {
          "type": "number",
          "description": "Base price per night in euro (seasons can override it)."
         },
         "guests_up_to": {
          "type": "integer",
          "description": "Most guests it takes (1-60)."
         },
         "identical_units": {
          "type": "integer",
          "description": "How many identical ones exist, e.g. 20 tent and camper pitches. Default 1."
         },
         "min_nights": {
          "type": "integer",
          "description": "Minimum nights per booking. Default 1."
         },
         "description": {
          "type": "string",
          "description": "Free text for guests (up to 600 characters)."
         },
         "bedrooms": {
          "type": "integer",
          "description": "0 = not shown."
         },
         "bathrooms": {
          "type": "integer",
          "description": "0 = not shown."
         },
         "size_sqm": {
          "type": "integer",
          "description": "Size in square metres. 0 = not shown."
         },
         "beds": {
          "type": "object",
          "description": "How many beds of each kind, e.g. {\"double\":1,\"single\":2}. Kinds: double, single, sofa, bunk.",
          "additionalProperties": {
           "type": "integer"
          }
         },
         "amenities": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Amenity keys from list_stay_options (unit_amenities), e.g. [\"wifi\",\"ac\",\"kitchen\"]."
         },
         "shown_to_guests": {
          "type": "boolean",
          "description": "False hides the unit from the booking page. Default true."
         },
         "takes_bookings": {
          "type": "boolean",
          "description": "False keeps the unit visible to guests but they cannot book it (e.g. not ready yet); its nights are closed on connected channels too. The venue can still add bookings itself. Default true."
         }
        },
        "required": [
         "name",
         "kind",
         "price_per_night_eur"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/units/{unit_id}": {
   "patch": {
    "operationId": "update_unit",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Change a unit",
    "description": "Changes a unit. Only the fields you send change. Existing bookings keep their agreed total.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "unit_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Name guests see, e.g. \"Sea-view studio\" or \"Tent or camper pitch\"."
         },
         "kind": {
          "type": "string",
          "enum": [
           "room",
           "apartment",
           "home",
           "caravan",
           "glamping",
           "pitch",
           "other"
          ],
          "description": "What it is."
         },
         "price_per_night_eur": {
          "type": "number",
          "description": "Base price per night in euro (seasons can override it)."
         },
         "guests_up_to": {
          "type": "integer",
          "description": "Most guests it takes (1-60)."
         },
         "identical_units": {
          "type": "integer",
          "description": "How many identical ones exist, e.g. 20 tent and camper pitches. Default 1."
         },
         "min_nights": {
          "type": "integer",
          "description": "Minimum nights per booking. Default 1."
         },
         "description": {
          "type": "string",
          "description": "Free text for guests (up to 600 characters)."
         },
         "bedrooms": {
          "type": "integer",
          "description": "0 = not shown."
         },
         "bathrooms": {
          "type": "integer",
          "description": "0 = not shown."
         },
         "size_sqm": {
          "type": "integer",
          "description": "Size in square metres. 0 = not shown."
         },
         "beds": {
          "type": "object",
          "description": "How many beds of each kind, e.g. {\"double\":1,\"single\":2}. Kinds: double, single, sofa, bunk.",
          "additionalProperties": {
           "type": "integer"
          }
         },
         "amenities": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Amenity keys from list_stay_options (unit_amenities), e.g. [\"wifi\",\"ac\",\"kitchen\"]."
         },
         "shown_to_guests": {
          "type": "boolean",
          "description": "False hides the unit from the booking page. Default true."
         },
         "takes_bookings": {
          "type": "boolean",
          "description": "False keeps the unit visible to guests but they cannot book it (e.g. not ready yet); its nights are closed on connected channels too. The venue can still add bookings itself. Default true."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   },
   "delete": {
    "operationId": "delete_unit",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Delete a unit",
    "description": "Deletes a unit together with its photos. A unit that has ever had a booking is not deleted: it is hidden from guests instead, so the booking history stays.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "unit_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/units/{unit_id}/calendar": {
   "get": {
    "operationId": "get_unit_calendar",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "A unit night by night: price, closed, booked",
    "description": "Night by night for one unit (at most 92 nights), like the calendar in the admin: the price guests pay, whether it is the night’s own price, whether the venue closed it (and why), how many of the identical units are taken and free. Also the bookings and other-channel blocks touching those nights. Defaults to today and the next 30 nights.\n\nAvailable for stays venues.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "unit_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "First night, YYYY-MM-DD. Default: today."
      },
      "description": "First night, YYYY-MM-DD. Default: today."
     },
     {
      "name": "nights",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "1-92. Default 30."
      },
      "description": "1-92. Default 30."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/listing": {
   "get": {
    "operationId": "get_listing",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "The public listing: text, amenities, photos",
    "description": "What a guest sees at the top of the booking page: the description of the place, its amenities and its photos. Also the booking rules and the seasonal prices.\n\nAvailable for stays venues.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "put": {
    "operationId": "set_listing",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Change the listing text and amenities",
    "description": "Sets the description of the place shown at the top of the booking page, and the venue-wide amenities. Send only what should change.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "about": {
          "type": "string",
          "description": "Up to 1500 characters."
         },
         "amenities": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Keys from list_stay_options (venue_amenities). Replaces the current list."
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/photos": {
   "post": {
    "operationId": "add_photo",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Add a photo from a public link",
    "description": "Adds a photo to a unit, or to the venue itself when unit_id is left out. Give the direct public https link to an existing photo file (jpg, png or webp, up to 15 MB): it is downloaded, resized and stored. The first photo of a group is its cover. Up to 16 per unit and for the venue. Use only photos the venue owns or may use; this tool cannot create images.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "image_url": {
          "type": "string",
          "description": "Direct link to the photo file."
         },
         "unit_id": {
          "type": "string",
          "description": "Leave out for a photo of the venue as a whole."
         },
         "make_cover": {
          "type": "boolean",
          "description": "True puts it first."
         }
        },
        "required": [
         "image_url"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/photos/{photo_id}": {
   "delete": {
    "operationId": "remove_photo",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Remove a photo",
    "description": "Deletes one photo (of a unit or of the venue) for good.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "photo_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/photos/{photo_id}/cover": {
   "put": {
    "operationId": "set_cover_photo",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Make a photo the cover",
    "description": "Puts a photo first in its group (the unit or the venue), so it is the one guests see in lists.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "photo_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/availability": {
   "get": {
    "operationId": "check_availability",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Free units and prices for dates",
    "description": "For a check-in and check-out date and a number of guests: which units are free, how many are left and the total price. closed_by_venue is true when a night falls on a day the venue closed; takes_bookings false means guests cannot book that unit online.\n\nAvailable for stays venues.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "check_in",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "YYYY-MM-DD"
      },
      "description": "YYYY-MM-DD"
     },
     {
      "name": "check_out",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "YYYY-MM-DD (the day the guest leaves)"
      },
      "description": "YYYY-MM-DD (the day the guest leaves)"
     },
     {
      "name": "guests",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "description": "Default 2."
      },
      "description": "Default 2."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/stay-bookings": {
   "get": {
    "operationId": "list_stay_bookings",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Stay bookings between two dates",
    "description": "Bookings that hold a unit (requested, confirmed, in house) and touch a date range of at most 62 days. Defaults to today and the next 30 days. Guest name and booking code only; contact details are not available here.\n\nAvailable for stays venues.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "First day, YYYY-MM-DD. Default: today."
      },
      "description": "First day, YYYY-MM-DD. Default: today."
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Last day, YYYY-MM-DD. Default: from + 30 days."
      },
      "description": "Last day, YYYY-MM-DD. Default: from + 30 days."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/closed-days": {
   "get": {
    "operationId": "list_closed_days",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Closed nights",
    "description": "Days the venue has closed itself (holiday, own use, an event), for one unit or for all units. Nobody can book those nights, online, by the venue or on connected channels. Defaults to everything from today on.\n\nAvailable for stays venues.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "YYYY-MM-DD. Default: today."
      },
      "description": "YYYY-MM-DD. Default: today."
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "YYYY-MM-DD. Default: no end."
      },
      "description": "YYYY-MM-DD. Default: no end."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "close_days",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Close nights (one unit or all)",
    "description": "Makes one day or a whole range unavailable, for one unit or (without unit_id) for all units: no bookings can be made on those nights, online, by the venue or on connected channels. A closed day means nobody can stay that night. Existing bookings on those days are not cancelled; they are listed in the answer. For one day, send only from.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "from": {
          "type": "string",
          "description": "First closed night, YYYY-MM-DD."
         },
         "to": {
          "type": "string",
          "description": "Last closed night (inclusive), YYYY-MM-DD. Default: same as from."
         },
         "unit_id": {
          "type": "string",
          "description": "Leave out to close all units."
         },
         "reason": {
          "type": "string",
          "description": "Optional, only the venue sees it, e.g. \"Holiday\" or \"Family visit\"."
         }
        },
        "required": [
         "from"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/closed-days/open": {
   "post": {
    "operationId": "open_days",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Open closed nights again",
    "description": "Opens closed days again for bookings. With unit_id it opens only what was closed for that unit (days closed for all units stay closed); without unit_id it opens every closed day in the range. Part of a longer closed range can be opened; the rest stays closed.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "from": {
          "type": "string",
          "description": "First night to open, YYYY-MM-DD."
         },
         "to": {
          "type": "string",
          "description": "Last night to open (inclusive), YYYY-MM-DD. Default: same as from."
         },
         "unit_id": {
          "type": "string",
          "description": "Leave out to open the range for all units."
         }
        },
        "required": [
         "from"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/nightly-prices": {
   "get": {
    "operationId": "list_nightly_prices",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Own prices for specific nights",
    "description": "Every night that has its own price (set with set_nightly_price), joined into ranges with the same price. For one unit or all. Defaults to today and the next 365 days. Seasons are in get_listing.\n\nAvailable for stays venues.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "unit_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "Leave out for all units."
      },
      "description": "Leave out for all units."
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "YYYY-MM-DD. Default: today."
      },
      "description": "YYYY-MM-DD. Default: today."
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "description": "YYYY-MM-DD, inclusive. Default: from + 365 days."
      },
      "description": "YYYY-MM-DD, inclusive. Default: from + 365 days."
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "put": {
    "operationId": "set_nightly_price",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Set a price for specific nights",
    "description": "Gives its own price per night to one night or a range (e.g. Christmas), for one unit or (without unit_id) for every unit. It wins over seasons and the base price. weekdays limits it to some days of the week, e.g. [\"fri\",\"sat\"] for weekends in July. Existing bookings keep their agreed total. For one night, send only from.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "unit_id": {
          "type": "string",
          "description": "Leave out to set it on every unit."
         },
         "from": {
          "type": "string",
          "description": "First night, YYYY-MM-DD."
         },
         "to": {
          "type": "string",
          "description": "Last night (inclusive), YYYY-MM-DD. Default: same as from."
         },
         "price_per_night_eur": {
          "type": "number"
         },
         "weekdays": {
          "type": "array",
          "items": {
           "type": "string",
           "enum": [
            "mon",
            "tue",
            "wed",
            "thu",
            "fri",
            "sat",
            "sun"
           ]
          },
          "description": "Optional: only these nights of the week."
         }
        },
        "required": [
         "from",
         "price_per_night_eur"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/nightly-prices/reset": {
   "post": {
    "operationId": "reset_nightly_price",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Back to the normal price for some nights",
    "description": "Removes the own price of nights in a range, so they go back to the season or base price. For one unit or (without unit_id) every unit. For one night, send only from.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "unit_id": {
          "type": "string",
          "description": "Leave out for every unit."
         },
         "from": {
          "type": "string",
          "description": "YYYY-MM-DD"
         },
         "to": {
          "type": "string",
          "description": "YYYY-MM-DD, inclusive. Default: same as from."
         }
        },
        "required": [
         "from"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/seasons": {
   "post": {
    "operationId": "add_season",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Add a season with its own price",
    "description": "A date range with a different price per night (high season, Easter…), for one unit or for all. Nights inside it use this price instead of the unit’s base price. A season for a specific unit wins over one for all units; a night’s own price (set_nightly_price) wins over both.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "201": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "from": {
          "type": "string",
          "description": "First night, YYYY-MM-DD."
         },
         "to": {
          "type": "string",
          "description": "Last night (inclusive), YYYY-MM-DD."
         },
         "price_per_night_eur": {
          "type": "number"
         },
         "name": {
          "type": "string",
          "description": "Optional label, e.g. \"August\"."
         },
         "unit_id": {
          "type": "string",
          "description": "Leave out to apply to all units."
         },
         "min_nights": {
          "type": "integer",
          "description": "Optional minimum stay for bookings that start in this season (2-60)."
         }
        },
        "required": [
         "from",
         "to",
         "price_per_night_eur"
        ],
        "additionalProperties": false
       }
      }
     }
    }
   }
  },
  "/admin/seasons/{season_id}": {
   "delete": {
    "operationId": "remove_season",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Remove a season",
    "description": "Deletes a seasonal price. Nights in it go back to the base price. Existing bookings keep their agreed total.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [
     {
      "name": "season_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/admin/stay-rules": {
   "put": {
    "operationId": "set_stay_rules",
    "tags": [
     "Admin · Stays"
    ],
    "summary": "Check-in/out times, instant confirmation, cancellation",
    "description": "Check-in and check-out times, whether online bookings are confirmed at once or wait for the venue, and until how many days before arrival a guest may cancel. Send only what should change.\n\nAvailable for stays venues.\n\nNeeds a key with read-and-change access.",
    "security": [
     {
      "apiKey": []
     }
    ],
    "parameters": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "data": {}
         },
         "required": [
          "data"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad request (unknown or missing field)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "No or invalid key / token",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Not allowed (read-only key, account not approved…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Not found, or not available for this kind of venue",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Conflict (full, already booked, taken…)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Invalid value",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "check_in_from": {
          "type": "string",
          "description": "HH:MM"
         },
         "check_out_by": {
          "type": "string",
          "description": "HH:MM"
         },
         "instant_confirmation": {
          "type": "boolean",
          "description": "False = each online booking waits for the venue to confirm."
         },
         "guest_can_cancel_until_days_before": {
          "type": "integer",
          "description": "0-60"
         }
        },
        "required": [],
        "additionalProperties": false
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "apiKey": {
    "type": "http",
    "scheme": "bearer",
    "description": "A venue API key (bkp_…), created by an admin in Settings → Assistant and API, read-only or read-and-change. Also accepts OAuth access tokens of the assistant connection. 120 requests a minute per key."
   },
   "customerToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "A customer token from POST /auth/token, valid 90 days."
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "object",
      "required": [
       "code",
       "message"
      ],
      "properties": {
       "code": {
        "type": "string",
        "enum": [
         "bad_request",
         "unauthorized",
         "forbidden",
         "not_found",
         "method_not_allowed",
         "conflict",
         "unprocessable",
         "rate_limited",
         "server_error"
        ]
       },
       "message": {
        "type": "string",
        "description": "Readable, in the request’s language."
       },
       "field": {
        "type": "string"
       },
       "reason": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}