{
  "openapi": "3.1.0",
  "info": {
    "title": "Ruumio API",
    "version": "1",
    "description": "A studio's bookings, rooms, members, invoices and webhooks. Every request carries the studio's API key (Ruumio admin: Integrations → API keys; the integrations add-on). 300 requests a minute per key. Amounts are in hundredths of the currency. Fields are only ever added, never renamed or removed."
  },
  "servers": [
    {
      "url": "https://ruumio.app/api/v1"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "summary": "The key's studio",
        "description": "The studio the key belongs to and the key itself (its role's areas). Use it to test a connection.",
        "x-areas": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "The studio and the key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "studio": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Studio id"
                        },
                        "slug": {
                          "type": "string",
                          "description": "Subdomain"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name"
                        },
                        "url": {
                          "type": "string",
                          "description": "Its address"
                        },
                        "timezone": {
                          "type": "string",
                          "description": "IANA time zone"
                        },
                        "currency": {
                          "type": "string",
                          "description": "Selling currency, e.g. EUR"
                        }
                      }
                    },
                    "key": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The key's name"
                        },
                        "prefix": {
                          "type": "string",
                          "description": "Its first characters"
                        },
                        "role": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The role's name; null = all rights"
                        },
                        "areas": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "string",
                            "description": "Admin area"
                          }
                        },
                        "viewOnly": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "string",
                            "description": "Area held to read only"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/rooms": {
      "get": {
        "summary": "Rooms",
        "description": "The studio's active rooms with their prices, lengths, setups and services. Areas (any one): calendar, bookings, rooms.",
        "x-areas": [
          "calendar",
          "bookings",
          "rooms"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "The rooms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Room"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/availability": {
      "get": {
        "summary": "Free times",
        "description": "A room's free time ranges on one day, by the room's rules (opening hours, closures, other bookings). Areas (any one): calendar, bookings.",
        "x-areas": [
          "calendar",
          "bookings"
        ],
        "parameters": [
          {
            "name": "roomId",
            "in": "query",
            "required": true,
            "description": "The room",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "YYYY-MM-DD in the studio's time zone",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Free ranges",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roomId": {
                      "type": "string",
                      "description": "The room"
                    },
                    "date": {
                      "type": "string",
                      "description": "The day"
                    },
                    "free": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "start": {
                            "type": "string",
                            "description": "HH:MM"
                          },
                          "end": {
                            "type": "string",
                            "description": "HH:MM"
                          }
                        }
                      }
                    },
                    "closed": {
                      "type": "boolean",
                      "description": "Closed all day"
                    },
                    "beyondHorizon": {
                      "type": "boolean",
                      "description": "Past the room's booking horizon"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "room_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_date",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings": {
      "get": {
        "summary": "List bookings",
        "description": "Bookings by date, newest first. Without status: confirmed, cancelled and awaiting approval. Areas (any one): calendar, bookings.",
        "x-areas": [
          "calendar",
          "bookings"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD (default today)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD (default today + 30 days)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "confirmed, cancelled, pending_approval, declined…",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200 (default 50)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bookings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a booking",
        "description": "Books a room for an active member, as the studio (no card payment is asked, as for an admin's booking). An end at or before the start is the next day. Areas (any one): calendar, bookings.",
        "x-areas": [
          "calendar",
          "bookings"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roomId": {
                    "type": "string",
                    "description": "The room"
                  },
                  "date": {
                    "type": "string",
                    "description": "YYYY-MM-DD"
                  },
                  "startTime": {
                    "type": "string",
                    "description": "HH:MM"
                  },
                  "endTime": {
                    "type": "string",
                    "description": "HH:MM"
                  },
                  "email": {
                    "type": "string",
                    "description": "The member's e-mail (or userId)"
                  },
                  "userId": {
                    "type": "string",
                    "description": "The member's id (or email)"
                  },
                  "note": {
                    "type": "string",
                    "description": "A note, at most 1,000 characters"
                  },
                  "extraIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Extra id"
                    },
                    "description": "Booking extras"
                  },
                  "companyId": {
                    "type": "string",
                    "description": "Book on a company account"
                  },
                  "setupId": {
                    "type": "string",
                    "description": "A setup of the room"
                  },
                  "serviceId": {
                    "type": "string",
                    "description": "A service offered in the room: the end must fit its length"
                  },
                  "typeId": {
                    "type": "string",
                    "description": "A booking type; default the studio's"
                  }
                }
              },
              "example": {
                "roomId": "cm…",
                "date": "2026-12-01",
                "startTime": "10:00",
                "endTime": "12:00",
                "email": "mari@example.com",
                "note": "Two guests"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The booking made",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "member_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_time, overlap, roomNotFound, invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}": {
      "get": {
        "summary": "One booking",
        "description": "A booking of the studio. Areas (any one): calendar, bookings.",
        "x-areas": [
          "calendar",
          "bookings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The booking",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "booking_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}/cancel": {
      "post": {
        "summary": "Cancel a booking",
        "description": "Cancels as the studio. A request awaiting approval is declined instead. Areas (any one): calendar, bookings.",
        "x-areas": [
          "calendar",
          "bookings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "refund": {
                    "type": "string",
                    "description": "full (default), policy, none, credit or policy_credit (the refund as store credit)",
                    "enum": [
                      "full",
                      "policy",
                      "none",
                      "credit",
                      "policy_credit"
                    ]
                  }
                }
              },
              "example": {
                "refund": "policy"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The booking as it is now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "booking_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "credit_not_possible, invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "refund_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/members": {
      "get": {
        "summary": "Find a member",
        "description": "A member by e-mail (the API never lists everyone). Areas (any one): members.",
        "x-areas": [
          "members"
        ],
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "description": "The e-mail address",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The member, or an empty list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Member"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "email_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "summary": "List invoices",
        "description": "Invoices and credit notes issued since a time, newest first, up to 100. Areas (any one): sales.",
        "x-areas": [
          "sales"
        ],
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "An ISO time (default the beginning)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Invoice"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}": {
      "get": {
        "summary": "One invoice",
        "description": "An invoice or credit note of the studio. Areas (any one): sales.",
        "x-areas": [
          "sales"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The invoice",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "invoice_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/pdf": {
      "get": {
        "summary": "An invoice as a PDF",
        "description": "The invoice drawn as an A4 PDF, in the studio's language or another site language. Areas (any one): sales.",
        "x-areas": [
          "sales"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "A site language code (et, en, fi…); default the studio's",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "application/pdf, attachment <number>.pdf",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "invoice_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "summary": "List webhooks",
        "description": "The studio's webhooks (never their signing secrets). Areas (any one): settings.",
        "x-areas": [
          "settings"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Webhooks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Webhook id"
                          },
                          "url": {
                            "type": "string",
                            "description": "Where events go"
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "Event type or *"
                            }
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "Made",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Subscribe a webhook",
        "description": "REST hooks: events go to url as they happen. The signing secret is returned once. At most 50 per studio. Areas (any one): settings.",
        "x-areas": [
          "settings"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "A public https address"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Event types, or * for every event"
                    },
                    "description": "Default [\"*\"]"
                  },
                  "description": {
                    "type": "string",
                    "description": "At most 200 characters"
                  }
                }
              },
              "example": {
                "url": "https://hooks.example.com/ruumio",
                "events": [
                  "booking.created",
                  "booking.cancelled"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The webhook and its secret (shown once)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Webhook id"
                    },
                    "url": {
                      "type": "string",
                      "description": "Its address"
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "Event type"
                      }
                    },
                    "secret": {
                      "type": "string",
                      "description": "whsec_…: signs every delivery"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_json",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_url, invalid_events, too_many, invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "summary": "Unsubscribe a webhook",
        "description": "Deletes a webhook. Areas (any one): settings.",
        "x-areas": [
          "settings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "addon_inactive, insufficient_permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "webhook_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "booking.created": {
      "post": {
        "summary": "A booking is confirmed: made, paid where the room is paid, or approved; each booking of a series",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "booking.created"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "booking.created"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "booking.cancelled": {
      "post": {
        "summary": "A booking is cancelled",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "booking.cancelled"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "booking.cancelled"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "booking.awaiting_approval": {
      "post": {
        "summary": "A booking request waits for the studio's approval",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "booking.awaiting_approval"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "booking.awaiting_approval"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "booking.declined": {
      "post": {
        "summary": "A request ended without a booking: declined, unanswered in time, or withdrawn",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "booking.declined"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "booking.declined"
                      },
                      "data": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Booking"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "reason": {
                                "type": "string",
                                "description": "declined, expired or withdrawn",
                                "enum": [
                                  "declined",
                                  "expired",
                                  "withdrawn"
                                ]
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "booking.ended": {
      "post": {
        "summary": "A confirmed booking's end has passed (within a few minutes; for sessions ended after the webhook was made, at most 6 hours late)",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "booking.ended"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "booking.ended"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "booking.files_delivered": {
      "post": {
        "summary": "The studio added links to a session's files (labels only)",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "booking.files_delivered"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "booking.files_delivered"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "payment.received": {
      "post": {
        "summary": "A booking is paid by card, or the studio recorded cash or a transfer",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "payment.received"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "payment.received"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "refund.issued": {
      "post": {
        "summary": "Money went back on a booking",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "refund.issued"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "refund.issued"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "integer",
                            "description": "Refunded now, in hundredths of the currency (cents)"
                          },
                          "currency": {
                            "type": "string",
                            "description": "Currency"
                          },
                          "booking": {
                            "$ref": "#/components/schemas/Booking"
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "invoice.issued": {
      "post": {
        "summary": "An invoice or credit note is issued",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "invoice.issued"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "invoice.issued"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Invoice"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "invoice.paid": {
      "post": {
        "summary": "A company invoice is marked paid",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "invoice.paid"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "invoice.paid"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Invoice"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "plan.started": {
      "post": {
        "summary": "A member's monthly plan started (bought or given)",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "plan.started"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "plan.started"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Plan"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "plan.ended": {
      "post": {
        "summary": "A member's plan ended",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "plan.ended"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "plan.ended"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Plan"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "pack.purchased": {
      "post": {
        "summary": "An hour pack is bought, free through a code, or given by the studio",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "pack.purchased"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "pack.purchased"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Pack"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "giftcard.purchased": {
      "post": {
        "summary": "A gift card is bought (never its code)",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "giftcard.purchased"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "giftcard.purchased"
                      },
                      "data": {
                        "$ref": "#/components/schemas/GiftCard"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "waiver.signed": {
      "post": {
        "summary": "Someone signed the studio's waiver while booking (the version, never the IP or browser)",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "waiver.signed"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "waiver.signed"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Signature id"
                          },
                          "version": {
                            "type": "integer",
                            "description": "Waiver version"
                          },
                          "signedAt": {
                            "type": "string",
                            "description": "Signed",
                            "format": "date-time"
                          },
                          "booking": {
                            "$ref": "#/components/schemas/Booking"
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "credit.granted": {
      "post": {
        "summary": "A member got store credit from the studio or as a partner reward",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "credit.granted"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "credit.granted"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Credit"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "member.joined": {
      "post": {
        "summary": "Someone became a member",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "member.joined"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.joined"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Member"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "member.updated": {
      "post": {
        "summary": "A member's details or role changed (by the studio or the member)",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "member.updated"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "member.updated"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Member"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "review.created": {
      "post": {
        "summary": "A client reviewed a session",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "review.created"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "review.created"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Review"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    },
    "contact.created": {
      "post": {
        "summary": "Someone wrote through the studio's contact form",
        "description": "Sent to every webhook subscribed to this event (or to *), signed with the webhook's secret in Ruumio-Signature.",
        "parameters": [
          {
            "name": "Ruumio-Event",
            "in": "header",
            "schema": {
              "type": "string",
              "const": "contact.created"
            }
          },
          {
            "name": "Ruumio-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ruumio-Signature",
            "in": "header",
            "description": "t=<unix time>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the secret>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "evt_…: the event (the same in a retry)"
                      },
                      "type": {
                        "type": "string",
                        "description": "The event type"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "When it happened",
                        "format": "date-time"
                      },
                      "studio": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Studio id"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Subdomain"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name"
                          },
                          "url": {
                            "type": "string",
                            "description": "Its address"
                          }
                        }
                      },
                      "data": {
                        "description": "The event's data"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "contact.created"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Contact"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. A 410 switches the webhook off; other answers are retried with backoff (1 min to a day, 8 tries; 15 failures in a row switch it off)."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer ruumio_… (or the X-Api-Key header)"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "A stable code (see the list)"
              },
              "message": {
                "type": "string",
                "description": "What went wrong, for people"
              }
            }
          }
        }
      },
      "Room": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Room id"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description"
          },
          "location": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Location id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Address"
              }
            }
          },
          "pricePerHour": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Price per hour, in hundredths of the currency (cents)"
          },
          "currency": {
            "type": "string",
            "description": "Currency of the prices"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ],
            "description": "People"
          },
          "requiresApproval": {
            "type": "boolean"
          },
          "minMinutes": {
            "type": "integer",
            "description": "Shortest booking"
          },
          "stepMinutes": {
            "type": "integer",
            "description": "Start times every n minutes"
          },
          "lengthByWeekday": {
            "type": "object",
            "description": "Shortest / longest per ISO weekday where the day has its own"
          },
          "setups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Setup id"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                },
                "seats": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Seats"
                }
              }
            }
          },
          "bookingMode": {
            "type": "string",
            "description": "HOURLY, SERVICES or BOTH"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Service id"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                },
                "minutes": {
                  "type": "integer",
                  "description": "Length"
                },
                "price": {
                  "type": "integer",
                  "description": "Price, in hundredths of the currency (cents)"
                },
                "setupIds": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string",
                    "description": "Setup id"
                  }
                }
              }
            }
          }
        }
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Booking id"
          },
          "status": {
            "type": "string",
            "description": "CONFIRMED, PENDING_PAYMENT, PENDING_APPROVAL, CANCELLED, DECLINED, EXPIRED…"
          },
          "date": {
            "type": "string",
            "description": "YYYY-MM-DD (studio time)"
          },
          "startTime": {
            "type": "string",
            "description": "HH:MM"
          },
          "endTime": {
            "type": "string",
            "description": "HH:MM"
          },
          "start": {
            "type": "string",
            "description": "Start instant",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "description": "End instant",
            "format": "date-time"
          },
          "timezone": {
            "type": "string",
            "description": "IANA time zone"
          },
          "room": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Room id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "location": {
                "type": [
                  "object",
                  "null"
                ]
              }
            }
          },
          "setup": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Setup id"
              },
              "name": {
                "type": "string",
                "description": "Name at booking"
              }
            }
          },
          "service": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Service id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "minutes": {
                "type": "integer",
                "description": "Length"
              },
              "price": {
                "type": "integer",
                "description": "Price, in hundredths of the currency (cents)"
              }
            }
          },
          "booker": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "User id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "E-mail"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Phone"
              },
              "walkIn": {
                "type": "boolean",
                "description": "A client without an account the admin typed in"
              }
            }
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "The booker's note"
          },
          "extras": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Extra name"
            }
          },
          "delivery": {
            "type": [
              "string",
              "null"
            ],
            "description": "File delivery option"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "File id"
                },
                "label": {
                  "type": "string",
                  "description": "Label"
                },
                "host": {
                  "type": "string",
                  "description": "Where it's kept (never the address)"
                },
                "openCount": {
                  "type": "integer",
                  "description": "Opens"
                },
                "createdAt": {
                  "type": "string",
                  "description": "Added",
                  "format": "date-time"
                }
              }
            }
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "question": {
                  "type": "string",
                  "description": "As asked"
                },
                "answer": {
                  "type": "string",
                  "description": "The answer"
                }
              }
            }
          },
          "staff": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "User id"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                }
              }
            }
          },
          "waiver": {
            "type": "object",
            "properties": {
              "signed": {
                "type": "boolean"
              },
              "version": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Waiver version"
              },
              "signedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Signed",
                "format": "date-time"
              }
            }
          },
          "company": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Company id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              }
            }
          },
          "type": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Type id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "color": {
                "type": "string",
                "description": "Hex colour"
              }
            }
          },
          "amount": {
            "type": "integer",
            "description": "Card part, in hundredths of the currency (cents)"
          },
          "currency": {
            "type": "string",
            "description": "Currency"
          },
          "paid": {
            "type": "boolean"
          },
          "paymentMethod": {
            "type": [
              "string",
              "null"
            ],
            "description": "CARD, CASH or TRANSFER once paid"
          },
          "refunded": {
            "type": "integer",
            "description": "Refunded, in hundredths of the currency (cents)"
          },
          "creditAmount": {
            "type": "integer",
            "description": "Paid with store credit, in hundredths of the currency (cents)"
          },
          "credited": {
            "type": "integer",
            "description": "Turned into store credit by a cancellation, in hundredths of the currency (cents)"
          },
          "channel": {
            "type": "string",
            "description": "SITE, LINK, ADMIN, API or HUB"
          },
          "visitSource": {
            "type": [
              "string",
              "null"
            ],
            "description": "google, instagram, utm:<source>, site:<host>, hub, direct"
          },
          "createdAt": {
            "type": "string",
            "description": "Made",
            "format": "date-time"
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cancelled",
            "format": "date-time"
          }
        }
      },
      "Member": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "User id"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "email": {
            "type": "string",
            "description": "E-mail"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone"
          },
          "role": {
            "type": "string",
            "description": "OWNER, ADMIN, STAFF or MEMBER"
          },
          "status": {
            "type": "string",
            "description": "ACTIVE, PENDING or DISABLED"
          },
          "joinedAt": {
            "type": "string",
            "description": "Joined",
            "format": "date-time"
          }
        }
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Invoice id"
          },
          "number": {
            "type": "string",
            "description": "Number"
          },
          "kind": {
            "type": "string",
            "description": "BOOKING, PACK, GIFT_CARD, PLAN, COMPANY or CREDIT_NOTE"
          },
          "issuedAt": {
            "type": "string",
            "description": "Issued",
            "format": "date-time"
          },
          "currency": {
            "type": "string",
            "description": "Currency"
          },
          "gross": {
            "type": "integer",
            "description": "Total, in hundredths of the currency (cents)"
          },
          "net": {
            "type": "integer",
            "description": "Without VAT, in hundredths of the currency (cents)"
          },
          "vat": {
            "type": "integer",
            "description": "VAT or sales tax, in hundredths of the currency (cents)"
          },
          "vatRate": {
            "type": "integer",
            "description": "Main VAT rate, %"
          },
          "vatBreakdown": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rate": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "exempt": {
                  "type": "boolean"
                },
                "net": {
                  "type": "integer",
                  "description": "Net, in hundredths of the currency (cents)"
                },
                "vat": {
                  "type": "integer",
                  "description": "VAT, in hundredths of the currency (cents)"
                },
                "gross": {
                  "type": "integer",
                  "description": "Gross, in hundredths of the currency (cents)"
                }
              }
            }
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "description": "Line"
                },
                "quantity": {
                  "type": "number"
                },
                "unitAmount": {
                  "type": "integer",
                  "description": "Unit price, in hundredths of the currency (cents)"
                },
                "amount": {
                  "type": "integer",
                  "description": "Amount, in hundredths of the currency (cents)"
                }
              }
            }
          },
          "buyer": {
            "type": "object",
            "description": "The buyer as invoiced"
          },
          "customerRefs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "Question"
                },
                "answer": {
                  "type": "string",
                  "description": "Reference"
                }
              }
            }
          },
          "bookingId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Booking"
          },
          "companyId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Company"
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Due (company invoices)",
            "format": "date-time"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Marked paid",
            "format": "date-time"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Payment reference number"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The shared view's address (company invoices)"
          }
        }
      },
      "Plan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Subscription id"
          },
          "status": {
            "type": "string",
            "description": "ACTIVE, PAST_DUE, CANCELED…"
          },
          "plan": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Plan id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              }
            }
          },
          "member": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "User id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "email": {
                "type": "string",
                "description": "E-mail"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Phone"
              }
            }
          },
          "price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Price, in hundredths of the currency (cents)"
          },
          "paymentMethod": {
            "type": "string",
            "description": "CARD, CASH or TRANSFER"
          },
          "channel": {
            "type": "string",
            "description": "Where it was bought"
          },
          "currentPeriodEnd": {
            "type": [
              "string",
              "null"
            ],
            "description": "Period ends",
            "format": "date-time"
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "startedAt": {
            "type": "string",
            "description": "Started",
            "format": "date-time"
          },
          "endedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Ended",
            "format": "date-time"
          }
        }
      },
      "Pack": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Balance id"
          },
          "status": {
            "type": "string",
            "description": "ACTIVE…"
          },
          "pack": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Pack id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              }
            }
          },
          "member": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "User id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "email": {
                "type": "string",
                "description": "E-mail"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Phone"
              }
            }
          },
          "minutes": {
            "type": "integer",
            "description": "Minutes bought"
          },
          "amount": {
            "type": "integer",
            "description": "Price paid, in hundredths of the currency (cents)"
          },
          "currency": {
            "type": "string",
            "description": "Currency"
          },
          "paymentMethod": {
            "type": "string",
            "description": "CARD, CASH or TRANSFER"
          },
          "channel": {
            "type": "string",
            "description": "Where it was bought"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Paid",
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Expires",
            "format": "date-time"
          }
        }
      },
      "GiftCard": {
        "type": "object",
        "description": "Never the card's code",
        "properties": {
          "id": {
            "type": "string",
            "description": "Gift card id"
          },
          "status": {
            "type": "string",
            "description": "ACTIVE…"
          },
          "amount": {
            "type": "integer",
            "description": "Value, in hundredths of the currency (cents)"
          },
          "balance": {
            "type": "integer",
            "description": "Left, in hundredths of the currency (cents)"
          },
          "currency": {
            "type": "string",
            "description": "Currency"
          },
          "buyer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name"
              },
              "email": {
                "type": "string",
                "description": "E-mail"
              }
            }
          },
          "recipient": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "E-mail"
              }
            }
          },
          "channel": {
            "type": "string",
            "description": "Where it was bought"
          },
          "paidAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Paid",
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Expires",
            "format": "date-time"
          }
        }
      },
      "Credit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Credit id"
          },
          "source": {
            "type": "string",
            "description": "GOODWILL (the studio) or REWARD (a partner code)"
          },
          "amount": {
            "type": "integer",
            "description": "Amount, in hundredths of the currency (cents)"
          },
          "currency": {
            "type": "string",
            "description": "Currency"
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "The studio's note"
          },
          "member": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "User id"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "email": {
                "type": "string",
                "description": "E-mail"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Phone"
              }
            }
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Expires",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "description": "Given",
            "format": "date-time"
          }
        }
      },
      "Review": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Review id"
          },
          "bookingId": {
            "type": "string",
            "description": "Booking"
          },
          "rating": {
            "type": "integer",
            "description": "1–5"
          },
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text"
          },
          "author": {
            "type": "string",
            "description": "First name and initial"
          },
          "createdAt": {
            "type": "string",
            "description": "Written",
            "format": "date-time"
          }
        }
      },
      "Contact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Message id"
          },
          "name": {
            "type": "string",
            "description": "Name"
          },
          "email": {
            "type": "string",
            "description": "E-mail"
          },
          "message": {
            "type": "string",
            "description": "Text"
          },
          "createdAt": {
            "type": "string",
            "description": "Sent",
            "format": "date-time"
          }
        }
      }
    }
  }
}