{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Zooza API v3",
    "description": "The Zooza API.\n\n## Field naming\n\nFields that start with `__` are **materialisations**: values stored next to the record so lists can be\nread without extra lookups.\n\n| Pattern | Meaning | Example |\n|---|---|---|\n| `__{table}__{field}` | The value of `{table}.{field}` for the related record | `__courses__price` on a class is the price of its programme |\n| `__calc__{name}` | A calculated value | `__calc__debt` |\n| `__view__{name}` | A projection (a value shaped for display) | |\n\nFields without the prefix are the record's own columns.\n\n## Authentication\n\nExchange your API key and client secret for a bearer token at `POST /v3/token`, then send it as `Authorization: Bearer <token>`. Tokens last one hour; request a new one when it expires.\n\n## Company\n\nA key is pinned to the company that created it: every call reads and changes that company's data only, unless the key was issued with an unlimited company scope.\n\n## Rate limiting\n\nEvery operation costs points (`x-zooza-cost`) against **the account's** budget — not the key's. Every key the account owns spends the same points, so a second key does not bring a second budget. `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` are reported **in points, not in requests**. An account may additionally cap one key below its own budget; when it has, `X-RateLimit-Key-*` report that cap and a call has to fit in both. On a `429`, `X-RateLimit-Scope` says which of the two was full. `GET /v3/me` shows what you may call and what is left.\n\n## Errors\n\n`401`, `403`, `422` and `429` come from the gateway and use the error shape documented below. `200`, `304`, `400` and `500` come from the Zooza API itself and keep its own, localised error envelope."
  },
  "servers": [
    {
      "url": "https://api.zooza.app/v3"
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": "Obtain a login token."
    },
    {
      "name": "Agreements",
      "description": "Agreement texts (terms, consents)."
    },
    {
      "name": "Customer profile",
      "description": "Endpoints that act for the logged-in customer, like a `/me` API. They power the customer profile widget and need a **widget** API key; use them to build your own customer-facing profile. `{User_ID}` must be the logged-in customer."
    },
    {
      "name": "Sessions",
      "description": "Sessions (events) of classes."
    },
    {
      "name": "Extra fields",
      "description": "Custom booking form fields."
    },
    {
      "name": "Attendance",
      "description": "Who attends a session."
    },
    {
      "name": "Calendar",
      "description": "Sessions across programmes for a date range."
    },
    {
      "name": "Registrations",
      "description": "Bookings."
    },
    {
      "name": "Programmes",
      "description": "Programmes (courses)."
    },
    {
      "name": "Classes",
      "description": "Classes (schedules) within programmes."
    },
    {
      "name": "Payments",
      "description": "Recording payments."
    },
    {
      "name": "Invoices",
      "description": "Invoices issued to customers."
    },
    {
      "name": "Company",
      "description": "Company data such as venues."
    },
    {
      "name": "Users",
      "description": "People with a role in the company."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/registrations": {
      "get": {
        "operationId": "get_registrations",
        "tags": [
          "Registrations"
        ],
        "summary": "Search registrations",
        "description": "Searches the company's registrations. Send `advanced_search=1`: without it the endpoint returns nothing. Default: 20 per page, newest first, deleted registrations left out. `total` stops counting at 500 (`total_capped` says when). Instructors see only registrations in their own classes, and personal or financial fields can be masked by role.",
        "parameters": [
          {
            "in": "query",
            "name": "advanced_search",
            "required": true,
            "description": "Must be `1`. Without it the endpoint returns no results.",
            "schema": {
              "type": "integer",
              "enum": [
                1
              ]
            }
          },
          {
            "name": "schedule_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Registrations in these classes (schedule ids). Pipe-separate several (`12|15`)."
          },
          {
            "name": "course_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Registrations in these programmes (course ids). Pipe-separate several."
          },
          {
            "name": "place_id",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Registrations in classes held at this venue (place id). Ignored when `room_id` is sent."
          },
          {
            "name": "room_id",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Registrations in classes held in this room (room id). Takes precedence over `place_id`."
          },
          {
            "name": "trainer_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Registrations in classes whose main instructor is one of these users. Pipe-separate several. Additional instructors and session substitutes are not matched."
          },
          {
            "name": "billing_period_id",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Registrations in this billing period (term block). One id; a pipe-separated list is ignored."
          },
          {
            "$ref": "#/components/parameters/Billing_Status"
          },
          {
            "$ref": "#/components/parameters/User"
          },
          {
            "$ref": "#/components/parameters/User_ID"
          },
          {
            "$ref": "#/components/parameters/Email"
          },
          {
            "$ref": "#/components/parameters/Registration_ID"
          },
          {
            "$ref": "#/components/parameters/Exclude"
          },
          {
            "$ref": "#/components/parameters/Exclude_User"
          },
          {
            "$ref": "#/components/parameters/Order_ID"
          },
          {
            "$ref": "#/components/parameters/Parent"
          },
          {
            "$ref": "#/components/parameters/Distinct"
          },
          {
            "$ref": "#/components/parameters/Payment_ID"
          },
          {
            "$ref": "#/components/parameters/Inactive_Customers"
          },
          {
            "$ref": "#/components/parameters/Marketing_Messages"
          },
          {
            "$ref": "#/components/parameters/Ef_Full_Name"
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Zero-based page number. Default `0`."
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            },
            "description": "Registrations per page. Default `20`."
          },
          {
            "$ref": "#/components/parameters/Status"
          },
          {
            "$ref": "#/components/parameters/Created_From"
          },
          {
            "$ref": "#/components/parameters/Created_To"
          },
          {
            "$ref": "#/components/parameters/Schedule_Groups"
          },
          {
            "$ref": "#/components/parameters/Schedule_Query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching registrations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Returned when `advanced_search=1` is sent. Without it the endpoint returns `null`.",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Matching registrations (capped; see `total_capped`)."
                    },
                    "total_capped": {
                      "type": "boolean",
                      "description": "True when `total` hit the counting cap and the real number is higher."
                    },
                    "page": {
                      "type": "integer",
                      "nullable": true
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/APP_Registration"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_registrations",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/registrations/{ID}": {
      "get": {
        "operationId": "get_registrations_id",
        "tags": [
          "Registrations"
        ],
        "summary": "Get a registration",
        "description": "Returns one registration of the company with its linked registrations, pending refund requests and resolved billing. Owners, receptionists, assistants and main instructors can read any registration; other instructors only those in their classes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "responses": {
          "200": {
            "description": "The registration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APP_Registration_Detail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 1,
        "x-zooza-groups": [
          "core_read"
        ]
      },
      "put": {
        "operationId": "put_registrations_id",
        "tags": [
          "Registrations"
        ],
        "summary": "Update a registration",
        "description": "One endpoint for several operations; the first that matches wins: `?action=preflight_check` (preview a `change_status`, writes nothing), a `billing` object, alternate notification email, `?confirm_registration`, the `slots` / `notify` / `business_order` / `notify_about_upcoming_events` fields, a body `action` (one operation, such as `change_status`, `set_attendance` or `set_replacement`), `actions` (several), `?confirm_late`, and otherwise a plain field update. The fields each `action` needs are listed in the body schema.\n\n**On /v3:** the body schema lists the fields of every operation together, because one endpoint\nserves them all. The gateway can therefore check only types and the fields required overall, not\nwhich fields your `action` needs. A body that passes here can still be refused by the Zooza API,\nin its own error format and without a field-by-field breakdown. If that happens, compare the\nfields you sent with the descriptions of the `action` you chose.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          },
          {
            "in": "query",
            "name": "confirm_registration",
            "description": "`1`: sets the registration's status to `registered`, whatever it was, and returns `{status}`. Checked before any body `action`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "confirm_late",
            "description": "`1`: confirms a late registration (`late` becomes `registered`). Owners and instructors only; any other status fails with `update_failed`. Applies only when the body has no `action`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payments_managed_by": {
                    "type": "integer",
                    "description": "Registraton ID Used by: `default`."
                  },
                  "invoice_profile": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "vat_level": {
                    "type": "integer",
                    "description": "Id of a VAT level of the company (`/companies/{ID}/vat_levels`); `null` resets it.",
                    "nullable": true
                  },
                  "extra_replacements_limit": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "company_note": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "public_note": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "note": {
                    "type": "string",
                    "description": "Used by: `default`, `set_attendance_note`. Required for: `set_attendance_note`."
                  },
                  "downpayment": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "downpayment_due": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "billing": {
                    "type": "object",
                    "description": "Used by: `billing`. Required for: `billing`."
                  },
                  "notify_alternate_email": {
                    "type": "string",
                    "description": "Used by: `alternate_email`."
                  },
                  "notify_alternate_email_only": {
                    "type": "boolean",
                    "description": "Used by: `alternate_email`."
                  },
                  "slots": {
                    "type": "integer",
                    "description": "Used by: `slots_notify`."
                  },
                  "notify": {
                    "type": "integer",
                    "description": "Used by: `slots_notify`."
                  },
                  "business_order": {
                    "type": "boolean",
                    "description": "Used by: `slots_notify`."
                  },
                  "notify_about_upcoming_events": {
                    "type": "integer",
                    "description": "Used by: `slots_notify`."
                  },
                  "actions": {
                    "type": "array",
                    "description": "Used by: `actions (batch)`. Required for: `actions (batch)`."
                  },
                  "cancellation_reason": {
                    "type": "string",
                    "enum": [
                      "not_paid_default",
                      "dissatisfied_default",
                      "schedule_or_logistics_default",
                      "personal_default",
                      "price_default",
                      "other_default",
                      "admin_correction_default",
                      "automation_unpaid",
                      "network_transfer",
                      "additional_session_unpaid"
                    ],
                    "description": "Used with Set_Attendance Used by: `actions (batch)`, `set_attendance`, `change_status`, `preflight_check`."
                  },
                  "cancellation_reason_id": {
                    "type": "integer",
                    "description": "Used by: `actions (batch)`, `change_status`, `preflight_check`."
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "set_attendance",
                      "set_attendances",
                      "set_attendance_note",
                      "reenroll_to_event",
                      "set_replacement",
                      "book_additional_session",
                      "reschedule_additional_session",
                      "cancel_additional_session",
                      "change_user_id",
                      "change_customer",
                      "change_status",
                      "resolve_trial",
                      "revoke_scheduled_status_change",
                      "reset_nudge_state",
                      "delete_attendance",
                      "set_waitlist",
                      "cancel_waitlist",
                      "cancel_open_waitlist",
                      "register_to_segment",
                      "unregister_from_segment",
                      "actions (batch)"
                    ],
                    "description": "Used by: `set_attendance`, `set_attendances`, `set_attendance_note`, `reenroll_to_event`, `set_replacement`, `book_additional_session`, `reschedule_additional_session`, `cancel_additional_session`, `change_user_id`, `change_customer`, `change_status`, `resolve_trial`, `revoke_scheduled_status_change`, `reset_nudge_state`, `delete_attendance`, `set_waitlist`, `cancel_waitlist`, `cancel_open_waitlist`, `register_to_segment`, `unregister_from_segment`, `preflight_check`. Required for: `set_attendance`, `set_attendances`, `set_attendance_note`, `reenroll_to_event`, `set_replacement`, `book_additional_session`, `reschedule_additional_session`, `cancel_additional_session`, `change_user_id`, `change_customer`, `change_status`, `resolve_trial`, `revoke_scheduled_status_change`, `reset_nudge_state`, `delete_attendance`, `set_waitlist`, `cancel_waitlist`, `cancel_open_waitlist`, `register_to_segment`, `unregister_from_segment`, `preflight_check`."
                  },
                  "event_id": {
                    "type": "integer",
                    "description": "Used with Set_Attendance Used by: `set_attendance`, `set_attendance_note`, `reenroll_to_event`, `set_replacement`, `book_additional_session`, `reschedule_additional_session`, `delete_attendance`, `set_waitlist`, `cancel_waitlist`, `cancel_open_waitlist`. Required for: `set_attendance_note`, `reenroll_to_event`, `set_replacement`, `book_additional_session`, `reschedule_additional_session`, `delete_attendance`, `set_waitlist`, `cancel_waitlist`, `cancel_open_waitlist`."
                  },
                  "attendance": {
                    "type": "string",
                    "enum": [
                      "attended",
                      "going",
                      "ignore",
                      "deleted",
                      "canceled",
                      "canceled_late",
                      "hold",
                      "noshow",
                      "waitlist"
                    ],
                    "description": "Used with Set_Attendance\n* attended - Attended the event\n* going - Planning to attend the meeting.\n* ignore - Hide this attendance record from attendance overview. Zooza will set attendance as ignored when moving to a schedule that already started for events in the past\n* deleted - Deleted attendance record. Zooza will set this automatically for example when cancelling replacement event\n* canceled - Event canceled\n* canceled_late - If canceled after cancellation limit (not used)\n* hold - used as a waitlist for single events (not used)\n* noshow - Did not attend\n* waitlist - Replacement waitlist\n Used by: `set_attendance`."
                  },
                  "consent": {
                    "type": "string",
                    "description": "Used with Set_Attendance (not required) Used by: `set_attendance`."
                  },
                  "other_company": {
                    "type": "boolean",
                    "description": "Used with Set_Attendance Used by: `set_attendance`."
                  },
                  "use_voucher": {
                    "type": "boolean",
                    "description": "Used with Set_Attendance Used by: `set_attendance`."
                  },
                  "replacement_pickup_preference": {
                    "type": "string",
                    "enum": [
                      "asap",
                      "no_preference",
                      "custom"
                    ],
                    "description": "Used by: `set_attendance`."
                  },
                  "replacement_pickup_note": {
                    "type": "string",
                    "description": "Used by: `set_attendance`."
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "Used by: `set_attendance`, `change_user_id`. Required for: `change_user_id`."
                  },
                  "bookings": {
                    "type": "array",
                    "description": "Used by: `set_attendances`. Required for: `set_attendances`."
                  },
                  "credit_id": {
                    "type": "integer",
                    "description": "Used by: `set_replacement`, `book_additional_session`, `reschedule_additional_session`, `cancel_additional_session`, `set_waitlist`, `cancel_waitlist`. Required for: `set_replacement`, `reschedule_additional_session`, `cancel_additional_session`, `set_waitlist`, `cancel_waitlist`."
                  },
                  "override_replacement_rules": {
                    "type": "boolean",
                    "description": "Used by: `set_replacement`."
                  },
                  "money_back": {
                    "type": "string",
                    "enum": [
                      "discount",
                      "refund"
                    ],
                    "description": "Used by: `cancel_additional_session`."
                  },
                  "person_id": {
                    "type": "integer",
                    "description": "Used by: `change_customer`. Required for: `change_customer`."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pre_insert",
                      "pre_registered",
                      "registered",
                      "trial_not_started",
                      "pre_trial_not_started",
                      "trial_started",
                      "pre_trial_started",
                      "trial_ended",
                      "trial_won",
                      "trial_lost",
                      "waitlist",
                      "pre_waitlist",
                      "pre_late",
                      "late",
                      "canceled",
                      "deleted",
                      "pre_guest",
                      "guest",
                      "unknown"
                    ],
                    "description": "Used by: `change_status`, `preflight_check`. Required for: `change_status`, `preflight_check`."
                  },
                  "convert_replacements_to_free_event": {
                    "type": "integer",
                    "description": "Used by: `change_status`, `preflight_check`."
                  },
                  "schedule_at": {
                    "type": "string",
                    "description": "Used by: `change_status`."
                  },
                  "linking": {
                    "type": "object",
                    "description": "Used by: `change_status`, `preflight_check`."
                  },
                  "email": {
                    "type": "object",
                    "description": "Used by: `change_status`."
                  },
                  "send_confirmation": {
                    "description": "Used by: `change_status`."
                  },
                  "course_id": {
                    "type": "integer",
                    "description": "Used by: `resolve_trial`."
                  },
                  "schedule_id": {
                    "type": "integer",
                    "description": "Used by: `resolve_trial`."
                  },
                  "segment_id": {
                    "type": "integer",
                    "description": "Used by: `register_to_segment`, `unregister_from_segment`. Required for: `register_to_segment`, `unregister_from_segment`."
                  }
                },
                "example": {
                  "action": "set_attendance",
                  "attendance": "attended",
                  "user_id": 59414,
                  "event_id": 64995
                },
                "description": "The body is read in this order and the first match handles the request: `?action=preflight_check`, `billing`, `notify_alternate_email(_only)`, `?confirm_registration`, `slots` / `business_order` / `notify` / `notify_about_upcoming_events`, body `action`, body `actions[]` (batch), `?confirm_late`, otherwise a plain update. Modes: `default`, `billing`, `alternate_email`, `slots_notify`, `actions (batch)`, `set_attendance`, `set_attendances`, `set_attendance_note`, `reenroll_to_event`, `set_replacement`, `book_additional_session`, `reschedule_additional_session`, `cancel_additional_session`, `change_user_id`, `change_customer`, `change_status`, `resolve_trial`, `revoke_scheduled_status_change`, `reset_nudge_state`, `delete_attendance`, `set_waitlist`, `cancel_waitlist`, `cancel_open_waitlist`, `register_to_segment`, `unregister_from_segment`, `preflight_check`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Depending on action it may return various responses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "manage_attendance",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/courses": {
      "get": {
        "operationId": "get_courses",
        "tags": [
          "Programmes"
        ],
        "summary": "List programmes",
        "description": "Returns the company's programmes as a plain array, sorted by name, with their classes (`schedules`) and labels. Archived programmes are included; deleted ones are not.",
        "responses": {
          "200": {
            "description": "Programmes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Resource_Course"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      },
      "post": {
        "operationId": "post_courses",
        "tags": [
          "Programmes"
        ],
        "summary": "Create a programme",
        "description": "Creates a programme. Required: `name`, `public`, `online_registration`, `registration_type`, `course_type`. Payment settings not sent are copied from the company's defaults. Optional `schedules` and `payment_schedules` create classes (without sessions) and payment plans in the same call.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "Used by: `bulk`. Required for: `bulk`."
                  },
                  "name": {
                    "type": "string",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "public": {
                    "type": "boolean",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "online_registration": {
                    "type": "boolean",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "registration_type": {
                    "type": "string",
                    "enum": [
                      "full2",
                      "open",
                      "single"
                    ],
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "course_type": {
                    "type": "string",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "color": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "unit_price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "price_type": {
                    "type": "string",
                    "enum": [
                      "course_fee",
                      "membership"
                    ],
                    "description": "Used by: `default`."
                  },
                  "money_collection": {
                    "type": "string",
                    "enum": [
                      "one_off",
                      "installments"
                    ],
                    "description": "Used by: `default`."
                  },
                  "for_children": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "registration_fee": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "target_audience": {
                    "type": "string",
                    "enum": [
                      "groups",
                      "individuals"
                    ],
                    "description": "Used by: `default`."
                  },
                  "payment_schedules": {
                    "type": "array",
                    "description": "Used by: `default`."
                  },
                  "schedules": {
                    "type": "array",
                    "description": "Used by: `default`."
                  }
                },
                "description": "Modes: `bulk`, `default`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created programme.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resource_Course"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "add_course",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/courses/{ID}": {
      "get": {
        "operationId": "get_courses_id",
        "tags": [
          "Programmes"
        ],
        "summary": "Get a programme",
        "description": "Returns one programme of the company with its extra fields and feedback questions. Classes and sessions are not included.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "responses": {
          "200": {
            "description": "The programme.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resource_Course"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_course",
        "x-zooza-cost": 1,
        "x-zooza-groups": [
          "core_read"
        ]
      },
      "put": {
        "operationId": "put_courses_id",
        "tags": [
          "Programmes"
        ],
        "summary": "Update a programme",
        "description": "Changes a programme of the company. A deleted programme returns `resource_not_found`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billing": {
                    "type": "object",
                    "description": "Used by: `billing`. Required for: `billing`."
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "clone_settings"
                    ],
                    "description": "Used by: `clone_settings`. Required for: `clone_settings`."
                  },
                  "settings_group": {
                    "type": "string",
                    "enum": [
                      "extra_fields"
                    ],
                    "description": "Used by: `clone_settings`. Required for: `clone_settings`."
                  },
                  "course_ids": {
                    "type": "array",
                    "description": "Used by: `clone_settings`. Required for: `clone_settings`."
                  },
                  "registration_type": {
                    "type": "string",
                    "enum": [
                      "full2",
                      "open",
                      "single"
                    ],
                    "description": "Used by: `default`."
                  },
                  "course_type": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "description": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "url": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "name": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "custom_label_note": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "custom_label_first_name": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "custom_label_last_name": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "custom_label_phone": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "custom_label_email": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "collect_feedback_start": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Used by: `default`."
                  },
                  "waitlist": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "late_registrations": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "aliquot_settings": {
                    "type": "string",
                    "enum": [
                      "automatic",
                      "automatic_days",
                      "no_value",
                      "full_price"
                    ],
                    "description": "Used by: `default`."
                  },
                  "online_card_provider": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "online_transfer_provider": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "direct_debit_provider": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "constant_symbol": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "specific_symbol": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "online_registration": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "priority": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "auto_waitlist_notification": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "money_collection": {
                    "type": "string",
                    "enum": [
                      "one_off",
                      "installments"
                    ],
                    "description": "Used by: `default`."
                  },
                  "hide_if_full": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "use_extra_fields": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "feedback_during_course": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "feedback_after_course": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "reviews_after_registration": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "reviews_after_first_session": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "reviews_after_class_ended": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "collect_reviews_start": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "cash": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "online_card": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "online_transfer": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "force_full_first_installment": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "direct_debit": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "direct_debit_mandate_id_format": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "fees_included_in_price": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "public": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "archive": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "code": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "for_children": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "allow_guest_registrations": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "require_valid_entrance_voucher": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "track_attendance": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "payments_managed_by_buyer": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "allow_reschedule_of_replacements": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "flexible_replacements_limit": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "replacements_limit_per_events": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "allow_replacements_from_other_companies": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "payment_schedule_is_mandatory": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "allow_replacements": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "allow_replacements_waitlist": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "allow_custom_replacements": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "custom_email": {
                    "type": "integer",
                    "description": "Custom registration confirmation email ID Used by: `default`."
                  },
                  "custom_email_lead": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "custom_email_event_notification": {
                    "type": "integer",
                    "description": "Custom event notification email ID Used by: `default`."
                  },
                  "allow_replacement_cancellation": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "admin_managed_replacements": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "allow_using_replacement_credits_as_discount": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "auto_approve_custom_replacements": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "upcoming_events_notification": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "event_notification": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "replacements_settings": {
                    "type": "object",
                    "description": "Which sessions can be used as make-ups. Example: `{\"type\": \"selection\", \"courses\": \"registration_course\", \"billing_periods\": [310, 301], \"places\": [{\"place_id\": 4, \"room_id\": 0}]}`.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "example": "selection"
                      },
                      "courses": {
                        "description": "Which programmes, e.g. `registration_course` (the registration's own programme).",
                        "example": "registration_course"
                      },
                      "billing_periods": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        },
                        "description": "Billing period ids."
                      },
                      "places": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "place_id": {
                              "type": "integer"
                            },
                            "room_id": {
                              "type": "integer",
                              "description": "`0` = any room."
                            }
                          }
                        }
                      }
                    }
                  },
                  "replacements_settings_other_companies": {
                    "type": "object",
                    "description": "Used by: `default`."
                  },
                  "allow_additional_sessions": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "additional_sessions_settings": {
                    "type": "object",
                    "description": "Used by: `default`."
                  },
                  "additional_session_pricing_mode": {
                    "type": "string",
                    "enum": [
                      "free",
                      "regular_unit_price",
                      "custom"
                    ],
                    "description": "Used by: `default`."
                  },
                  "additional_session_unit_price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "additional_sessions_limit": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "additional_session_payment_mode": {
                    "type": "string",
                    "enum": [
                      "open",
                      "enforced"
                    ],
                    "description": "Used by: `default`."
                  },
                  "additional_session_payment_deadline_days": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "payment_mode": {
                    "type": "string",
                    "enum": [
                      "pass_first",
                      "passes_only",
                      "payment_only",
                      "both"
                    ],
                    "description": "Used by: `default`."
                  },
                  "allow_cancellation_discount": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "target_audience": {
                    "type": "string",
                    "enum": [
                      "groups",
                      "individuals"
                    ],
                    "description": "Used by: `default`."
                  },
                  "hide_before": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "replacements_limit": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "billable_events": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "unit_price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "unit_price_trial": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "registration_fee": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "price_type": {
                    "type": "string",
                    "enum": [
                      "course_fee",
                      "membership"
                    ],
                    "description": "Used by: `default`."
                  },
                  "iban": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "iban_account_holder": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "color": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "swift": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "default_email_signature": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "registration_slots_max": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "registration_slots_min": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "replacement_time_limit": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "replacement_time_limit_type": {
                    "type": "string",
                    "enum": [
                      "before",
                      "after"
                    ],
                    "description": "Used by: `default`."
                  },
                  "get_basic_fields_from": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "get_extra_fields_from": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "trial_type": {
                    "type": "string",
                    "enum": [
                      "free_trial",
                      "paid_trial",
                      "lead_collection",
                      "none",
                      "free_time_trial",
                      "paid_time_trial"
                    ],
                    "description": "Used by: `default`."
                  },
                  "reserve_seat_for_trial_attendees": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "trial_events_limit_type": {
                    "type": "string",
                    "enum": [
                      "none",
                      "date",
                      "count"
                    ],
                    "description": "Used by: `default`."
                  },
                  "trial_events_capacity": {
                    "type": "string",
                    "enum": [
                      "all",
                      "extra_capacity"
                    ],
                    "description": "Used by: `default`."
                  },
                  "trial_events_limit": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "trial_length": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "trial_length_type": {
                    "type": "string",
                    "enum": [
                      "days",
                      "events"
                    ],
                    "description": "Used by: `default`."
                  },
                  "registration_display_mode": {
                    "type": "string",
                    "enum": [
                      "default",
                      "full_course_only",
                      "trials_only",
                      "segments_only",
                      "trials_and_segments_only"
                    ],
                    "description": "Used by: `default`."
                  },
                  "automatically_add_schedules_to_trial": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "automatically_add_schedules_to_retention": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "downpayment": {
                    "type": "string",
                    "enum": [
                      "none",
                      "relative",
                      "absolute"
                    ],
                    "description": "Used by: `default`."
                  },
                  "downpayment_due_type": {
                    "type": "string",
                    "enum": [
                      "before_course",
                      "after_registration"
                    ],
                    "description": "Used by: `default`."
                  },
                  "downpayment_due_days": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "downpayment_value": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "downpayment_cap": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "retention_settings": {
                    "type": "object",
                    "description": "Used by: `default`."
                  },
                  "priority_registration_audience": {
                    "type": "object",
                    "description": "Used by: `default`."
                  },
                  "retention_type": {
                    "type": "string",
                    "enum": [
                      "none",
                      "suggest_schedules",
                      "duplicate_schedule"
                    ],
                    "description": "Used by: `default`."
                  },
                  "retention_message": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "retention_days": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "retention_notify_days_before": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "delayed_start_max_days": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "priority_registration": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "priority_registration_allow_multiple": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "widgets_published": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "allow_rescheduling_of_events": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "auto_approve_rescheduled_events": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "limit_reschedule_to_once": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "priority_registration_offset": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "priority_registration_public_offset": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "schedule_start_date_format": {
                    "type": "object",
                    "description": "Used by: `default`."
                  },
                  "schedule_end_date_format": {
                    "type": "object",
                    "description": "Used by: `default`."
                  },
                  "onboarding": {
                    "type": "object",
                    "description": "Used by: `default`."
                  },
                  "extra_fields": {
                    "type": "array",
                    "description": "Used by: `default`."
                  },
                  "skip_auto_attach_templates": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  }
                },
                "example": {
                  "allow_replacements_from_other_companies": false,
                  "replacements_settings": {
                    "type": "selection",
                    "courses": "registration_course",
                    "billing_periods": [
                      310,
                      301
                    ],
                    "places": [
                      {
                        "place_id": 4,
                        "room_id": 0
                      },
                      {
                        "place_id": 8,
                        "room_id": 0
                      }
                    ]
                  }
                },
                "description": "Modes: `billing`, `clone_settings`, `default`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated programme.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resource_Course"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_course",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/schedules": {
      "get": {
        "operationId": "get_schedules",
        "tags": [
          "Classes"
        ],
        "summary": "List classes",
        "description": "Searches the company's classes. Default: `active` and `inactive` classes, newest first, 50 per page, classes of archived programmes left out. Instructors see only the classes they teach.",
        "parameters": [
          {
            "name": "trainer_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Classes taught by these users: as the main instructor, as an additional class instructor, or on any of the class's sessions (including as the original instructor of a substituted session). Pipe-separate several."
          },
          {
            "name": "billing_period_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Classes in these billing periods (term blocks). Pipe-separate several."
          },
          {
            "name": "course_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Classes of these programmes (course ids). Pipe-separate several."
          },
          {
            "name": "place_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Classes held at these venues (place ids). Pipe-separate several."
          },
          {
            "name": "room_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Classes held in these rooms (room ids). Pipe-separate several."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Zero-based page number. Default `0`."
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            },
            "description": "Classes per page. Default `50`."
          },
          {
            "$ref": "#/components/parameters/Day"
          },
          {
            "$ref": "#/components/parameters/IDs"
          },
          {
            "$ref": "#/components/parameters/Name"
          },
          {
            "$ref": "#/components/parameters/Registration_Type"
          },
          {
            "$ref": "#/components/parameters/Labels"
          },
          {
            "$ref": "#/components/parameters/Schedule_Status"
          },
          {
            "$ref": "#/components/parameters/Sort_By_Schedules"
          },
          {
            "$ref": "#/components/parameters/Start"
          },
          {
            "$ref": "#/components/parameters/End"
          },
          {
            "$ref": "#/components/parameters/Online_Registration"
          },
          {
            "$ref": "#/components/parameters/Lead_Only"
          },
          {
            "$ref": "#/components/parameters/In_Progress"
          },
          {
            "$ref": "#/components/parameters/Ended"
          },
          {
            "$ref": "#/components/parameters/Not_Started"
          },
          {
            "$ref": "#/components/parameters/Billing_Period_Active"
          },
          {
            "$ref": "#/components/parameters/Under_Billable"
          },
          {
            "$ref": "#/components/parameters/Over_Billable"
          },
          {
            "$ref": "#/components/parameters/Load_Labels"
          },
          {
            "$ref": "#/components/parameters/Load_Trainers"
          }
        ],
        "responses": {
          "200": {
            "description": "Classes, paginated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "page_size": {
                      "type": "integer"
                    },
                    "settings": {
                      "type": "object"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Resource_Schedule"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "*",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      },
      "post": {
        "operationId": "post_schedules",
        "tags": [
          "Classes"
        ],
        "summary": "Create a class",
        "description": "Creates a class in a programme. Required: `course_id`, `name`, `duration`, `place_id`, `room_id`, `trainer_id`, `capacity`, `all_day`, `online_registration`. No sessions are created: add them with `POST /events`. Without `billing_period_id`, the class gets the company's most recently created billing period.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "add_video": {
                    "type": "integer",
                    "description": "Used by: `video (intercepts create)`."
                  },
                  "video_ids": {
                    "type": "array",
                    "description": "Used by: `video (intercepts create)`."
                  },
                  "update_video": {
                    "type": "integer",
                    "description": "Used by: `video (intercepts create)`."
                  },
                  "visibility": {
                    "type": "string",
                    "description": "Used by: `video (intercepts create)`."
                  },
                  "delete_video": {
                    "type": "integer",
                    "description": "Used by: `video (intercepts create)`."
                  },
                  "course_id": {
                    "type": "integer",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "trainer_id": {
                    "type": "integer",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "room_id": {
                    "type": "integer",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "place_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "capacity": {
                    "type": "integer",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "name": {
                    "type": "string",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "all_day": {
                    "type": "boolean",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "online_registration": {
                    "type": "boolean",
                    "description": "Used by: `default`. Required for: `default`."
                  },
                  "duration": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "time": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "public": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "registrations_cap": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "extra_capacity": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "schedule_type": {
                    "type": "string",
                    "enum": [
                      "fixed_period",
                      "rolling",
                      "lead_collection"
                    ],
                    "description": "Used by: `default`."
                  },
                  "type": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "billable_events": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "unit_price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "registration_fee": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "status": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "trainer_rate_type_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "billing_period_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "payment_schedules": {
                    "type": "array",
                    "description": "Used by: `default`."
                  }
                },
                "description": "Modes: `video (intercepts create)`, `default`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created class.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_course",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/schedules/{ID}": {
      "put": {
        "operationId": "put_schedules_id",
        "tags": [
          "Classes"
        ],
        "summary": "Update a class",
        "description": "Changes a class of the company. Changing `course_id` also moves its sessions and registrations. Changing the instructor, pay rate, duration or venue changes the sessions only when the matching `update_mode_*` is `upcoming` or `all`; otherwise only the class changes. `online_registration`, `all_day`, `in_trial` and `in_retention` are switched on only by a JSON `true`; any other value switches them off.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "billing": {
                    "type": "object",
                    "description": "Used by: `billing`. Required for: `billing`."
                  },
                  "price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "unit_price": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "registration_fee": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "online_meeting_id": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "online_meeting_provider": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "segment_discount_multiplier": {
                    "type": "number",
                    "description": "Used by: `default`."
                  },
                  "apply_segment_discount": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "start": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "end": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "segments_config": {
                    "type": "object",
                    "description": "Used by: `default`."
                  },
                  "custom_start": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "custom_end": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "lead_collection_money_collection_enabled": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "schedule_type": {
                    "type": "string",
                    "enum": [
                      "fixed_period",
                      "rolling",
                      "lead_collection"
                    ],
                    "description": "Used by: `default`."
                  },
                  "capacity": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "registrations_cap": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "billable_events": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "inactive",
                      "active",
                      "archive"
                    ],
                    "description": "Used by: `default`."
                  },
                  "notify_trainer_on_cancellation": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "week"
                    ],
                    "description": "Used by: `default`."
                  },
                  "online_registration": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "all_day": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "in_trial": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "in_retention": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "priority_registration": {
                    "type": "boolean",
                    "description": "Used by: `default`."
                  },
                  "name": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "note": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "description": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "extra_capacity": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "extra_capacity_usage": {
                    "type": "string",
                    "description": "Used by: `default`."
                  },
                  "billing_period_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "course_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "trainer_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "update_mode_trainer": {
                    "type": "string",
                    "enum": [
                      "upcoming",
                      "all"
                    ],
                    "description": "If sent along with trainer_id will update either all or just upcoming events Used by: `default`."
                  },
                  "trainer_rate_type_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "update_mode_trainer_rate_type": {
                    "type": "string",
                    "enum": [
                      "upcoming",
                      "all"
                    ],
                    "description": "If sent along with trainer_rate_type_id will update either all or just upcoming events Used by: `default`."
                  },
                  "duration": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "update_mode_duration": {
                    "type": "string",
                    "enum": [
                      "upcoming",
                      "all"
                    ],
                    "description": "If sent along with duration will update either all or just upcoming events Used by: `default`."
                  },
                  "place_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "room_id": {
                    "type": "integer",
                    "description": "Used by: `default`."
                  },
                  "update_mode_place": {
                    "type": "string",
                    "enum": [
                      "upcoming",
                      "all"
                    ],
                    "description": "If sent along with place_id and room_id will update either all or just upcoming events Used by: `default`."
                  }
                },
                "description": "Modes: `billing`, `default`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated class.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resource_Schedule"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_course",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/events": {
      "get": {
        "operationId": "get_events",
        "tags": [
          "Sessions"
        ],
        "summary": "List sessions",
        "description": "Searches the company's sessions (occurrences of a class). Send `filter=filter`: the other parameters apply only to that search. Deleted sessions and sessions of deleted programmes are never returned. Default order is by date, ascending, with no date window.\n\n**On /v3:** `filter=filter` is required, so a request without it is refused with a `422` instead\nof falling back to the legacy listing.\n",
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "description": "Must be the literal string `filter`. It selects the search the other parameters apply to; without it the endpoint falls back to a legacy listing that ignores them.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "filter"
              ]
            }
          },
          {
            "name": "schedule_id",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Sessions of this class (schedule id). One id: a pipe-separated list is ignored and no class filter is applied."
          },
          {
            "name": "billing_period_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Sessions of classes in these billing periods (term blocks). Pipe-separate several."
          },
          {
            "$ref": "#/components/parameters/BP"
          },
          {
            "name": "place_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Sessions at these venues (place ids). Pipe-separate several."
          },
          {
            "name": "room_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Sessions in these rooms (room ids). Pipe-separate several."
          },
          {
            "$ref": "#/components/parameters/PID"
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Zero-based page number. Default `0`."
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1000
            },
            "description": "Sessions per page. Default `1000`."
          },
          {
            "$ref": "#/components/parameters/From"
          },
          {
            "$ref": "#/components/parameters/To"
          },
          {
            "name": "trainer_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Sessions taught by these users: as the session's instructor or an additional session instructor, as the class's main or additional instructor, or as the original instructor of a substituted session. Pipe-separate several."
          },
          {
            "name": "course_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            },
            "description": "Sessions of these programmes (course ids). Pipe-separate several."
          },
          {
            "$ref": "#/components/parameters/Past"
          },
          {
            "$ref": "#/components/parameters/Upcoming_Events"
          },
          {
            "$ref": "#/components/parameters/Schedule_Active"
          },
          {
            "$ref": "#/components/parameters/Events_Sort_By"
          }
        ],
        "responses": {
          "200": {
            "description": "Sessions, paginated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total matching items across all pages."
                    },
                    "page": {
                      "type": "integer",
                      "nullable": true
                    },
                    "page_size": {
                      "type": "integer",
                      "nullable": true
                    },
                    "settings": {
                      "description": "The filters the collection applied (object, or `[]` when none)."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      },
      "post": {
        "operationId": "post_events",
        "tags": [
          "Sessions"
        ],
        "summary": "Create sessions",
        "description": "Creates sessions from `events`. Each item needs `date_string`, `time_string`, `course_id`, `schedule_id`, `trainer_id` and `place_id`; items missing any of them are skipped without an error. New sessions are `scheduled`, and no client is notified.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "events": {
                    "type": "array",
                    "description": "The sessions to create. The body must be an object with this `events` key; a bare array is ignored.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date_string": {
                          "type": "string",
                          "description": "Date, `YYYY-MM-DD`.",
                          "example": "YYYY-MM-DD"
                        },
                        "time_string": {
                          "type": "integer",
                          "description": "Start time as **minutes since midnight** (`540` = 09:00), not `HH:MM`."
                        },
                        "course_id": {
                          "type": "integer"
                        },
                        "schedule_id": {
                          "type": "integer"
                        },
                        "trainer_id": {
                          "type": "integer"
                        },
                        "place_id": {
                          "type": "integer"
                        },
                        "room_id": {
                          "type": "integer"
                        },
                        "trainer_rate_type_id": {
                          "type": "integer",
                          "description": "If not set, schedule_id trainer_rate_type_id is used"
                        },
                        "duration": {
                          "type": "integer"
                        },
                        "billable": {
                          "type": "boolean"
                        },
                        "segment": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "required": [
                  "events"
                ],
                "example": {
                  "events": [
                    {
                      "trainer_id": 1,
                      "place_id": 16,
                      "room_id": 1,
                      "schedule_id": 1088856,
                      "course_id": 39454,
                      "trainer_rate_type_id": 0,
                      "date_string": "2026-11-17",
                      "time_string": 570
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created sessions, paginated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total matching items across all pages."
                    },
                    "page": {
                      "type": "integer",
                      "nullable": true
                    },
                    "page_size": {
                      "type": "integer",
                      "nullable": true
                    },
                    "settings": {
                      "description": "The filters the collection applied (object, or `[]` when none)."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_course",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      },
      "put": {
        "operationId": "put_events",
        "tags": [
          "Sessions"
        ],
        "summary": "Update several sessions",
        "description": "Each item in `events` identifies a session by `id` and carries the fields to change, as in `PUT /events/{ID}`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "events"
                ],
                "properties": {
                  "events": {
                    "type": "array",
                    "description": "The sessions to update.",
                    "items": {
                      "type": "object",
                      "required": [
                        "id"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Session id."
                        },
                        "notify": {
                          "type": "boolean",
                          "description": "Notify attendees about changes in the event"
                        },
                        "event_name": {
                          "type": "string"
                        },
                        "duration": {
                          "type": "integer"
                        },
                        "billable": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "scheduled",
                            "unplanned"
                          ]
                        },
                        "cancellation_reasoning": {
                          "type": "string"
                        },
                        "cancellation_reasoning_public": {
                          "type": "string"
                        },
                        "replacement_date": {
                          "type": "string"
                        },
                        "replacement_place_id": {
                          "type": "integer"
                        },
                        "replacement_room_id": {
                          "type": "integer"
                        },
                        "schedule_id": {
                          "type": "integer"
                        },
                        "segment": {
                          "type": "string"
                        },
                        "trainer_id": {
                          "type": "integer"
                        },
                        "room_id": {
                          "type": "integer"
                        },
                        "place_id": {
                          "type": "integer"
                        },
                        "trainer_rate_type_id": {
                          "type": "integer"
                        },
                        "trainer_payout_percentage": {
                          "type": "number"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "attendance": {
                          "type": "integer",
                          "enum": [
                            0,
                            1
                          ],
                          "description": "Not used.",
                          "deprecated": true
                        },
                        "video_expires_in": {
                          "type": "integer"
                        },
                        "video_expiry": {
                          "type": "string",
                          "enum": [
                            "event",
                            "registration"
                          ]
                        },
                        "additional_trainers": {
                          "type": "array"
                        },
                        "adjustment": {
                          "type": "string",
                          "enum": [
                            "credit",
                            "debit"
                          ]
                        },
                        "adjustment_amount": {
                          "type": "number"
                        },
                        "adjustment_reason_label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "events": [
                    {
                      "id": 62633,
                      "trainer_id": 11079
                    },
                    {
                      "id": 62634,
                      "trainer_id": 11079
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per session, in request order.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_course",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/events/{ID}": {
      "get": {
        "operationId": "get_events_id",
        "tags": [
          "Sessions"
        ],
        "summary": "Get a session",
        "description": "Returns one session of the company, including attendance figures, replacement and cancellation details. Unknown, deleted or other-company sessions return the error `event_not_found`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "responses": {
          "200": {
            "description": "The session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 1,
        "x-zooza-groups": [
          "core_read"
        ]
      },
      "put": {
        "operationId": "put_events_id",
        "tags": [
          "Sessions"
        ],
        "summary": "Update a session",
        "description": "Changes a session. Sending `summary`, `summary_public` or `summary_public_locked` writes only that field and returns `true`; any other body is a field update that returns the session. `cancellation_reasoning`, `cancellation_reasoning_public` and `replacement_date` take effect only together with `status`. `place_id` and `room_id` must be sent together. Clients are emailed only when `notify` is true **and** the status, public cancellation reason, replacement date, instructor, venue or date changed.\n\n**On /v3:** the body is checked against the fields of all modes together (the summary fields and\nthe field update). A body that passes here can still be refused by the Zooza API for the mode it\nselects.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "summary_public_locked": {
                    "type": "boolean",
                    "description": "Used by: `summary_public_locked`. Required for: `summary_public_locked`."
                  },
                  "summary": {
                    "type": "string",
                    "description": "Used by: `summary`. Required for: `summary`."
                  },
                  "summary_public": {
                    "type": "string",
                    "description": "Used by: `summary_public`. Required for: `summary_public`."
                  },
                  "notify": {
                    "type": "boolean",
                    "description": "Notify attendees about changes in the event Used by: `single_update`."
                  },
                  "event_name": {
                    "type": "string",
                    "description": "Used by: `single_update`."
                  },
                  "duration": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "billable": {
                    "type": "boolean",
                    "description": "Used by: `single_update`."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "scheduled",
                      "unplanned"
                    ],
                    "description": "Used by: `single_update`."
                  },
                  "cancellation_reasoning": {
                    "type": "string",
                    "description": "Used by: `single_update`."
                  },
                  "cancellation_reasoning_public": {
                    "type": "string",
                    "description": "Used by: `single_update`."
                  },
                  "replacement_date": {
                    "type": "string",
                    "description": "Used by: `single_update`."
                  },
                  "replacement_place_id": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "replacement_room_id": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "schedule_id": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "segment": {
                    "type": "string",
                    "description": "Used by: `single_update`."
                  },
                  "trainer_id": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "room_id": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "place_id": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "trainer_rate_type_id": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "trainer_payout_percentage": {
                    "type": "number",
                    "description": "Used by: `single_update`."
                  },
                  "date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Used by: `single_update`."
                  },
                  "attendance": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ],
                    "description": "Not used.",
                    "deprecated": true
                  },
                  "video_expires_in": {
                    "type": "integer",
                    "description": "Used by: `single_update`."
                  },
                  "video_expiry": {
                    "type": "string",
                    "enum": [
                      "event",
                      "registration"
                    ],
                    "description": "Used by: `single_update`."
                  },
                  "additional_trainers": {
                    "type": "array",
                    "description": "Used by: `single_update`."
                  },
                  "adjustment": {
                    "type": "string",
                    "enum": [
                      "credit",
                      "debit"
                    ],
                    "description": "Used by: `single_update`."
                  },
                  "adjustment_amount": {
                    "type": "number",
                    "description": "Used by: `single_update`."
                  },
                  "adjustment_reason_label": {
                    "type": "string",
                    "description": "Used by: `single_update`."
                  }
                },
                "example": {
                  "date": "2026-11-14 10:00:00",
                  "event_name": "Test",
                  "place_id": 16,
                  "room_id": 1,
                  "status": "scheduled",
                  "notify": false,
                  "duration": 0,
                  "billable": false
                },
                "description": "Modes: `summary_public_locked`, `summary`, `summary_public`, `single_update`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated session, or `true` for the summary fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_course",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/attendance": {
      "get": {
        "operationId": "get_attendance",
        "tags": [
          "Attendance"
        ],
        "summary": "Get a session's attendance register",
        "description": "Returns the attendance register of one session: one row per registration, oldest registration first. Rows marked ignored or deleted are left out. For sessions joined together, the register covers all of them.",
        "parameters": [
          {
            "in": "query",
            "name": "event_id",
            "required": true,
            "description": "The session (event id).",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Register rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Event_Attendance"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "manage_attendance",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/calendar": {
      "get": {
        "operationId": "get_calendar",
        "tags": [
          "Calendar"
        ],
        "summary": "Calendar of sessions",
        "description": "Sessions in a date range, for a calendar view. `date` takes precedence and is widened to its Monday-to-Sunday week; otherwise `start` and `end` are used exactly as sent (both are needed); with neither, the range is today. Only sessions of active classes in unarchived programmes are included, and cancelled sessions only when the company shows them. A rescheduled session also appears on its original date, marked `is_actual: false`. Instructor filters apply to owners, assistants and main instructors; other instructors always see only their own sessions.",
        "parameters": [
          {
            "in": "query",
            "name": "start",
            "description": "First day of the range (`YYYY-MM-DD`). Used only together with `end` and without `date`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "end",
            "description": "Last day of the range, inclusive (`YYYY-MM-DD`). Used only together with `start` and without `date`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "pid",
            "description": "Venue and room as `{place_id}_{room_id}`. Any other format is ignored.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+_[0-9]+$"
            }
          },
          {
            "in": "query",
            "name": "trainer_id",
            "description": "Sessions whose instructor or additional instructor is one of these users. Pipe-separate several.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "course_id",
            "description": "Sessions of these programmes (course ids). Pipe-separate several.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "description": "Substring match on the session, class, programme or venue name, or a registered client's name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "date",
            "description": "A day (`YYYY-MM-DD`); the range becomes its Monday-to-Sunday week. Takes precedence over `start` / `end`.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sessions in the range.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "settings": {
                      "type": "object",
                      "description": "The range actually used (`start`, `end`). Without `start`/`end`/`date` the range is today."
                    },
                    "info": {
                      "type": "array"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Calendar_Event"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/extra_fields": {
      "post": {
        "operationId": "post_extra_fields",
        "tags": [
          "Extra fields"
        ],
        "summary": "Set an extra field on a registration",
        "description": "Sets one extra field (`column`) of a registration to `value`. It does not define a new field: every registration has one set of extra fields, created on first write. `dob` is copied to the participant's date of birth and `full_name` to the participant's first and last name. For `address`, `value` may be an object.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "registration_id": {
                    "type": "integer"
                  },
                  "column": {
                    "type": "string",
                    "enum": [
                      "dob",
                      "full_name",
                      "address",
                      "identification_number",
                      "business_name",
                      "business_address",
                      "business_id",
                      "tax_id",
                      "vat",
                      "extra_field_1",
                      "extra_field_2",
                      "extra_field_3",
                      "extra_field_4",
                      "extra_field_5",
                      "extra_field_6",
                      "extra_field_7",
                      "extra_field_8",
                      "extra_field_9",
                      "extra_field_10",
                      "extra_field_11",
                      "extra_field_12",
                      "extra_field_13",
                      "extra_field_14",
                      "extra_field_15",
                      "citizenship"
                    ],
                    "description": "Name of extra field column\n"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "registration_id",
                  "column"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored value, as `{value}`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_registration",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/extra_fields/{ID}": {
      "put": {
        "operationId": "put_extra_fields_id",
        "tags": [
          "Extra fields"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "ID",
            "description": "Id of the registration's extra-fields record (`extra_fields.id`), not a registration id.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "summary": "Update an extra field",
        "description": "Same as `POST /extra_fields`, addressed by the id of the registration's extra-fields record (`id` in the registration's `extra_fields`), not by a registration id. An invalid or missing `column` returns `null` without an error.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "column": {
                    "type": "string",
                    "enum": [
                      "dob",
                      "full_name",
                      "address",
                      "identification_number",
                      "business_name",
                      "business_address",
                      "business_id",
                      "tax_id",
                      "vat",
                      "extra_field_1",
                      "extra_field_2",
                      "extra_field_3",
                      "extra_field_4",
                      "extra_field_5",
                      "extra_field_6",
                      "extra_field_7",
                      "extra_field_8",
                      "extra_field_9",
                      "extra_field_10",
                      "extra_field_11",
                      "extra_field_12",
                      "extra_field_13",
                      "extra_field_14",
                      "extra_field_15",
                      "citizenship"
                    ],
                    "description": "Name of extra field column\n"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "column"
                ],
                "example": {
                  "column": "address",
                  "value": "Main Street 1, Bratislava"
                },
                "description": "The path id is the **extra fields row id** (the `id` of a registration's `extra_fields` object), not the registration id."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored value, as `{value}`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_registration",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/customer_invoices": {
      "get": {
        "operationId": "get_customer_invoices",
        "tags": [
          "Invoices"
        ],
        "summary": "List customer invoices",
        "description": "The company's customer invoices, newest first, paginated. Instructors need the company to allow them financial data.",
        "parameters": [
          {
            "in": "query",
            "name": "order_id",
            "description": "Invoices of this registration (registration id, for `order_type=course`).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "description": "Invoices per page. Default `50`.",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "in": "query",
            "name": "page",
            "description": "Zero-based page number. Default `0`.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "start",
            "description": "Invoices created on or after this date (`YYYY-MM-DD`).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "end",
            "description": "Invoices created on or before this date (`YYYY-MM-DD`, inclusive).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "in": "query",
            "name": "order_type",
            "description": "`course` for registration invoices. `product` exists only on older invoices.",
            "schema": {
              "type": "string",
              "enum": [
                "course",
                "product"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoices, paginated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total matching items across all pages."
                    },
                    "page": {
                      "type": "integer",
                      "nullable": true
                    },
                    "page_size": {
                      "type": "integer",
                      "nullable": true
                    },
                    "settings": {
                      "description": "The filters the collection applied (object, or `[]` when none)."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Resource_Customer_Invoice"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      },
      "post": {
        "operationId": "post_customer_invoices",
        "tags": [
          "Invoices"
        ],
        "summary": "Create a customer invoice",
        "description": "Issues an invoice for a registration (`order_type: course`, `order_id` = registration id) through the company's invoicing provider. Other order types are not invoiced. The invoice is queued and created shortly after; if one is already pending for the registration, that one is returned. Once its PDF exists the client is emailed it unless `notify_customer` is false.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_type": {
                    "type": "string",
                    "enum": [
                      "course"
                    ],
                    "description": "Only `course` (registration invoices) creates an invoice. Used by: `create_invoice`."
                  },
                  "order_id": {
                    "type": "integer",
                    "description": "Used by: `create_invoice`. Required for: `create_invoice`."
                  },
                  "options": {
                    "type": "object",
                    "description": "Object. Accepted keys: `payment_method` (`hotovost`, `prevod`, `karta`, `eprovider`), `date` and `delivery_date` (`YYYY-MM-DD`), `text`. Used by: `create_invoice`."
                  },
                  "start": {
                    "type": "string",
                    "description": "Used by: `create_invoice`."
                  },
                  "end": {
                    "type": "string",
                    "description": "Used by: `create_invoice`."
                  },
                  "buyer_data_id": {
                    "type": "integer",
                    "description": "Used by: `create_invoice`."
                  },
                  "notify_customer": {
                    "type": "boolean",
                    "description": "Used by: `create_invoice`."
                  },
                  "skip_queue": {
                    "type": "boolean",
                    "description": "Used by: `create_invoice`."
                  }
                },
                "description": "Modes: `create_invoice`, `refresh_pdf`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The invoice (pending until the provider has created it).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resource_Customer_Invoice"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "edit_course",
        "x-zooza-cost": 5,
        "x-zooza-groups": [
          "core_write"
        ]
      }
    },
    "/customer_invoices/{ID}": {
      "get": {
        "operationId": "get_customer_invoices_id",
        "tags": [
          "Invoices"
        ],
        "summary": "Get a customer invoice",
        "description": "One invoice of the company. Unknown or other-company ids return `resource_not_found`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "responses": {
          "200": {
            "description": "The invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resource_Customer_Invoice"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 1,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/customer_invoices/{ID}/download": {
      "get": {
        "operationId": "get_customer_invoices_id_download",
        "tags": [
          "Invoices"
        ],
        "summary": "Get a download link for an invoice",
        "description": "Returns `{url}`, a short-lived link to the invoice PDF. An invoice without a stored PDF returns an error.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "responses": {
          "200": {
            "description": "`{url}`; `url` is `null` when the link could not be created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "description": "Download URL, or `false` when there is no stored document to download.",
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 10,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/customer_invoices/download": {
      "get": {
        "operationId": "get_customer_invoices_download",
        "tags": [
          "Invoices"
        ],
        "summary": "Get a download link for several invoices",
        "description": "Returns `{url}`, a link to a ZIP of the invoices' PDFs. Invoices without a stored PDF or from another company are skipped.",
        "parameters": [
          {
            "in": "query",
            "name": "invoices",
            "description": "Invoice ids, pipe-separated (`12|13|14`).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+(\\|[0-9]+)*$"
            }
          },
          {
            "in": "query",
            "name": "name",
            "description": "Archive name without extension. The company's name is always prefixed; default `invoices`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`{url}`; `url` is `false` when the archive could not be created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "description": "Download URL, or `false` when there is no stored document to download.",
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "manage_places",
        "x-zooza-cost": 10,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/companies/{ID}/places": {
      "get": {
        "operationId": "get_companies_id_places",
        "tags": [
          "Company"
        ],
        "summary": "List venues",
        "description": "The company's active venues (places), each with its active rooms, paginated (500 per page by default). The company is the one the request is made for (`X-ZOOZA-COMPANY`); the `{ID}` in the path is not read.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Venues, paginated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total matching items across all pages."
                    },
                    "page": {
                      "type": "integer",
                      "nullable": true
                    },
                    "page_size": {
                      "type": "integer",
                      "nullable": true
                    },
                    "settings": {
                      "description": "The filters the collection applied (object, or `[]` when none)."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Resource_Place"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_courses",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/users": {
      "get": {
        "operationId": "get_users",
        "tags": [
          "Users"
        ],
        "summary": "List users",
        "description": "Everyone with a role in the company, staff and clients alike, sorted by last name, paginated (50 per page). Instructors asking for clients get only their own clients; clients get nothing.",
        "responses": {
          "200": {
            "description": "Users, paginated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total matching items across all pages."
                    },
                    "page": {
                      "type": "integer",
                      "nullable": true
                    },
                    "page_size": {
                      "type": "integer",
                      "nullable": true
                    },
                    "settings": {
                      "description": "The filters the collection applied (object, or `[]` when none)."
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Resource_User"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "get_users",
        "x-zooza-cost": 2,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/agreements/{ID}": {
      "get": {
        "operationId": "get_agreements_id",
        "tags": [
          "Agreements"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ID"
          }
        ],
        "summary": "Get an agreement version",
        "description": "Returns one version of an agreement (terms, consent text) by its version id, with the programmes it applies to and the owning company's `logo`. Superseded versions can be read by their id. Readable without a user token: anonymous callers get only agreements shown at checkout, registration, feedback or on contact forms, with internal fields masked.",
        "responses": {
          "200": {
            "description": "The agreement version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resource_Agreement"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "description": "Missing, invalid or expired access token. Request a new one from `POST /v3/token`.\n"
          },
          "403": {
            "description": "The endpoint is outside this key's access groups. `GET /v3/me` lists everything the\nkey may call.\n"
          },
          "422": {
            "description": "The request does not match this endpoint's schema. The body lists **every** problem\nfound, each with its location, a JSON Pointer to the field, a stable machine code and\nthe offending value.\n"
          },
          "429": {
            "description": "Over budget. `Retry-After` says how long to wait, and `X-RateLimit-Scope` says which\nbudget was full: `account` for the points the whole account shares, `key` for a limit\nset on this key alone. `X-RateLimit-*` report the account's budget **in points**, not\nin requests; `X-RateLimit-Key-*` appear only when this key is capped below it.\n"
          }
        },
        "x-zooza-permission": "*",
        "x-zooza-cost": 1,
        "x-zooza-groups": [
          "core_read"
        ]
      }
    },
    "/token": {
      "post": {
        "operationId": "post_token",
        "tags": [
          "Authentication"
        ],
        "summary": "Exchange an API key and client secret for an access token",
        "description": "OAuth 2.0 client-credentials grant. JSON or form-encoded, credentials in the body or via HTTP Basic.\n\nThere is no refresh token: request a new access token when the current one expires. A failed exchange never says why — unknown key, wrong secret and revoked key are indistinguishable by design.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "grant_type",
                  "client_id",
                  "client_secret"
                ],
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "client_credentials"
                    ]
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Your API key."
                  },
                  "client_secret": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An access token.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "token_type": {
                      "type": "string",
                      "enum": [
                        "Bearer"
                      ]
                    },
                    "expires_in": {
                      "type": "integer",
                      "example": 3600
                    },
                    "scope": {
                      "type": "string",
                      "description": "The access groups this key holds, space-separated."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or unsupported grant type."
          },
          "401": {
            "description": "The credentials were not accepted. No reason is given."
          },
          "429": {
            "description": "Too many token requests. This endpoint has its own, stricter limit."
          },
          "503": {
            "description": "The credential check is unavailable. This is not a credential problem — retry."
          }
        }
      }
    },
    "/me": {
      "get": {
        "operationId": "get_me",
        "tags": [
          "Authentication"
        ],
        "summary": "What this key may call, and what is left of the budget it spends",
        "description": "Answered from the token and the rate-limit counters. Costs no points.\n\nThe budget is **the account's**, not this key's: every key the account owns spends the same points. `key_points` appears only when this key is additionally capped below the account, and a call then has to fit in both.",
        "responses": {
          "200": {
            "description": "The key's groups and tier, the account's remaining points, and the operations it may call.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "client_id": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string",
                      "enum": [
                        "EU",
                        "UK",
                        "ASIA"
                      ]
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "tier": {
                      "type": "string"
                    },
                    "key_tier": {
                      "type": "string",
                      "description": "The tier this key is capped to. Equal to `tier` unless the account set a lower cap for it."
                    },
                    "points": {
                      "type": "object",
                      "description": "The account's budget. Every key the account owns spends from it.",
                      "properties": {
                        "scope": {
                          "type": "string",
                          "enum": [
                            "account"
                          ]
                        },
                        "shared": {
                          "type": "string",
                          "description": "Plain-language note on who else spends this budget."
                        },
                        "limit_minute": {
                          "type": "integer"
                        },
                        "remaining_minute": {
                          "type": "integer"
                        },
                        "limit_day": {
                          "type": "integer"
                        },
                        "remaining_day": {
                          "type": "integer"
                        },
                        "reset_day": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "key_points": {
                      "type": "object",
                      "description": "This key's own cap inside the account's budget. Absent when the key has no cap of its own.",
                      "properties": {
                        "scope": {
                          "type": "string",
                          "enum": [
                            "key"
                          ]
                        },
                        "limit_minute": {
                          "type": "integer"
                        },
                        "remaining_minute": {
                          "type": "integer"
                        },
                        "limit_day": {
                          "type": "integer"
                        },
                        "remaining_day": {
                          "type": "integer"
                        },
                        "reset_day": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "token": {
                      "type": "object",
                      "properties": {
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "operations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "op": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "cost": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayError"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "get_openapi",
        "tags": [
          "Authentication"
        ],
        "summary": "This document",
        "description": "Served without authentication. Changes only when the gateway is redeployed; honours ETag.",
        "security": [],
        "responses": {
          "200": {
            "description": "The OpenAPI description of this API."
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "ID": {
        "name": "ID",
        "in": "path",
        "description": "Resource ID",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "Schedule_Active": {
        "name": "schedule_active",
        "in": "query",
        "description": "`true` or `1`: only sessions of active classes in public, unarchived programmes. `false` does not filter.",
        "schema": {
          "type": "boolean"
        }
      },
      "Past": {
        "name": "past",
        "in": "query",
        "description": "Only sessions that have already started. The value is not read: `past=false` filters as well, so leave the parameter out to include future sessions.",
        "schema": {
          "type": "boolean"
        }
      },
      "Upcoming_Events": {
        "name": "upcoming_events",
        "in": "query",
        "description": "Only sessions from the start of today onwards. The value is not read: `upcoming_events=false` filters as well.",
        "schema": {
          "type": "boolean"
        }
      },
      "Events_Sort_By": {
        "name": "sort_by",
        "in": "query",
        "description": "Sort order. Default: date ascending. `date_asc` / `date_desc` by date and time; `created_asc` / `created_desc` by session id; `event_no_asc` / `event_no_desc` by the session's number within its class; `upcoming_asc` sorts by date **and** keeps only sessions that have not started yet.",
        "schema": {
          "type": "string",
          "enum": [
            "created_desc",
            "created_asc",
            "upcoming_asc",
            "date_asc",
            "date_desc",
            "event_no_asc",
            "event_no_desc"
          ]
        }
      },
      "PID": {
        "name": "pid",
        "in": "query",
        "description": "Venue-and-room pairs written as `{place_id}_{room_id}`. Pipe-separate several; a session matches any of them.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]+_[0-9]+(\\|[0-9]+_[0-9]+)*$"
        },
        "example": "3_7|3_8"
      },
      "BP": {
        "name": "bp",
        "in": "query",
        "description": "Alias of `billing_period_id`.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]+(\\|[0-9]+)*$"
        }
      },
      "Billing_Status": {
        "name": "billing_status",
        "in": "query",
        "description": "Payment status of the registration. Pipe-separate several (`paid|partially_paid`). Values: `no_debt`, `paid`, `unpaid`, `overpaid`, `partially_paid`, `awaiting_payment`, and the instalment-stage values `downpayment_paid`, `downpayment_unpaid`, `downpayment_partially_paid`, `final_payment_paid`, `final_payment_unpaid`, `final_payment_partially_paid`, `final_payment_overpaid`. `paid`, `unpaid`, `overpaid` and `partially_paid` also match their down-payment and final-payment variants. Unknown values are ignored.",
        "schema": {
          "type": "string"
        },
        "example": "paid|partially_paid"
      },
      "User": {
        "name": "user",
        "in": "query",
        "description": "Free-text search. Matches, as a substring, the client's first name, last name, full name, email or phone, the registration's `full_name` extra field, or the registration id.",
        "schema": {
          "type": "string"
        },
        "example": "novak"
      },
      "User_ID": {
        "name": "user_id",
        "in": "query",
        "description": "Registrations of this client (user id).",
        "schema": {
          "type": "integer"
        }
      },
      "Email": {
        "name": "email",
        "in": "query",
        "description": "Registrations whose client email is exactly this address (not a substring match).",
        "schema": {
          "type": "string",
          "format": "email"
        }
      },
      "Registration_ID": {
        "name": "registration_id",
        "in": "query",
        "description": "Registrations with these ids. Pipe-separate several.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]+(\\|[0-9]+)*$"
        },
        "examples": {
          "single": {
            "value": "1",
            "summary": "One registration"
          },
          "multiple": {
            "value": "1|2|3",
            "summary": "Several, separated by a pipe"
          }
        }
      },
      "Exclude": {
        "name": "exclude",
        "in": "query",
        "description": "Leaves out registrations with these ids. Pipe-separate several.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]+(\\|[0-9]+)*$"
        },
        "examples": {
          "single": {
            "value": "1",
            "summary": "One registration"
          },
          "multiple": {
            "value": "1|2|3",
            "summary": "Several, separated by a pipe"
          }
        }
      },
      "Exclude_User": {
        "name": "exclude_user",
        "in": "query",
        "description": "Leaves out registrations of these clients (user ids). Pipe-separate several.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]+(\\|[0-9]+)*$"
        },
        "examples": {
          "single": {
            "value": "1",
            "summary": "One client"
          },
          "multiple": {
            "value": "1|2|3",
            "summary": "Several, separated by a pipe"
          }
        }
      },
      "Order_ID": {
        "name": "order_id",
        "in": "query",
        "description": "Registrations linked to this product order (order id).",
        "schema": {
          "type": "integer"
        }
      },
      "Parent": {
        "name": "parent",
        "in": "query",
        "description": "Registrations linked under this parent registration (registration id).",
        "schema": {
          "type": "integer"
        }
      },
      "Distinct": {
        "name": "distinct",
        "in": "query",
        "description": "`true` or `1`: one row per client instead of one per registration.",
        "schema": {
          "type": "boolean"
        }
      },
      "Payment_ID": {
        "name": "payment_id",
        "in": "query",
        "description": "Registrations that own a payment whose id or variable symbol equals this value.",
        "schema": {
          "type": "integer"
        }
      },
      "Inactive_Customers": {
        "name": "inactive_customers",
        "in": "query",
        "description": "`1`: only clients whose role in the company is `inactive_customer`. Without it, clients with an active role are returned. Send `1`, not `true`: the value is read as a number.",
        "schema": {
          "type": "integer",
          "enum": [
            0,
            1
          ],
          "default": 0
        }
      },
      "Marketing_Messages": {
        "name": "marketing_messages",
        "in": "query",
        "description": "`true` or `1`: only clients who agreed to marketing messages from this company. `false` does not filter; it does not return the clients without that consent.",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "Ef_Full_Name": {
        "name": "ef_full_name",
        "in": "query",
        "description": "Substring match on the registration's `full_name` extra field.",
        "schema": {
          "type": "string"
        }
      },
      "Day": {
        "name": "day",
        "in": "query",
        "description": "Classes whose start date falls on this weekday: `1` = Sunday, `2` = Monday, … `7` = Saturday.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 7
        }
      },
      "IDs": {
        "name": "ids",
        "in": "query",
        "description": "Classes with these ids. Pipe-separate several.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]+(\\|[0-9]+)*$"
        }
      },
      "Name": {
        "name": "name",
        "in": "query",
        "description": "Substring match on the class name.",
        "schema": {
          "type": "string"
        }
      },
      "Registration_Type": {
        "name": "registration_type",
        "in": "query",
        "description": "Classes whose programme has this booking type: `full2` (the client books the whole class and attends all its sessions), `single` or `open`.",
        "schema": {
          "type": "string",
          "enum": [
            "full2",
            "open",
            "single"
          ]
        }
      },
      "Labels": {
        "name": "labels",
        "in": "query",
        "description": "Classes carrying any of these label ids. Pipe-separate several; `0` matches classes with no label.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9]+(\\|[0-9]+)*$"
        }
      },
      "Schedule_Status": {
        "name": "status",
        "in": "query",
        "description": "Class status, one value. Without it, `active` and `inactive` classes are returned.",
        "schema": {
          "type": "string",
          "enum": [
            "active",
            "inactive",
            "archive",
            "deleted"
          ]
        }
      },
      "Sort_By_Schedules": {
        "name": "sort_by",
        "in": "query",
        "description": "Sort order. Default `created_desc`. `created_*` sorts by class id, `date_*` by start date, `registrations_*` by the number of registered clients, `name_asc` by name, `place_asc` by venue id. Unknown values are ignored.",
        "schema": {
          "type": "string",
          "enum": [
            "created_desc",
            "created_asc",
            "date_asc",
            "date_desc",
            "registrations_asc",
            "registrations_desc",
            "name_asc",
            "place_asc"
          ]
        }
      },
      "Start": {
        "name": "start",
        "in": "query",
        "description": "Classes starting on or after this date (`YYYY-MM-DD`).",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "End": {
        "name": "end",
        "in": "query",
        "description": "Classes ending on or before this date (`YYYY-MM-DD`).",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "From": {
        "name": "from",
        "in": "query",
        "description": "Sessions on or after this date (`YYYY-MM-DD`).",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "To": {
        "name": "to",
        "in": "query",
        "description": "Sessions on or before this date (`YYYY-MM-DD`, inclusive).",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "Online_Registration": {
        "name": "online_registration",
        "in": "query",
        "description": "`true`: only classes open for online booking. `false`: only classes closed to it.",
        "schema": {
          "type": "boolean"
        }
      },
      "Lead_Only": {
        "name": "lead_only",
        "in": "query",
        "description": "Only lead-collection classes. The value is not read: `lead_only=false` filters as well, so leave the parameter out to include all classes.",
        "schema": {
          "type": "boolean"
        }
      },
      "In_Progress": {
        "name": "in_progress",
        "in": "query",
        "description": "Only classes running now (started, not yet ended). The value is not read: `false` filters as well.",
        "schema": {
          "type": "boolean"
        }
      },
      "Ended": {
        "name": "ended",
        "in": "query",
        "description": "Only classes that have ended. The value is not read: `false` filters as well.",
        "schema": {
          "type": "boolean"
        }
      },
      "Not_Started": {
        "name": "not_started",
        "in": "query",
        "description": "Only classes that have not started yet. The value is not read: `false` filters as well.",
        "schema": {
          "type": "boolean"
        }
      },
      "Billing_Period_Active": {
        "name": "billing_period_active",
        "in": "query",
        "description": "`true` / `false`: only classes whose billing period is / is not active.",
        "schema": {
          "type": "boolean"
        }
      },
      "Under_Billable": {
        "name": "under_billable",
        "in": "query",
        "description": "`true`: classes with fewer sessions than the billable session count set on the class (or, when the class has none, on its programme). `false` does not filter.",
        "schema": {
          "type": "boolean"
        }
      },
      "Over_Billable": {
        "name": "over_billable",
        "in": "query",
        "description": "`true`: classes with more sessions than the billable session count set on the class (or, when the class has none, on its programme). `false` does not filter.",
        "schema": {
          "type": "boolean"
        }
      },
      "Load_Labels": {
        "name": "load_labels",
        "in": "query",
        "description": "Attach `labels` to each class. Default `true`.",
        "schema": {
          "type": "boolean",
          "default": true
        }
      },
      "Load_Trainers": {
        "name": "load_trainers",
        "in": "query",
        "description": "Attach `trainers_schedules`, the class's additional instructors. Default `false`.",
        "schema": {
          "type": "boolean",
          "default": false
        }
      },
      "Status": {
        "name": "status",
        "in": "query",
        "description": "Registration status. Pipe-separate several. Values: `registered`, `guest`, `waitlist`, `late`, `canceled`, `deleted`, `trial_not_started`, `trial_started`, `trial_ended`, `trial_won`, `trial_lost`, and `auto_unenrolled` (canceled automatically for non-payment). Every value except `canceled` and `deleted` also matches its `pre_` variant (`registered` matches `pre_registered`). Without `status`, deleted registrations are left out. Unknown values are ignored; if every value is unknown, no status filter applies at all, deleted included.",
        "schema": {
          "type": "string"
        },
        "example": "registered|waitlist"
      },
      "Created_From": {
        "name": "created_from",
        "in": "query",
        "description": "Registrations created on or after this date (`YYYY-MM-DD`).",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "Created_To": {
        "name": "created_to",
        "in": "query",
        "description": "Registrations created on or before this date (`YYYY-MM-DD`, inclusive).",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "Schedule_Groups": {
        "name": "schedule_groups",
        "in": "query",
        "description": "With `schedule_id`: widens the class filter to every class in the same class group as that class. Ignored without `schedule_id`.",
        "schema": {
          "type": "boolean"
        }
      },
      "Schedule_Query": {
        "name": "schedule_query",
        "in": "query",
        "description": "A JSON-encoded object of `GET /schedules` filters, for example `{\"course_id\":\"12\",\"billing_period_id\":\"3\"}`. Registrations are limited to the classes that search finds (classes in `active` or `inactive` status unless it says otherwise). If it finds no class, no class filter is applied.",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Prop_Resource_ID": {
        "description": "Resource ID",
        "type": "integer"
      },
      "Prop_Company_ID": {
        "description": "ID of company that record belongs to",
        "type": "integer"
      },
      "Prop_Trainer_ID": {
        "description": "Trainer_ID is a synonym to User_ID",
        "type": "integer"
      },
      "Resource_Customer_Invoice": {
        "type": "object",
        "properties": {
          "invoice_profile_id": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "order_id": {
            "type": "integer"
          },
          "company_id": {
            "type": "integer"
          },
          "box_id": {
            "type": "integer"
          },
          "faktury_online_error_code": {
            "type": "integer"
          },
          "invoice_buyer_id": {
            "type": "integer"
          },
          "invoice_series_id": {
            "type": "integer",
            "nullable": true
          },
          "order_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "course",
              "product"
            ]
          },
          "engine_return_code": {
            "type": "string",
            "nullable": true
          },
          "engine_error_code": {
            "type": "string",
            "nullable": true
          },
          "engine_data": {
            "type": "string",
            "nullable": true
          },
          "invoice_no": {
            "type": "integer",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "invoice_data": {
            "type": "object",
            "nullable": true,
            "properties": {
              "d": {
                "description": "Supplier information",
                "type": "object",
                "properties": {
                  "d_name": {
                    "type": "string"
                  },
                  "d_street": {
                    "type": "string"
                  },
                  "d_city": {
                    "type": "string"
                  },
                  "d_state": {
                    "type": "string"
                  },
                  "d_zip": {
                    "type": "string"
                  },
                  "d_ico": {
                    "type": "string"
                  },
                  "d_dic": {
                    "type": "string"
                  },
                  "d_icdph": {
                    "type": "string"
                  },
                  "d_vatpayer": {
                    "type": "string"
                  },
                  "d_viewpayer": {
                    "type": "string"
                  },
                  "d_iban": {
                    "type": "string"
                  },
                  "d_email": {
                    "type": "string"
                  },
                  "d_web": {
                    "type": "string"
                  },
                  "d_phone": {
                    "type": "string"
                  }
                }
              },
              "o": {
                "description": "Buyer information",
                "type": "object",
                "properties": {
                  "o_name": {
                    "type": "string"
                  },
                  "o_street": {
                    "type": "string"
                  },
                  "o_email": {
                    "type": "string"
                  },
                  "o_phone": {
                    "type": "string"
                  }
                }
              },
              "f": {
                "description": "Invoice information",
                "type": "object",
                "properties": {
                  "f_number": {
                    "type": "integer"
                  },
                  "f_vs": {
                    "type": "integer"
                  },
                  "f_qr": {
                    "type": "integer"
                  },
                  "f_payment": {
                    "type": "string"
                  },
                  "f_paid": {
                    "type": "integer",
                    "format": "float"
                  },
                  "f_date_issue": {
                    "type": "string",
                    "format": "date"
                  },
                  "f_date_delivery": {
                    "type": "string",
                    "format": "date"
                  }
                }
              },
              "p": {
                "description": "Invoice items",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "p_text": {
                      "type": "string"
                    },
                    "p_quantity": {
                      "type": "integer"
                    },
                    "p_unit": {
                      "type": "string"
                    },
                    "p_price": {
                      "type": "integer",
                      "format": "float"
                    }
                  }
                }
              },
              "key": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "options": {
            "type": "object",
            "nullable": true,
            "properties": {
              "date": {
                "type": "string",
                "format": "date"
              },
              "text": {
                "description": "Text of the item on the invoice\n",
                "type": "string"
              },
              "payment_method": {
                "type": "string",
                "enum": [
                  "hotovost",
                  "prevod",
                  "karta",
                  "eprovider"
                ]
              }
            }
          },
          "period_start": {
            "type": "string",
            "nullable": true
          },
          "period_end": {
            "type": "string",
            "nullable": true
          },
          "engine": {
            "type": "string",
            "nullable": true
          },
          "engine_response": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "invoice_series_name": {
            "type": "string",
            "nullable": true
          },
          "display_number": {
            "type": "string",
            "nullable": true
          },
          "display_number_file": {
            "type": "string",
            "nullable": true
          },
          "total_net": {
            "type": "number",
            "nullable": true
          },
          "total_gross": {
            "type": "number",
            "nullable": true
          },
          "has_document_url": {
            "type": "boolean"
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Customer_Invoice"
      },
      "Resource_Course": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Prop_Resource_ID"
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "registration_slots_min": {
            "type": "integer"
          },
          "registration_slots_max": {
            "type": "integer"
          },
          "registration_open": {
            "type": "integer"
          },
          "show_on_site": {
            "type": "integer"
          },
          "allow_cancel_until": {
            "type": "integer"
          },
          "replacements_limit": {
            "type": "integer"
          },
          "custom_email": {
            "type": "integer"
          },
          "custom_email_event_notification": {
            "type": "integer"
          },
          "hide_before": {
            "type": "integer"
          },
          "replacements_limit_per_events": {
            "type": "integer"
          },
          "billable_events": {
            "type": "integer"
          },
          "replacement_time_limit": {
            "type": "integer"
          },
          "default_email_signature": {
            "type": "integer"
          },
          "custom_email_lead": {
            "type": "integer"
          },
          "constant_symbol": {
            "type": "integer"
          },
          "specific_symbol": {
            "type": "integer"
          },
          "trial_events_limit": {
            "type": "integer"
          },
          "downpayment_due_days": {
            "type": "integer"
          },
          "retention_notify_days_before": {
            "type": "integer"
          },
          "__calc__registrations_count": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__schedules_count": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__min_age": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__max_age": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "trial_length": {
            "type": "integer"
          },
          "priority": {
            "type": "integer"
          },
          "retention_days": {
            "type": "integer"
          },
          "delayed_start_max_days": {
            "type": "integer"
          },
          "additional_sessions_limit": {
            "type": "integer"
          },
          "additional_session_payment_deadline_days": {
            "type": "integer"
          },
          "require_valid_entrance_voucher": {
            "type": "boolean"
          },
          "priority_registration": {
            "type": "boolean"
          },
          "priority_registration_allow_multiple": {
            "type": "boolean"
          },
          "cash": {
            "type": "boolean"
          },
          "online_card": {
            "type": "boolean"
          },
          "online_transfer": {
            "type": "boolean"
          },
          "direct_debit": {
            "type": "boolean"
          },
          "fees_included_in_price": {
            "type": "boolean"
          },
          "public": {
            "type": "boolean"
          },
          "archive": {
            "type": "boolean"
          },
          "online_registration": {
            "type": "boolean"
          },
          "on_behalf": {
            "type": "boolean"
          },
          "feedback_during_course": {
            "type": "boolean"
          },
          "feedback_after_course": {
            "type": "boolean"
          },
          "hide_if_full": {
            "type": "boolean"
          },
          "allow_replacements": {
            "type": "boolean"
          },
          "allow_custom_replacements": {
            "type": "boolean"
          },
          "auto_approve_custom_replacements": {
            "type": "boolean"
          },
          "allow_replacements_waitlist": {
            "type": "boolean"
          },
          "auto_waitlist_notification": {
            "type": "boolean"
          },
          "use_extra_fields": {
            "type": "boolean"
          },
          "for_children": {
            "type": "boolean"
          },
          "event_notification": {
            "type": "boolean"
          },
          "allow_registration_after_end": {
            "type": "boolean"
          },
          "allow_replacement_cancellation": {
            "type": "boolean"
          },
          "admin_managed_replacements": {
            "type": "boolean"
          },
          "upcoming_events_notification": {
            "type": "boolean"
          },
          "allow_guest_registrations": {
            "type": "boolean"
          },
          "allow_replacements_from_other_companies": {
            "type": "boolean"
          },
          "payment_schedule_is_mandatory": {
            "type": "boolean"
          },
          "allow_using_replacement_credits_as_discount": {
            "type": "boolean"
          },
          "flexible_replacements_limit": {
            "type": "boolean"
          },
          "allow_reschedule_of_replacements": {
            "type": "boolean"
          },
          "limit_reschedule_to_once": {
            "type": "boolean"
          },
          "payments_managed_by_buyer": {
            "type": "boolean"
          },
          "always_use_total_price": {
            "type": "boolean"
          },
          "track_attendance": {
            "type": "boolean"
          },
          "force_full_first_installment": {
            "type": "boolean"
          },
          "reserve_seat_for_trial_attendees": {
            "type": "boolean"
          },
          "widgets_published": {
            "type": "boolean"
          },
          "allow_rescheduling_of_events": {
            "type": "boolean"
          },
          "auto_approve_rescheduled_events": {
            "type": "boolean"
          },
          "automatically_add_schedules_to_trial": {
            "type": "boolean"
          },
          "automatically_add_schedules_to_retention": {
            "type": "boolean"
          },
          "reviews_after_registration": {
            "type": "boolean"
          },
          "reviews_after_first_session": {
            "type": "boolean"
          },
          "reviews_after_class_ended": {
            "type": "boolean"
          },
          "allow_additional_sessions": {
            "type": "boolean"
          },
          "allow_cancellation_discount": {
            "type": "boolean"
          },
          "direct_debit_provider": {
            "type": "string",
            "nullable": true
          },
          "online_card_provider": {
            "type": "string",
            "nullable": true,
            "enum": [
              "tatra_banka",
              "tatra_banka_cz",
              "stripe"
            ]
          },
          "online_transfer_provider": {
            "type": "string",
            "nullable": true,
            "enum": [
              "besteron"
            ]
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "get_extra_fields_from": {
            "type": "string",
            "nullable": true,
            "description": "Extra fields are required for:\n- all: Every person\n- other: Every person but registrant (first person)\n",
            "enum": [
              "all",
              "other"
            ]
          },
          "get_basic_fields_from": {
            "type": "string",
            "nullable": true,
            "description": "Basic fields ( First name, last name, email, phone ) are required for:\n- all: Every person\n- registrant: Just first person\n",
            "enum": [
              "all",
              "registrant"
            ]
          },
          "registration_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "full2",
              "open",
              "single"
            ]
          },
          "course_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "course",
              "event",
              "online_event",
              "photography"
            ]
          },
          "waitlist": {
            "type": "string",
            "nullable": true,
            "enum": [
              "any",
              "this"
            ]
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "theme": {
            "type": "string",
            "nullable": true
          },
          "late_registrations": {
            "type": "string",
            "nullable": true,
            "enum": [
              "confirmation_required",
              "auto_approve"
            ]
          },
          "custom_label_note": {
            "type": "string",
            "nullable": true
          },
          "custom_label_first_name": {
            "type": "string",
            "nullable": true
          },
          "custom_label_last_name": {
            "type": "string",
            "nullable": true
          },
          "custom_label_email": {
            "type": "string",
            "nullable": true
          },
          "custom_label_phone": {
            "type": "string",
            "nullable": true
          },
          "collect_feedback_start": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "collect_reviews_start": {
            "type": "string",
            "nullable": true
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "iban_account_holder": {
            "type": "string",
            "nullable": true
          },
          "swift": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "replacement_time_limit_type": {
            "type": "string",
            "nullable": true
          },
          "price_type": {
            "type": "string",
            "nullable": true
          },
          "direct_debit_mandate_id_format": {
            "type": "string",
            "nullable": true
          },
          "aliquot_settings": {
            "type": "string",
            "nullable": true
          },
          "money_collection": {
            "type": "string",
            "nullable": true
          },
          "trial_events_capacity": {
            "type": "string",
            "nullable": true
          },
          "retention_type": {
            "type": "string",
            "nullable": true
          },
          "retention_message": {
            "type": "string",
            "nullable": true
          },
          "trial_events_limit_type": {
            "type": "string",
            "nullable": true
          },
          "trial_type": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "__calc__available_currencies": {
            "type": "array",
            "nullable": true,
            "description": "Currencies available for this programme."
          },
          "downpayment": {
            "type": "string",
            "nullable": true
          },
          "downpayment_due_type": {
            "type": "string",
            "nullable": true
          },
          "__calc__registration_url": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "trial_length_type": {
            "type": "string",
            "nullable": true
          },
          "registration_display_mode": {
            "type": "string",
            "nullable": true
          },
          "target_audience": {
            "type": "string",
            "nullable": true
          },
          "direct_debit_scheme": {
            "type": "string",
            "nullable": true
          },
          "additional_session_pricing_mode": {
            "type": "string",
            "nullable": true
          },
          "additional_session_payment_mode": {
            "type": "string",
            "nullable": true
          },
          "payment_mode": {
            "type": "string",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "nullable": true
          },
          "unit_price": {
            "type": "number"
          },
          "price": {
            "format": "float",
            "type": "number"
          },
          "registration_fee": {
            "format": "float",
            "type": "number"
          },
          "__calc__fee_cash": {
            "format": "float",
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__fee_online_card": {
            "format": "float",
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__fee_online_transfer": {
            "format": "float",
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__fee_direct_debit": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__price": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "downpayment_value": {
            "type": "number"
          },
          "downpayment_cap": {
            "type": "number"
          },
          "unit_price_trial": {
            "type": "number"
          },
          "additional_session_unit_price": {
            "type": "number"
          },
          "replacements_settings": {
            "description": "Returned as an empty array `[]` when not set.",
            "properties": {
              "type": {
                "format": "string"
              },
              "courses": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {}
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "billing_periods": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {}
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "places": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {}
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            }
          },
          "additional_sessions_settings": {
            "description": "Returned as an empty array `[]` when not set."
          },
          "replacements_settings_other_companies": {
            "description": "Returned as an empty array `[]` when not set.",
            "properties": {
              "type": {
                "format": "string"
              },
              "companies": {
                "type": "array",
                "items": {}
              },
              "billing_periods": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {}
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "places": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {}
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              "schedules": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {}
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            }
          },
          "retention_settings": {
            "description": "Returned as an empty array `[]` when not set."
          },
          "priority_registration_audience": {
            "description": "Returned as an empty array `[]` when not set."
          },
          "schedule_start_date_format": {
            "description": "Stored JSON, returned decoded."
          },
          "schedule_end_date_format": {
            "description": "Stored JSON, returned decoded."
          },
          "direct_debit_mandate_id_rules": {
            "description": "Returned as stored."
          },
          "direct_debit_mandate_id_rules_by_provider": {
            "description": "Returned as stored."
          },
          "priority_registration_offset": {
            "description": "Returned as stored."
          },
          "priority_registration_public_offset": {
            "description": "Returned as stored."
          },
          "onboarding": {
            "description": "Returned as stored."
          },
          "extra_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource_Extra_Field"
            }
          },
          "feedback_questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource_Feedback_Question"
            },
            "description": "Detail endpoint only."
          },
          "billing": {
            "type": "object",
            "nullable": true,
            "description": "Billing profile and bank account resolution for this programme (resolved values and the inheritance chain). Detail endpoint only."
          },
          "labels": {
            "type": "object",
            "nullable": true,
            "description": "Labels attached to the programme (paginated collection). List endpoint only."
          },
          "started": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the programme has started. List endpoint only."
          },
          "schedules": {
            "type": "array",
            "nullable": true,
            "description": "The programme's classes. List endpoint only."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Course"
      },
      "Resource_Extra_Field": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Prop_Resource_ID"
          },
          "field_order": {
            "type": "integer"
          },
          "course_id": {
            "$ref": "#/components/schemas/Prop_Resource_ID"
          },
          "column_name": {
            "type": "string",
            "nullable": true,
            "enum": [
              "dob",
              "full_name",
              "address",
              "slots",
              "business_name",
              "business_address",
              "business_id",
              "tax_id",
              "vat",
              "identification_number",
              "extra_field_1",
              "extra_field_2",
              "extra_field_3",
              "extra_field_4",
              "extra_field_5"
            ]
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "custom_label": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "mandatory": {
            "type": "boolean"
          },
          "field_options": {
            "description": "Object; `[]` when empty.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Extra_Field_Dob_Limit"
              }
            ]
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Extra_Field"
      },
      "Extra_Field_Dob_Limit": {
        "type": "object",
        "description": "Age limit is used with field `dob` to limit values submitted within this extra field.\n###Limit types\nThere are three possible types:\n    1. `none` - limit is not used\n    2. `date` - date range is used for validation. Submitted value must be formated as date string\n    3. `age` - age range is used for validation. Submitted value must be formatted as integer\n###Limit units\nIf limit type is set to `age`, limit unit describes whether submitted integer is considered to be in years or months\n###Limit usage\nLimit usage defines range that is used for validation:\n    1. `both` - both minimum limit and maximum limits are used. That means that submitted value must fall between these two values\n    2. `min`- only minimum value of limit is used. For example if minimum limit is set to 3 months, then any number equal or larger than 3 will pass the test\n    3. `max`- the opposite of minimum value\n###Minimum and maximum limit values\nDepending on limit type this can either be a number (in case of age) or date string (in case of date)\n",
        "properties": {
          "age_limit_type": {
            "type": "string",
            "enum": [
              "none",
              "date",
              "age"
            ]
          },
          "age_limit_units": {
            "type": "string",
            "enum": [
              "years",
              "months"
            ]
          },
          "age_limit_min": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          "age_limit_max": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          "age_limit_use": {
            "type": "string",
            "enum": [
              "both",
              "min",
              "max"
            ]
          }
        }
      },
      "Resource_Feedback_Question": {
        "type": "object",
        "properties": {
          "course_id": {
            "$ref": "#/components/schemas/Prop_Resource_ID"
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Resource_ID"
          },
          "question_id": {
            "$ref": "#/components/schemas/Prop_Resource_ID"
          },
          "question_active_during": {
            "type": "boolean"
          },
          "question_active_after": {
            "type": "boolean"
          },
          "is_mandatory": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "Resource_Schedule": {
        "type": "object",
        "properties": {
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "id": {
            "$ref": "#/components/schemas/Prop_Resource_ID"
          },
          "course_id": {
            "type": "integer"
          },
          "time": {
            "description": "Time in minutes from midnights when schedule starts",
            "type": "integer"
          },
          "duration": {
            "type": "integer"
          },
          "place_id": {
            "type": "integer"
          },
          "room_id": {
            "type": "integer"
          },
          "trainer_id": {
            "$ref": "#/components/schemas/Prop_Trainer_ID"
          },
          "registrations_cap": {
            "type": "integer"
          },
          "capacity": {
            "type": "integer"
          },
          "extra_capacity": {
            "type": "integer"
          },
          "total_events": {
            "type": "integer"
          },
          "__calc__total_avg_nps_score": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__total_requests": {
            "description": "total feedback requests sent",
            "type": "integer"
          },
          "__calc__registered": {
            "description": "Total registrations with status: registered\n",
            "type": "integer"
          },
          "__calc__waitlist": {
            "description": "Total registrations with status: waitlist\n",
            "type": "integer"
          },
          "__calc__late": {
            "description": "Total registrations with status: late\n",
            "type": "integer"
          },
          "trainer_rate_type_id": {
            "type": "integer"
          },
          "__calc__remaining_events": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "billable_events": {
            "type": "integer"
          },
          "__calc__events__elapsed": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__events__total": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__events__total_custom_replacements": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__events__total_billable": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__events__elapsed_billable": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__events__total_scheduled": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__events__total_unplanned": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__events__total_nonbillable": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__courses__billable_events": {
            "type": "integer",
            "description": "Materialised from `courses.billable_events`."
          },
          "__calc__nps_promoters": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__nps_detractors": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__nps": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__min_age": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__max_age": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__segments": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "apply_segment_discount": {
            "type": "integer"
          },
          "__calc__trial_not_started": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__trial_started": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__trial_ended": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__trial_won": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__trial_lost": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "deleted_by_user_id": {
            "type": "integer"
          },
          "__calc__has_shared_sessions": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__effective_capacity": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "glue_set_id": {
            "type": "integer"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "start": {
            "type": "string",
            "nullable": true,
            "format": "date"
          },
          "end": {
            "type": "string",
            "nullable": true,
            "format": "date"
          },
          "extra_capacity_usage": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "notify_trainer_on_cancellation": {
            "type": "string",
            "nullable": true
          },
          "__calc__debt_updated": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "__courses__price_type": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `courses.price_type`."
          },
          "__courses__money_collection": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `courses.money_collection`."
          },
          "__courses__registration_type": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `courses.registration_type`."
          },
          "__calc__registration_url": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "schedule_type": {
            "type": "string",
            "nullable": true
          },
          "segments_config": {
            "type": "string",
            "nullable": true
          },
          "online_meeting_id": {
            "type": "string",
            "nullable": true
          },
          "online_meeting_provider": {
            "type": "string",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "nullable": true
          },
          "status_before_delete": {
            "type": "string",
            "nullable": true
          },
          "__view__admin_url": {
            "type": "string",
            "nullable": true,
            "description": "Projection (materialisation)."
          },
          "priority_registration_phase": {
            "type": "string",
            "nullable": true
          },
          "__view__priority_registration_start": {
            "type": "string",
            "nullable": true,
            "description": "Projection (materialisation)."
          },
          "__view__priority_registration_public_start": {
            "type": "string",
            "nullable": true,
            "description": "Projection (materialisation)."
          },
          "all_day": {
            "type": "boolean"
          },
          "public": {
            "type": "boolean"
          },
          "online_registration": {
            "type": "boolean"
          },
          "in_trial": {
            "type": "boolean"
          },
          "in_retention": {
            "type": "boolean"
          },
          "custom_start": {
            "type": "boolean"
          },
          "custom_end": {
            "type": "boolean"
          },
          "lead_collection_money_collection_enabled": {
            "type": "boolean"
          },
          "__view__registration_url_active": {
            "type": "boolean",
            "description": "Projection (materialisation)."
          },
          "priority_registration": {
            "type": "boolean"
          },
          "unit_price": {
            "type": "number"
          },
          "price": {
            "format": "float",
            "type": "number"
          },
          "registration_fee": {
            "format": "float",
            "type": "number"
          },
          "__calc__possible_income": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__booked_income": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__debt_issued": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__debt_paid": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__debt_balance": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__price": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__unit_price": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__registration_fee": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__courses__unit_price": {
            "type": "number",
            "description": "Materialised from `courses.unit_price`."
          },
          "__courses__price": {
            "type": "number",
            "description": "Materialised from `courses.price`."
          },
          "__calc__current_price": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__courses__registration_fee": {
            "type": "number",
            "description": "Materialised from `courses.registration_fee`."
          },
          "segment_discount_multiplier": {
            "type": "number"
          },
          "__courses__schedule_start_date_format": {
            "description": "Stored JSON, returned decoded."
          },
          "__courses__schedule_end_date_format": {
            "description": "Stored JSON, returned decoded."
          },
          "billing_periods_schedules": {
            "type": "object",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Schedule"
      },
      "APP_Registration_Detail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "course_id": {
            "type": "integer"
          },
          "schedule_id": {
            "type": "integer"
          },
          "event_id": {
            "description": "not used",
            "type": "integer"
          },
          "user_id": {
            "type": "integer"
          },
          "slots": {
            "type": "integer"
          },
          "billing_period_id": {
            "type": "integer"
          },
          "parent": {
            "type": "integer"
          },
          "total_events": {
            "type": "integer"
          },
          "preferred_payment_schedule": {
            "type": "integer"
          },
          "payment_schedule_id": {
            "type": "integer"
          },
          "guest_id": {
            "type": "integer"
          },
          "__calc__guest_user_id": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "extra_replacements_limit": {
            "type": "integer"
          },
          "payments_managed_by": {
            "type": "integer"
          },
          "invoice_profile": {
            "type": "integer"
          },
          "vat_level": {
            "type": "integer"
          },
          "__calc__buyer_person_id": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__customer_person_id": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "next": {
            "type": "integer"
          },
          "previous": {
            "type": "integer"
          },
          "after_trial_course_id": {
            "type": "integer"
          },
          "after_trial_schedule_id": {
            "type": "integer"
          },
          "awaiting_payment_reason": {
            "type": "integer"
          },
          "__calc__scheduled_payments__total_payments": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__scheduled_payments__processed_payments": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "deleted_by_user_id": {
            "type": "integer"
          },
          "__calc__remaining_events": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "pre_registered",
              "registered",
              "pre_late",
              "late",
              "pre_waitlist",
              "waitlist",
              "pre_guest",
              "guest",
              "deleted",
              "canceled"
            ]
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "public_note": {
            "type": "string",
            "nullable": true
          },
          "company_note": {
            "type": "string",
            "nullable": true
          },
          "payment_method": {
            "type": "string",
            "nullable": true,
            "description": "not used"
          },
          "payment_status": {
            "type": "string",
            "nullable": true
          },
          "__users__full_name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `users.full_name`."
          },
          "__users__first_name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `users.first_name`."
          },
          "__users__last_name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `users.last_name`."
          },
          "__users__phone": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `users.phone`."
          },
          "__users__email": {
            "type": "string",
            "nullable": true,
            "format": "email",
            "description": "Materialised from `users.email`."
          },
          "notify_alternate_email": {
            "type": "string",
            "nullable": true
          },
          "__calc__guest_email": {
            "type": "string",
            "nullable": true,
            "format": "email",
            "description": "Calculated value (materialisation)."
          },
          "attendance_management": {
            "type": "string",
            "nullable": true
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "iban_account_holder": {
            "type": "string",
            "nullable": true
          },
          "swift": {
            "type": "string",
            "nullable": true
          },
          "origin": {
            "type": "string",
            "nullable": true
          },
          "__courses__name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `courses.name`."
          },
          "__courses__get_extra_fields_from": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `courses.get_extra_fields_from`."
          },
          "__schedules__name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `schedules.name`."
          },
          "__calc__order_summary": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "trial_started": {
            "type": "string",
            "nullable": true
          },
          "trial_ended": {
            "type": "string",
            "nullable": true
          },
          "trial_lost": {
            "type": "string",
            "nullable": true
          },
          "trial_won": {
            "type": "string",
            "nullable": true
          },
          "booking_link_sent": {
            "type": "string",
            "nullable": true
          },
          "first_followup_sent": {
            "type": "string",
            "nullable": true
          },
          "second_followup_sent": {
            "type": "string",
            "nullable": true
          },
          "trial_lost_confirmation_sent": {
            "type": "string",
            "nullable": true
          },
          "__events__first_event": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `events.first_event`."
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "__extra_fields__full_name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `extra_fields.full_name`."
          },
          "downpayment_due": {
            "type": "string",
            "nullable": true
          },
          "retention_notification_sent": {
            "type": "string",
            "nullable": true
          },
          "status_change_scheduled_at": {
            "type": "string",
            "nullable": true
          },
          "scheduled_status": {
            "type": "string",
            "nullable": true
          },
          "trial_ends": {
            "type": "string",
            "nullable": true
          },
          "awaiting_payment_until": {
            "type": "string",
            "nullable": true
          },
          "awaiting_payment_source": {
            "type": "string",
            "nullable": true
          },
          "awaiting_payment_note": {
            "type": "string",
            "nullable": true
          },
          "__payment_schedules_templates__name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `payment_schedules_templates.name`."
          },
          "__calc__scheduled_payments__next_payment": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "deleted_at": {
            "type": "string",
            "nullable": true
          },
          "status_before_delete": {
            "type": "string",
            "nullable": true
          },
          "__calc__unpaid_since": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "__calc__payments__last_received_at": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "cancellation_reason": {
            "type": "string",
            "nullable": true
          },
          "nudge_state": {
            "type": "string",
            "nullable": true
          },
          "cancellation_category": {
            "type": "string",
            "nullable": true
          },
          "cancellation_reason_label": {
            "type": "string",
            "nullable": true
          },
          "canceled_by_name": {
            "type": "string",
            "nullable": true
          },
          "canceled_at": {
            "type": "string",
            "nullable": true
          },
          "cancellation_reason_id": {
            "type": "integer",
            "nullable": true
          },
          "canceled_by_user_id": {
            "type": "integer",
            "nullable": true
          },
          "notify": {
            "default": true,
            "type": "boolean"
          },
          "notify_about_upcoming_events": {
            "type": "boolean"
          },
          "business_order": {
            "type": "boolean"
          },
          "notify_alternate_email_only": {
            "type": "boolean"
          },
          "__calc__guest_notify": {
            "type": "boolean",
            "description": "Calculated value (materialisation)."
          },
          "offline_charge_available": {
            "type": "boolean"
          },
          "process_course_trial_automation": {
            "type": "boolean"
          },
          "in_retention": {
            "type": "boolean"
          },
          "__calc__has_segments": {
            "type": "boolean",
            "description": "Calculated value (materialisation)."
          },
          "__calc__has_payment_schedule": {
            "type": "boolean",
            "description": "Calculated value (materialisation)."
          },
          "__calc__has_any_payment_schedule": {
            "type": "boolean",
            "description": "Calculated value (materialisation)."
          },
          "paid": {
            "format": "float",
            "type": "number"
          },
          "value": {
            "format": "float",
            "type": "number"
          },
          "__calc__debt": {
            "format": "float",
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__paid": {
            "format": "float",
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__balance": {
            "format": "float",
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__course_payment": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__registration_fee": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "currency_rate": {
            "type": "number"
          },
          "downpayment": {
            "type": "number"
          },
          "__calc__scheduled_debt": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__current_value": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__additional_debt": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__calc__additional_balance": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "extra_fields": {
            "$ref": "#/components/schemas/Registration_Extra_Fields"
          },
          "role": {
            "$ref": "#/components/schemas/User_Role"
          },
          "linked_registrations": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "page": {
                "type": "integer"
              },
              "page_size": {
                "type": "integer"
              },
              "settings": {
                "type": "object"
              },
              "data": {
                "type": "array",
                "items": {}
              }
            }
          },
          "schedule": {
            "type": "object",
            "nullable": true,
            "description": "The class booked."
          },
          "course": {
            "type": "object",
            "nullable": true,
            "description": "The programme booked."
          },
          "buyer": {
            "type": "object",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "customer": {
            "type": "object",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "user": {
            "type": "object",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "pending_identity_claim": {
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "application": {
            "type": "object",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "refund_requests": {
            "type": "array",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "billing": {
            "type": "object",
            "nullable": true,
            "description": "Billing profile and bank account resolution for this booking (resolved values and the inheritance chain)."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Registration"
      },
      "APP_Registration": {
        "type": "object",
        "description": "One row of `GET /registrations?advanced_search=1`. Field visibility depends on the caller's role: trainers and receptionists get `email` partially and `phone` fully masked, and financial fields are `null` for callers without financial visibility.",
        "properties": {
          "registration_id": {
            "type": "integer"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "origin": {
            "type": "string",
            "nullable": true
          },
          "course_id": {
            "type": "integer"
          },
          "__calc__has_payment_schedule": {
            "type": "boolean",
            "description": "Calculated value (materialisation)."
          },
          "__calc__has_any_payment_schedule": {
            "type": "boolean",
            "description": "Calculated value (materialisation)."
          },
          "__calc__current_value": {
            "type": "number",
            "description": "Calculated value (materialisation)."
          },
          "__payment_schedules_templates__name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `payment_schedules_templates.name`."
          },
          "__calc__scheduled_payments__total_payments": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__scheduled_payments__processed_payments": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__scheduled_payments__next_payment": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "payment_schedule_order_id": {
            "type": "integer"
          },
          "schedule_id": {
            "type": "integer"
          },
          "company_note": {
            "type": "string",
            "nullable": true
          },
          "billing_period_id": {
            "type": "integer"
          },
          "paid": {
            "type": "string",
            "nullable": true,
            "format": "float"
          },
          "payment_method": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "user_id": {
            "type": "integer"
          },
          "first_name": {
            "type": "string",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "full_name": {
            "type": "string",
            "nullable": true
          },
          "payment_balance": {
            "type": "number",
            "format": "float"
          },
          "payment_debt": {
            "type": "number",
            "format": "float"
          },
          "payment_paid": {
            "type": "number",
            "format": "float"
          },
          "__calc__paid": {
            "type": "number",
            "format": "float",
            "description": "Calculated value (materialisation)."
          },
          "__calc__remaining_events": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__course_payment": {
            "type": "number",
            "format": "float",
            "description": "Calculated value (materialisation)."
          },
          "__calc__registration_fee": {
            "type": "number",
            "format": "float",
            "description": "Calculated value (materialisation)."
          },
          "payment_status": {
            "type": "string",
            "nullable": true
          },
          "awaiting_payment_until": {
            "type": "string",
            "nullable": true
          },
          "awaiting_payment_source": {
            "type": "string",
            "nullable": true
          },
          "awaiting_payment_note": {
            "type": "string",
            "nullable": true
          },
          "__calc__unpaid_since": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "__calc__payments__last_received_at": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "cancellation_reason": {
            "type": "string",
            "nullable": true
          },
          "cancellation_category": {
            "type": "string",
            "nullable": true
          },
          "cancellation_reason_id": {
            "type": "integer",
            "nullable": true
          },
          "cancellation_reason_label": {
            "type": "string",
            "nullable": true
          },
          "canceled_by_user_id": {
            "type": "integer",
            "nullable": true
          },
          "canceled_by_name": {
            "type": "string",
            "nullable": true
          },
          "canceled_at": {
            "type": "string",
            "nullable": true
          },
          "internal_note": {
            "type": "string",
            "nullable": true
          },
          "ef_full_name": {
            "type": "string",
            "nullable": true
          },
          "ef_dob": {
            "type": "string",
            "nullable": true
          },
          "ef_address": {
            "type": "string",
            "nullable": true
          },
          "ef_identification_number": {
            "type": "string",
            "nullable": true
          },
          "ef_business_name": {
            "type": "string",
            "nullable": true
          },
          "ef_business_address": {
            "type": "string",
            "nullable": true
          },
          "ef_business_id": {
            "type": "string",
            "nullable": true
          },
          "ef_tax_id": {
            "type": "string",
            "nullable": true
          },
          "ef_vat": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_1": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_2": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_3": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_4": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_5": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_6": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_7": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_8": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_9": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_10": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_11": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_12": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_13": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_14": {
            "type": "string",
            "nullable": true
          },
          "ef_extra_field_15": {
            "type": "string",
            "nullable": true
          },
          "ef_citizenship": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "first_event": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "events_attended": {
            "type": "integer"
          },
          "registrations_count": {
            "type": "integer"
          },
          "total_events": {
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "currency_rate": {
            "type": "number"
          },
          "status_change_scheduled_at": {
            "type": "string",
            "nullable": true
          },
          "scheduled_status": {
            "type": "string",
            "nullable": true
          },
          "__calc__buyer_person_id": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__customer_person_id": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "course": {
            "type": "object",
            "nullable": true,
            "description": "The programme booked."
          },
          "schedule": {
            "type": "object",
            "nullable": true,
            "description": "The class booked."
          },
          "buyer": {
            "type": "object",
            "nullable": true,
            "description": "The person who bought the booking."
          },
          "customer": {
            "type": "object",
            "nullable": true,
            "description": "The person attending."
          },
          "course_name": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "schedule_name": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "billing_period_name": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "trainer_name": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "schedule_start": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "schedule_end": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "latest_attendance_record_created": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "custom_customer_id": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "direct_debit_mandate_id": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "public_note": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          }
        }
      },
      "User_Role": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "user_id": {
            "type": "integer"
          },
          "role": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Calendar_Event": {
        "type": "object",
        "description": "One session in the calendar. A rescheduled session whose original date is also in the requested range appears twice: the actual occurrence (`is_actual: true`) and the original slot (`is_actual: false`).",
        "properties": {
          "course_id": {
            "type": "integer"
          },
          "schedule_id": {
            "type": "integer"
          },
          "capacity": {
            "type": "integer"
          },
          "total_events": {
            "type": "integer"
          },
          "event_number": {
            "type": "integer"
          },
          "schedule_name": {
            "type": "string",
            "nullable": true
          },
          "registrations": {
            "type": "integer"
          },
          "canceled": {
            "type": "integer"
          },
          "free_event": {
            "type": "integer"
          },
          "attended": {
            "type": "integer"
          },
          "noshow": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "nullable": true
          },
          "time": {
            "type": "string",
            "nullable": true
          },
          "date_time": {
            "type": "string",
            "nullable": true
          },
          "trainer": {
            "type": "string",
            "nullable": true
          },
          "place": {
            "type": "string",
            "nullable": true
          },
          "place_short": {
            "type": "string",
            "nullable": true
          },
          "trainer_id": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "duration": {
            "type": "integer"
          },
          "place_id": {
            "type": "integer"
          },
          "room_id": {
            "type": "integer"
          },
          "event_name": {
            "type": "string",
            "nullable": true
          },
          "event_status": {
            "type": "string",
            "nullable": true
          },
          "course_color": {
            "type": "string",
            "nullable": true
          },
          "attendance_count": {
            "type": "integer"
          },
          "total_attendance": {
            "type": "integer"
          },
          "has_public_summary": {
            "type": "boolean"
          },
          "pid": {
            "type": "string",
            "nullable": true
          },
          "is_custom_replacement_event": {
            "type": "boolean"
          },
          "billable": {
            "type": "boolean"
          },
          "has_online_meeting": {
            "type": "boolean"
          },
          "course_name": {
            "type": "string",
            "nullable": true
          },
          "registration_type": {
            "type": "string",
            "nullable": true
          },
          "track_attendance": {
            "type": "boolean"
          },
          "canceled_by": {
            "type": "integer"
          },
          "all_day": {
            "type": "boolean"
          },
          "original_date": {
            "type": "string",
            "nullable": true
          },
          "is_original_in_range": {
            "type": "boolean"
          },
          "is_actual_in_range": {
            "type": "boolean"
          },
          "is_actual": {
            "type": "boolean"
          }
        }
      },
      "Registration": {
        "type": "object",
        "description": "A booking as the customer sees it in the profile widget. The list returns these rows without the detail-only fields.",
        "properties": {
          "id": {
            "type": "integer"
          },
          "parent": {
            "type": "integer"
          },
          "billing_period_id": {
            "type": "integer"
          },
          "company_id": {
            "type": "integer"
          },
          "course_id": {
            "type": "integer"
          },
          "schedule_id": {
            "type": "integer"
          },
          "slots": {
            "type": "integer"
          },
          "created": {
            "type": "string",
            "nullable": true
          },
          "updated": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "attendance_management": {
            "type": "string",
            "nullable": true
          },
          "payment_method": {
            "type": "string",
            "nullable": true
          },
          "payment_status": {
            "type": "string",
            "nullable": true
          },
          "paid": {
            "type": "number"
          },
          "balance": {
            "type": "number"
          },
          "debt": {
            "type": "number"
          },
          "additional_balance": {
            "type": "number"
          },
          "notify": {
            "type": "boolean"
          },
          "notify_about_upcoming_events": {
            "type": "boolean"
          },
          "notify_alternate_email": {
            "type": "string",
            "nullable": true
          },
          "notify_alternate_email_only": {
            "type": "boolean"
          },
          "public_note": {
            "type": "string",
            "nullable": true
          },
          "track_attendance": {
            "type": "boolean"
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "guest_email": {
            "type": "string",
            "nullable": true
          },
          "user_is_guest": {
            "type": "boolean"
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "swift": {
            "type": "string",
            "nullable": true
          },
          "iban_account_holder": {
            "type": "string",
            "nullable": true
          },
          "downpayment": {
            "type": "number"
          },
          "downpayment_due": {
            "type": "string",
            "nullable": true
          },
          "redeemable_passes": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "used_passes": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "total_due": {
            "type": "number",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "qr_code_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "downpayment_qr_code_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "schedules": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "users": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "courses": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "attendance": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "extra_fields": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "extra_fields_courses": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "is_list": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "other_company_attendance": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "other_company_events": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "video_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "registration_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "profile_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "calendar_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "checkout_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "credits": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "events": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "payments": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "payment_requests": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "replacements_limit": {
            "description": "Attached to each row. Shape not yet documented. Returned as an empty array `[]` when not set."
          },
          "additional_sessions": {
            "description": "Attached to each row. Shape not yet documented. Returned as an empty array `[]` when not set."
          },
          "refunds": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "refund_requests": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "registration_videos": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "registration_files": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "registration_documents": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "registration_urls": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "schedules_videos": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "schedules_files": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "schedules_urls": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "upcoming_events": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "events_videos": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "events_urls": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "registration_google_forms": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "schedules_google_forms": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "course_google_forms": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "events_google_forms": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "events_live_streams": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "addons": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "invoices": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "custom_replacements_requests": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "event_reschedule_requests": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "retention": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "attendee": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "is_registered": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "can_enroll": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "persons": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "child_registrations": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "parent_registrations": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "sibling_registrations": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "online_meeting_instructions": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "payment_information": {
            "type": "object",
            "nullable": true,
            "description": "Detail endpoint only."
          },
          "scheduled_payments": {
            "type": "array",
            "nullable": true,
            "description": "Detail endpoint only."
          },
          "course_videos": {
            "type": "array",
            "nullable": true,
            "description": "Detail endpoint only."
          },
          "course_files": {
            "type": "array",
            "nullable": true,
            "description": "Detail endpoint only."
          },
          "course_urls": {
            "type": "array",
            "nullable": true,
            "description": "Detail endpoint only."
          },
          "events_files": {
            "type": "array",
            "nullable": true,
            "description": "Detail endpoint only."
          },
          "kings_of_schedule": {
            "type": "array",
            "nullable": true,
            "description": "Detail endpoint only."
          },
          "info_tab": {
            "type": "object",
            "nullable": true,
            "description": "Detail endpoint only."
          }
        }
      },
      "Credit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "origin_order_id": {
            "type": "integer"
          },
          "origin_event_id": {
            "type": "integer"
          },
          "origin_company_id": {
            "type": "integer"
          },
          "origin_attendance_id": {
            "type": "integer"
          },
          "origin_user_id": {
            "type": "integer"
          },
          "used_on_user_id": {
            "type": "integer"
          },
          "used_on_order_id": {
            "type": "integer"
          },
          "used_on_event_id": {
            "type": "integer"
          },
          "used_on_company_id": {
            "type": "integer"
          },
          "used_on_attendance_id": {
            "type": "integer"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "replacement",
              "discount",
              "replacement_transfer",
              "free_event",
              "prepaid_credit"
            ]
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "origin_order_type": {
            "type": "string",
            "nullable": true
          },
          "used_on_order_type": {
            "type": "string",
            "nullable": true
          },
          "expiration": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "used": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "used_by": {
            "type": "string",
            "nullable": true
          },
          "usage": {
            "type": "string",
            "nullable": true,
            "enum": [
              "used",
              "not_used"
            ]
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "nullable": true
          },
          "updated": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "created_by_full_name": {
            "type": "string",
            "nullable": true
          },
          "used_by_full_name": {
            "type": "string",
            "nullable": true
          },
          "settings": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "pickup_preference": {
            "type": "string",
            "nullable": true
          },
          "pickup_note": {
            "type": "string",
            "nullable": true
          },
          "payment_due": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "integer",
            "nullable": false
          },
          "can_convert_to_free_event": {
            "type": "boolean"
          },
          "value": {
            "format": "float",
            "type": "string",
            "nullable": false
          },
          "expired": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Customer_Event"
            }
          },
          "attendance": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attendance"
            }
          },
          "registration": {
            "type": "object",
            "nullable": true,
            "description": "The booking the credit came from."
          },
          "events_files": {
            "type": "array",
            "nullable": true,
            "description": "Files attached to those sessions."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Credit"
      },
      "Attendance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "event_id": {
            "type": "integer"
          },
          "company_id": {
            "type": "integer"
          },
          "registration_id": {
            "type": "integer"
          },
          "credit_id": {
            "type": "integer"
          },
          "replacement_for": {
            "type": "integer"
          },
          "capacity_type": {
            "type": "integer"
          },
          "is_free_event": {
            "type": "integer",
            "nullable": false
          },
          "notification_sent": {
            "type": "boolean"
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "modified": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "attendance": {
            "type": "string",
            "nullable": true,
            "enum": [
              "going",
              "attended",
              "canceled",
              "canceled_late",
              "deleted",
              "going",
              "hold",
              "ignore",
              "noshow",
              "waitlist"
            ]
          },
          "notification_sent_at": {
            "type": "string",
            "nullable": true
          },
          "resolution": {
            "type": "string",
            "nullable": true
          },
          "cancellation_reason": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Attendance"
      },
      "Event_Attendance": {
        "type": "object",
        "description": "One attendee of a session. Financial fields are `null` for callers without financial visibility.",
        "properties": {
          "id": {
            "type": "integer"
          },
          "event_id": {
            "type": "integer"
          },
          "cancellation_reason": {
            "type": "string",
            "nullable": true
          },
          "replacement_for": {
            "type": "integer"
          },
          "created": {
            "type": "integer"
          },
          "modified": {
            "type": "integer"
          },
          "attendance": {
            "type": "string",
            "nullable": true
          },
          "moved": {
            "type": "boolean"
          },
          "replacement": {
            "type": "boolean"
          },
          "credit_id": {
            "type": "integer"
          },
          "is_free_event": {
            "type": "boolean"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "waitlist_credit_id": {
            "type": "integer"
          },
          "user_id": {
            "type": "integer"
          },
          "full_name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "registration_id": {
            "type": "integer"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "paid": {
            "type": "integer",
            "format": "float"
          },
          "slots": {
            "type": "integer"
          },
          "attendance_management": {
            "type": "string",
            "nullable": true
          },
          "registration_status": {
            "type": "string",
            "nullable": true
          },
          "calc__unused_replacements": {
            "type": "integer"
          },
          "payment_balance": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "payment_debt": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "payment_paid": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "__calc__paid": {
            "type": "integer",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "payment_status": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "currency_rate": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "__calc__buyer_person_id": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__customer_person_id": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "ef_dob": {
            "type": "string",
            "nullable": true
          },
          "ef_full_name": {
            "type": "string",
            "nullable": true
          },
          "ef_address": {
            "type": "string",
            "nullable": true
          },
          "replacement_in": {
            "type": "integer"
          },
          "internal_note": {
            "type": "string",
            "nullable": true
          },
          "email_verified": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "email_rejected": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "phone_verified": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "extra_fields": {
            "type": "object",
            "nullable": true,
            "description": "The attendee's extra field values."
          },
          "buyer": {
            "type": "object",
            "nullable": true,
            "description": "The person who bought the booking."
          },
          "customer": {
            "type": "object",
            "nullable": true,
            "description": "The person attending."
          },
          "trial_event_ids": {
            "type": "array",
            "nullable": true,
            "description": "Session ids that are trial sessions for this attendee."
          },
          "other_company_attendance": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented.",
            "items": {}
          },
          "entrance_voucher": {
            "type": "object",
            "nullable": true,
            "description": "Entrance voucher used for this session, if any."
          },
          "video_statistic": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented.",
            "items": {}
          },
          "google_forms_summary": {
            "description": "Google Forms submission summary. Returned only to callers who may read submissions."
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "course_id": {
            "type": "integer"
          },
          "schedule_id": {
            "type": "integer"
          },
          "trainer_id": {
            "$ref": "#/components/schemas/Prop_Trainer_ID"
          },
          "place_id": {
            "type": "integer"
          },
          "room_id": {
            "type": "integer"
          },
          "summary_filled_by": {
            "type": "integer"
          },
          "summary_public_filled_by": {
            "type": "integer"
          },
          "summary_public_unlocked_by": {
            "type": "integer"
          },
          "trainer_rate_type_id": {
            "type": "integer"
          },
          "__calc__attendance__going": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__attendance__canceled": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__attendance__waitlist": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__attendance__canceled_late": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__attendance__noshow": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__attendance__attended": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__attendance__ignore": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__attendance__deleted": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "__calc__attendance__hold": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "duration": {
            "type": "integer"
          },
          "__calc__event_number": {
            "type": "integer",
            "description": "Calculated value (materialisation)."
          },
          "replaced_by": {
            "type": "integer"
          },
          "replacement_for": {
            "type": "integer"
          },
          "canceled_by": {
            "type": "integer"
          },
          "rescheduled_by": {
            "type": "integer"
          },
          "live_stream": {
            "type": "integer"
          },
          "video_expires_in": {
            "type": "integer"
          },
          "original_trainer_id": {
            "type": "integer"
          },
          "deleted_by_user_id": {
            "type": "integer"
          },
          "__calc__effective_capacity": {
            "type": "integer",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          },
          "summary_public": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "scheduled",
              "unplanned"
            ]
          },
          "date": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "attendance": {
            "type": "integer",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "summary_filled_at": {
            "type": "string",
            "nullable": true
          },
          "summary_public_filled_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "__calc__event_trainer": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "__calc__event_place": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "video_expiry": {
            "type": "string",
            "nullable": true
          },
          "canceled_at": {
            "type": "string",
            "nullable": true
          },
          "cancellation_reasoning": {
            "type": "string",
            "nullable": true
          },
          "cancellation_reasoning_public": {
            "type": "string",
            "nullable": true
          },
          "__schedule_segments__name": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `schedule_segments.name`."
          },
          "__schedule_segments__id": {
            "type": "string",
            "nullable": true,
            "description": "Materialised from `schedule_segments.id`."
          },
          "original_date": {
            "type": "string",
            "nullable": true
          },
          "deleted_at": {
            "type": "string",
            "nullable": true
          },
          "status_before_delete": {
            "type": "string",
            "nullable": true
          },
          "__calc__glue_key": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "is_custom_replacement_event": {
            "type": "boolean"
          },
          "summary_public_locked": {
            "type": "boolean"
          },
          "billable": {
            "type": "boolean"
          },
          "substituted": {
            "type": "boolean"
          },
          "trainer_payout_percentage": {
            "type": "number"
          },
          "course": {
            "type": "object",
            "nullable": true,
            "description": "The programme this session belongs to."
          },
          "schedule": {
            "description": "The class this session belongs to."
          },
          "__calc__replacement_for__date": {
            "description": "Calculated value (materialisation)."
          },
          "__calc__replaced_by__date": {
            "description": "Calculated value (materialisation)."
          },
          "__calc__canceled_by__full_name": {
            "description": "Calculated value (materialisation)."
          },
          "event_credit_applied": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "event_debit_applied": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "glue_key": {
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "glued_with": {
            "type": "array",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          },
          "is_glued": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached by the endpoint next to the resource fields. Shape not yet documented."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Event"
      },
      "Resource_Agreement": {
        "description": "Agreement will contain masked fields if it is not requested by eligible user.\nMasked fields:\n    - company_id\n    - order\n    - mandatory\n    - valid_from\n    - type\n    - for\n    - apply_for\nAlso only following types of agreements are returned:\n    - checkout\n    - registration\n    - feedback\n",
        "type": "object",
        "properties": {
          "id": {
            "description": "Agreement version ID\n",
            "type": "integer"
          },
          "agreement_id": {
            "description": "Agreement ID\n",
            "type": "integer"
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "order": {
            "description": "Denotes order in which the agreement will appear in the form\n",
            "type": "integer"
          },
          "region": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Name is shown in the registration form. This is the name of the agreement\nand can contain *|AGREEMENT_URL|*. If present, this var needs to be replaced with url: https://agreements.zooza.app/{ID}.\nShould you want to display agreement inline within the registration form, use also Title and Description for full text of the agreement.\n"
          },
          "title": {
            "type": "string",
            "nullable": true,
            "description": "Title is shown to user when displaying agreement's detail.\n"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Description is shown to user when displaying agreement's detail.\n"
          },
          "mandatory": {
            "type": "integer",
            "nullable": true,
            "description": "All mandatory agreements need to be posted back to API (with full object containing title, description and name).\nNon-mandatory agreements should be sent only when given consent (e.g. Radio button is selected or checkbox is selected). 1 = mandatory, 0 = optional."
          },
          "valid_from": {
            "type": "string",
            "nullable": true,
            "description": "Date from which this agreement version is valid\n",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "description": "Type of form input used to give consent with agreement.\n*none: No input is used. The consent is given by clicking the Register button\n*radio: Yes and No options are shown to user. If mandatory, any one of those two choices need to be selected\n*checkbox: Checkbox is shown to user. If mandatory, checkbox needs to be checked\n",
            "enum": [
              "none",
              "radio",
              "checkbox"
            ]
          },
          "for": {
            "type": "string",
            "nullable": true,
            "description": "Denotes to which application this agreement is targeted.\n*registration: When doing POST/registrations\n*checkout: When doing POST/orders\n*feedback: When doing POST/feedback_requests\n",
            "enum": [
              "registration",
              "checkout",
              "feedback"
            ]
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "apply_for": {
            "type": "string",
            "nullable": true,
            "description": "*everyone: The agreement is always shown\n*course: Agreement is required only for courses that match course_ids within courses property\n*feedback: Feedback form\n*members: Internal consents for company members\n",
            "enum": [
              "everyone",
              "course",
              "feedback",
              "members"
            ]
          },
          "sites": {
            "type": "boolean"
          },
          "logo": {
            "type": "string",
            "nullable": true,
            "description": "Logo URL of the company the agreement belongs to."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Agreement_Definition"
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "first_name": {
            "type": "string",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "format": "email"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true
          },
          "updated": {
            "type": "string",
            "nullable": true
          },
          "avatar": {
            "type": "string",
            "nullable": true
          },
          "email_verified_at": {
            "type": "string",
            "nullable": true
          },
          "phone_verified_at": {
            "type": "string",
            "nullable": true
          },
          "feedback": {
            "type": "boolean"
          },
          "email_verified": {
            "type": "boolean"
          },
          "phone_verified": {
            "type": "boolean"
          },
          "email_rejected": {
            "type": "boolean"
          },
          "role": {
            "type": "string",
            "enum": [
              "customer",
              "inactive_customer",
              "owner",
              "member"
            ]
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "user_fields": {
            "type": "object"
          },
          "billing_periods": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          },
          "companies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Company"
            }
          },
          "url": {
            "type": "string",
            "nullable": true,
            "description": "Link to the customer's profile."
          },
          "onboarding_url": {
            "type": "string",
            "nullable": true,
            "description": "Where to continue onboarding."
          },
          "onboarding_card": {
            "type": "boolean",
            "nullable": true,
            "description": "Onboarding card to show, if any."
          },
          "person_id": {
            "type": "integer",
            "nullable": true,
            "description": "The customer's person record."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\User"
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "customer",
              "inactive_customer",
              "member",
              "inactive",
              "assistant",
              "external_member"
            ]
          }
        }
      },
      "Permission": {
        "type": "object",
        "properties": {
          "permission": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "user_can": {
            "type": "boolean"
          }
        }
      },
      "Order": {
        "type": "object",
        "description": "A product order as the customer sees it in the profile widget.",
        "properties": {
          "id": {
            "type": "integer"
          },
          "company_id": {
            "type": "integer",
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "product_id": {
            "type": "integer"
          },
          "created": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "modified": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "payment_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "paid",
              "unpaid",
              "overpaid",
              "partially_paid"
            ]
          },
          "debt": {
            "type": "number",
            "format": "float"
          },
          "balance": {
            "type": "number",
            "format": "float"
          },
          "paid": {
            "type": "number",
            "format": "float"
          },
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "completed"
            ]
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "iban_account_holder": {
            "type": "string",
            "nullable": true
          },
          "products": {
            "type": "object",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "payment_requests": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented.",
            "items": {
              "$ref": "#/components/schemas/Payment_Request"
            }
          },
          "payments": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented.",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          },
          "order_items": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented.",
            "items": {
              "$ref": "#/components/schemas/Order_Item"
            }
          },
          "invoices": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented.",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            }
          },
          "registrations": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "refunds": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "scheduled_payments": {
            "type": "array",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "video_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "profile_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "calendar_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "registration_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "checkout_widget_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "qr_code_url": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          }
        }
      },
      "Order_Item": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "item_id": {
            "type": "integer",
            "description": "Video or File ID"
          },
          "item_type": {
            "type": "string",
            "enum": [
              "video",
              "document"
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "modified": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "thumbnail_url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "invoice_no": {
            "type": "integer"
          },
          "order_id": {
            "type": "integer"
          },
          "order_type": {
            "type": "string",
            "enum": [
              "product",
              "course"
            ]
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "faktury_online_code": {
            "type": "string"
          },
          "invoice_data": {
            "type": "object"
          },
          "box_id": {
            "type": "integer"
          },
          "faktury_online_error_code": {
            "type": "integer"
          },
          "options": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "modified": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Payment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "variable_symbol": {
            "type": "integer"
          },
          "posting_date": {
            "type": "string",
            "format": "date"
          },
          "value_date": {
            "type": "string",
            "format": "date"
          },
          "due_date": {
            "type": "integer"
          },
          "amount": {
            "type": "integer"
          },
          "transaction_type": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "modified": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Payment_Request": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "check_response": {
            "type": "string"
          },
          "checked": {
            "type": "boolean"
          },
          "order_id": {
            "type": "integer"
          },
          "order_type": {
            "type": "string",
            "enum": [
              "product",
              "course"
            ]
          },
          "company_id": {
            "$ref": "#/components/schemas/Prop_Company_ID"
          },
          "payment_id": {
            "type": "integer"
          },
          "result": {
            "type": "string"
          },
          "request": {
            "type": "string"
          },
          "response": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "modified": {
            "type": "string",
            "format": "date-time"
          },
          "expires": {
            "type": "string",
            "format": "date-time"
          },
          "provider": {
            "type": "string",
            "enum": [
              "tatra_banka",
              "tatra_banka_cz",
              "besteron",
              "stripe"
            ]
          },
          "sign": {
            "type": "string"
          },
          "course": {
            "type": "object"
          },
          "schedule": {
            "type": "object"
          }
        }
      },
      "Widget": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "application_id": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "options": {
            "type": "object",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "url_changed_at": {
            "type": "string",
            "nullable": true
          },
          "url_change_history": {
            "description": "Returned as stored."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Widget"
      },
      "Error": {
        "type": "object",
        "description": "A failed request. Only `errors` and `request_valid` are part of the contract; the API also echoes request context.",
        "required": [
          "errors",
          "request_valid"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "description": "One entry per error: the four-digit error code mapped to a message localised to the request language, e.g. `{\"0066\": \"Neplatný zľavový kód\"}`. Some codes carry a value: `{\"0065\": [\"resource_not_found\", \"Integration\"]}`.",
            "items": {
              "type": "object"
            }
          },
          "request_valid": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        }
      },
      "Resource_Place": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "company_id": {
            "type": "integer"
          },
          "events": {
            "type": "integer"
          },
          "upcoming": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "street": {
            "type": "string",
            "nullable": true
          },
          "region": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true
          },
          "modified": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "subdivision": {
            "type": "string",
            "nullable": true
          },
          "place": {
            "type": "string",
            "nullable": true
          },
          "pid": {
            "type": "string",
            "nullable": true
          },
          "__calc__registration_url": {
            "type": "string",
            "nullable": true,
            "description": "Calculated value (materialisation)."
          },
          "about": {
            "type": "string",
            "nullable": true
          },
          "instructions": {
            "type": "string",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "nullable": true
          },
          "google_review_link_status": {
            "type": "string",
            "nullable": true
          },
          "google_location_resource": {
            "type": "string",
            "nullable": true
          },
          "google_review_url": {
            "type": "string",
            "nullable": true
          },
          "google_location_title": {
            "type": "string",
            "nullable": true
          },
          "google_location_address": {
            "type": "string",
            "nullable": true
          },
          "google_linked_at": {
            "type": "string",
            "nullable": true
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "rooms": {
            "type": "array",
            "nullable": true,
            "description": "Rooms at this venue."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Place"
      },
      "Resource_User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "first_name": {
            "type": "string",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true
          },
          "updated": {
            "type": "string",
            "nullable": true
          },
          "avatar": {
            "type": "string",
            "nullable": true
          },
          "email_verified_at": {
            "type": "string",
            "nullable": true
          },
          "phone_verified_at": {
            "type": "string",
            "nullable": true
          },
          "feedback": {
            "type": "boolean"
          },
          "email_verified": {
            "type": "boolean"
          },
          "phone_verified": {
            "type": "boolean"
          },
          "email_rejected": {
            "type": "boolean"
          },
          "role": {
            "type": "object",
            "nullable": true,
            "description": "The user's membership in the requesting company (role, created, updated)."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\User"
      },
      "Registration_Extra_Fields": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "registration_id": {
            "type": "integer"
          },
          "dob": {
            "type": "string",
            "nullable": true
          },
          "full_name": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "business_name": {
            "type": "string",
            "nullable": true
          },
          "business_address": {
            "type": "string",
            "nullable": true
          },
          "business_id": {
            "type": "string",
            "nullable": true
          },
          "tax_id": {
            "type": "string",
            "nullable": true
          },
          "vat": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true
          },
          "updated": {
            "type": "string",
            "nullable": true
          },
          "identification_number": {
            "type": "string",
            "nullable": true
          },
          "extra_field_1": {
            "type": "string",
            "nullable": true
          },
          "extra_field_2": {
            "type": "string",
            "nullable": true
          },
          "extra_field_3": {
            "type": "string",
            "nullable": true
          },
          "extra_field_4": {
            "type": "string",
            "nullable": true
          },
          "extra_field_5": {
            "type": "string",
            "nullable": true
          },
          "extra_field_6": {
            "type": "string",
            "nullable": true
          },
          "extra_field_7": {
            "type": "string",
            "nullable": true
          },
          "extra_field_8": {
            "type": "string",
            "nullable": true
          },
          "extra_field_9": {
            "type": "string",
            "nullable": true
          },
          "extra_field_10": {
            "type": "string",
            "nullable": true
          },
          "extra_field_11": {
            "type": "string",
            "nullable": true
          },
          "extra_field_12": {
            "type": "string",
            "nullable": true
          },
          "extra_field_13": {
            "type": "string",
            "nullable": true
          },
          "extra_field_14": {
            "type": "string",
            "nullable": true
          },
          "extra_field_15": {
            "type": "string",
            "nullable": true
          },
          "citizenship": {
            "type": "string",
            "nullable": true
          },
          "address_structured": {
            "description": "Object; `[]` when empty."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Extra_Fields"
      },
      "User_Agreement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "company_id": {
            "type": "integer"
          },
          "user_id": {
            "type": "integer"
          },
          "agreement_id": {
            "type": "integer"
          },
          "version_id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "valid_from": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "created": {
            "type": "string",
            "nullable": true
          },
          "updated": {
            "type": "string",
            "nullable": true
          },
          "revoked": {
            "type": "string",
            "nullable": true
          },
          "mandatory": {
            "description": "1 = mandatory, 0 = optional.",
            "type": "integer",
            "nullable": false
          },
          "gave_consent": {
            "type": "boolean"
          },
          "order": {
            "type": "integer",
            "nullable": true,
            "description": "Display order."
          },
          "title": {
            "type": "string",
            "nullable": true,
            "description": "Agreement title."
          },
          "for": {
            "type": "string",
            "nullable": true,
            "description": "Who the agreement applies to."
          },
          "category": {
            "type": "string",
            "nullable": true,
            "description": "Agreement category."
          },
          "apply_for": {
            "type": "string",
            "nullable": true,
            "description": "Scope the agreement applies to."
          },
          "region": {
            "type": "string",
            "nullable": true,
            "description": "Region the agreement applies in."
          },
          "sites": {
            "type": "boolean",
            "nullable": true,
            "description": "Sites the agreement is shown on."
          },
          "courses": {
            "type": "array",
            "nullable": true,
            "description": "Programmes the agreement applies to."
          },
          "agreement_url": {
            "type": "string",
            "nullable": true,
            "description": "Link to the full agreement text."
          }
        },
        "x-zooza-resource": "Zooza\\Resource\\Agreement"
      },
      "Customer_Event": {
        "type": "object",
        "description": "A session as the customer sees it in the profile widget: whether it happened, can be cancelled or rescheduled, has video or files.",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "scheduled",
              "unplanned"
            ]
          },
          "date": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "happened": {
            "type": "boolean"
          },
          "live_stream": {
            "type": "integer"
          },
          "has_live_stream": {
            "type": "boolean"
          },
          "replacement": {
            "type": "boolean"
          },
          "type": {
            "description": "Attached to each row. Shape not yet documented."
          },
          "cancellation_reasoning_public": {
            "description": "Attached to each row. Shape not yet documented."
          },
          "end": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "duration": {
            "type": "integer"
          },
          "attending": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "capacity": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "event_number": {
            "type": "integer",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "trainer": {
            "type": "string",
            "nullable": true
          },
          "places": {
            "type": "object",
            "nullable": true,
            "description": "Venue of the session."
          },
          "courses": {
            "type": "object",
            "nullable": true,
            "description": "Programme of the session."
          },
          "trainers": {
            "type": "object",
            "nullable": true,
            "description": "Trainers of the session."
          },
          "cancellation_limit": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "can_cancel": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "can_reschedule": {
            "type": "boolean",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "reschedule_blocked_reason": {
            "type": "string",
            "nullable": true,
            "description": "Attached to each row. Shape not yet documented."
          },
          "additional_trainers": {
            "type": "array",
            "nullable": true,
            "description": "Additional trainers.",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string"
                },
                "full_name": {
                  "type": "string"
                }
              }
            }
          },
          "has_video": {
            "type": "boolean"
          },
          "has_files": {
            "type": "boolean"
          },
          "trainer_id": {
            "type": "integer",
            "description": "Only returned by some query variants (e.g. export)."
          },
          "summary_public": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          },
          "company_name": {
            "type": "string",
            "nullable": true,
            "description": "Only returned by some query variants (e.g. export)."
          }
        }
      },
      "GatewayError": {
        "type": "object",
        "description": "Returned by the gateway for 401, 403, 422 and 429. Errors from the Zooza API itself keep their own envelope.",
        "properties": {
          "error": {
            "type": "string",
            "example": "validation_failed"
          },
          "message": {
            "type": "string"
          },
          "request_id": {
            "type": "string",
            "description": "Also returned as the X-Request-Id header. Quote it in support requests."
          },
          "errors": {
            "type": "array",
            "description": "Present on 422. Lists every problem found, not only the first.",
            "items": {
              "type": "object",
              "properties": {
                "location": {
                  "type": "string",
                  "enum": [
                    "body",
                    "query",
                    "path"
                  ]
                },
                "path": {
                  "type": "string",
                  "description": "JSON Pointer into the body, or the parameter name."
                },
                "code": {
                  "type": "string",
                  "enum": [
                    "required_missing",
                    "type_invalid",
                    "enum_invalid",
                    "format_invalid",
                    "pattern_mismatch",
                    "minimum",
                    "maximum",
                    "min_length",
                    "max_length",
                    "min_items",
                    "max_items",
                    "unknown_field",
                    "invalid"
                  ]
                },
                "message": {
                  "type": "string"
                },
                "expected": {
                  "type": "object"
                },
                "received": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "The request failed. HTTP 400 with the error codes and localised messages.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-ZOOZA-API-KEY",
        "description": "Applications's API key. API key can be found in Settings > Registration forms\n"
      },
      "token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-ZOOZA-TOKEN"
      },
      "company": {
        "type": "apiKey",
        "in": "header",
        "name": "X-ZOOZA-COMPANY"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "The `access_token` returned by `POST /v3/token`."
      }
    }
  },
  "x-zooza-tiers": {
    "free": {
      "points_per_minute": 60,
      "points_per_day": 1000
    },
    "standard": {
      "points_per_minute": 300,
      "points_per_day": 20000
    },
    "partner_xl": {
      "points_per_minute": 1200,
      "points_per_day": 100000
    }
  }
}