# Zooza Developer Docs — Full Text > Zooza is ready-made backend infrastructure for businesses that run classes, > courses and activities (kids' clubs, swimming, dance, music, sports, language > schools, franchises). Instead of building booking and billing logic from > scratch, developers build their own websites, forms and apps on top of the > Zooza REST API and embeddable widgets. Zooza already handles the parts that are hard to get right: - Class booking and registration forms, including trial classes and waiting lists - Make-up sessions: entitlement, capacity and expiry rules enforced automatically - Installments, subscriptions and recurring payments, with Stripe and GoCardless integrations - Integrations with accounting and local payment systems - Class and course listings, schedules, venue and franchise maps - Multi-company networks (franchises, multi-brand operators) Getting access is self-serve: create a free Zooza account at https://signup.zooza.online, then a company owner creates an API key in the Zooza app under Developers > API keys. Widgets only need the widget API key shown in the Zooza admin under Team & Settings > Publish. The API runs in three regions (Europe, UK, UAE) with stable, versioned endpoints described by an OpenAPI 3.0 spec. Machine-readable API reference (OpenAPI 3.0, one per region): https://api.zooza.app/v3/openapi.json (EU), https://uk.api.zooza.app/v3/openapi.json (UK), https://asia.api.zooza.app/v3/openapi.json (ASIA) --- # Concepts & glossary This page defines the key terms and concepts used across Zooza. Many API field names differ from the labels shown in the Zooza app — this glossary maps both. ## Core entities ### Programme (course) A programme is the top-level entity — what a business sells (e.g. "Beginners Swimming", "Yoga for Adults"). - **API field:** `course` / `course_id` - The API uses the term **course**, while the Zooza app UI shows **programme**. ### Class (group) A class is a scheduled instance of a programme, with a specific location, instructor, and capacity. - **API field:** `schedule` / `schedule_id` - Example: "Monday 9:00 AM at Main Hall — max 10 participants" ### Session (lesson/event/term) A session is an individual occurrence within a class — one specific meeting. - **API field:** `event` / `event_id` ### Place (location/venue) A physical address or facility where sessions take place. - **API field:** `place_id` ### Room An optional subdivision of a place (e.g. "Studio A" within a sports centre). - **API field:** `room_id` - In widget URLs, rooms are encoded as `place_id` + `_` + `room_id` (e.g. `123_0` means place 123, no specific room). ### Blocks (segments) Blocks are subdivisions of sessions within a class. They are used for partial registration or split payments — for example, splitting a year-long course into semesters. - **Blocks** and **segments** are the same thing. - Related enum: `registration_display_mode` --- ## Registration and booking concepts ### Registration types | Type | Description | |------|-------------| | **Single event** | One-off session booking | | **Full term** (`full2`) | Registration for the entire class duration. Most common for ongoing courses. | | **Open registration** | Ongoing flexible attendance, pay per session | ### Trials Trials let clients experience a course before committing. - Can be free or paid - Can cover one or multiple sessions - Available only for **full term** courses ### Make-up sessions A make-up session is a replacement lesson — clients can attend a different session when they miss their regular one. Make-up sessions are managed through the [Profile widget](widgets/profile-widget.md). ### Payment schedules | Type | API value | Description | |------|-----------|-------------| | One-time | `single_payment` | Single upfront payment | | Periodic pre-paid | `in_advance` | Recurring payments billed in advance | | By attendance | `by_attendance` | Pay per attended session | | Pay as you go | `pay_as_you_go` | Per-session payment | **Frequency values:** `monthly`, `quarterly`, `half_yearly`, `yearly`, `after_events`, `absolute`, `segments` ### Billing periods Billing periods are organizational time periods for grouping courses (e.g. "Autumn 2024", "Summer Camps 2025"). They are visible to organizers only, not to customers. --- ## Platform concepts ### Company A company is the business running Zooza, identified by `company_id`. A single user can belong to multiple companies with different roles. ### API keys Zooza uses **two distinct types of API keys** that are not interchangeable: | Key type | Where to find it | Used for | |----------|-----------------|----------| | **Widget API key** | **Team & Settings > Publish** — displayed for each widget | Embedding widgets on your website | | **API key** (`client_id` + `client_secret`) | Created by a company owner in the Zooza app under **Developers → API keys**. The secret is shown once | Your server's access to the REST API, via short-lived access tokens | :::warning A widget API key **cannot** be used for REST API calls, and vice versa. They serve completely different purposes. ::: ### Widgets vs REST API **Widgets** are pre-built embeddable components (registration forms, calendars, profiles, etc.) that you place on your website using a script tag. Widgets require no authentication — just your widget API key in the embed code. **The REST API** gives you full programmatic access to Zooza data. Use it for: - Admin and back-office applications - Customer-facing websites that need custom UI (e.g. caching classes and courses, building custom customer journeys) - Automated workflows and data synchronisation Your server exchanges an API key for a short-lived access token and sends it as `Authorization: Bearer `. See [Authentication](api/authentication.md) for details. ### Widget group A widget group is a set of widgets sharing the same widget API key. One group per domain is recommended. --- ## Terms in other languages Zooza runs in many markets, and clients, staff and search queries use local words for the same concepts. Use this table to map a local term to the English name used in these docs and to the API name. | English (docs) | API | Slovak | Czech | Polish | German | French | |---|---|---|---|---|---|---| | Programme | `course` | Program / Kurz | Kurz | Program | Programm / Kurs | Programme | | Class | `schedule` | Skupina / Lekcia | Skupina / Lekce | Grupa | Gruppe / Kurs | Classe | | Session | `event` | Termín / Hodina / Lekcia | Termín / Hodina / Lekce | Termin / Zajęcia | Termin / Stunde / Einheit | Séance | | Booking | `registration` | Prihlásenie / Zápis / Registrácia | Přihlášení / Zápis / Registrace | Rezerwacja / Zapis | Buchung / Anmeldung | Réservation | | Client | `user` | Klient / Zákazník | Klient / Zákazník | Klient | Kunde / Klient | Client | | Instructor | `trainer` | Lektor | Lektor | Instruktor | Kursleiter | Instructeur | | Venue | `place` | Miesto / Sála / Prevádzka | Místo / Sál / Provozovna | Miejsce | Standort / Ort / Halle | Lieu | | Trial session | `trial` | Skúšobná hodina | Ukázková / Zkušební hodina | Lekcja próbna | Probestunde / Schnupperstunde | Séance d'essai | | Make-up session | `replacement` | Náhradná hodina / Náhrada / Náhradka | Náhradní hodina / Náhrada | Termin zastępczy | Ersatzstunde / Nachholtermin | Séance de rattrapage | | Waiting list | `waitlist` | Čakacia listina / Poradovník | Čekací listina / Pořadník | — | Warteliste | — | | Block | `segment` | Blok | Blok | Blok | Block | Bloc | | Payment plan | `payment_schedule` | Platobný plán | Platební plán | Plan płatności | Zahlungsplan | Plan de paiement | | Aliquot (pro-rated price) | `aliquot` | Alikvóta / alikvótna suma | Alikvota | Płatność proporcjonalna | Anteilige Zahlung | — | | Membership / subscription | — | Členstvo / Predplatné | Členství / Předplatné | Członkostwo | Mitgliedschaft / Abo | Abonnement | :::note Make-up session ≠ free credits A make-up session replaces a session the client missed. Free credits are extra sessions granted on top of a booking. They are different features in Zooza, even though some operators use the words loosely. ::: --- ## API regions | Region | Base URL | |--------|----------| | Europe | `https://api.zooza.app` | | UK | `https://uk.api.zooza.app` | | UAE | `https://asia.api.zooza.app` | --- # Quickstart Zooza offers two integration approaches. Choose the one that fits your needs — or use both. --- ## Widgets quickstart ### Embed your first widget (5 min) Widgets are pre-built Zooza components that you embed directly on your website. No authentication or server code required. #### Prerequisites - A Zooza account with at least one programme - An HTTPS website to embed on #### Step 1: Get your widget API key 1. Log into the [Zooza app](https://zooza.app). 2. Go to **Team & Settings > Publish**. 3. Click on your widget name to open the detail view. 4. Copy your **API key**. ![Publish screen in Zooza](/img/publish-widgets.png) #### Step 2: Add the embed code Paste these two lines into your HTML page where you want the registration form to appear. Replace `YOUR_API_KEY` with your actual widget API key, and `ZOOZA_API_URL` with your [region's base URL](concepts.md#api-regions). ```html
``` For the Europe region, `ZOOZA_API_URL` is `https://api.zooza.app`. :::tip Load faster from the head You can move the loader ` Tasks: 1. Tell me where to place this snippet on my page. Both lines can stay together in the , or the loader ``` Replace `YOUR_API_KEY` with the widget key from **Team & Settings > Publish**, and use your region's API URL for the loader. ### What each setting does | Setting | Why it's here | |---|---| | [`multi_step_form`](../widgets/registration-widget.md#multi_step_form) | Splits the form into steps, so each screen asks for one thing. | | [`registration_display_mode`](../widgets/registration-widget.md#registration_display_mode) `trials_only` | Hides full-term and block registration. Trials must be enabled in the programme settings. | | [`course_list_display`](../widgets/registration-widget.md#course-list-display) `grid` + [`course_list_columns`](../widgets/registration-widget.md#course-grid-columns) `2` | Shows programmes (age groups) as tiles instead of a dropdown. | | [`course_list_collapse_on_select`](../widgets/registration-widget.md#course_list_collapse_on_select) / [`schedule_list_collapse_on_select`](../widgets/registration-widget.md#schedule_list_collapse_on_select) `false` | Keeps all tiles on screen after a selection. | | [`translations`](../widgets/registration-widget.md#translations) | Renames individual labels. Turn on [`print_debug`](../widgets/registration-widget.md#print_debug) to find the keys. | ## Variations - **Only some programmes on this page:** add [`course_ids`](../widgets/registration-widget.md#course_ids), for example `course_ids: [ 101, 102 ]` in the same object. Use the `widgets.registration` form or the `data-zooza-course-ids` attribute: with the placeholder embed, a flat `window.ZOOZA.course_ids` is ignored. - **One page per city:** add [`place_ids`](../widgets/registration-widget.md#place_ids), so each landing page shows only the venues in that city. - **No custom script at all:** every setting above except `translations` also works as a `data-zooza-*` attribute on the placeholder. See [embed methods](../widgets/embed-methods.md#configuring-a-widget-on-the-placeholder). {`I want a "Book a trial" page on my website for my kids' activity business, using the Zooza registration widget. Read the Zooza docs first: https://docs.zooza.online/llms-full.txt Use this example as the pattern: https://docs.zooza.online/examples/multi-step-trial-booking/ Tasks: 1. Create the page with the registration widget embed (multi_step_form, registration_display_mode 'trials_only', course grid with 2 columns, tiles kept visible after selection). 2. Ask me for my widget key and my region (Europe / UK / UAE) before writing the final snippet. 3. Match the page's heading and intro text to my site's tone.`} --- # Branded course and session tiles ## The problem The booking form is often the first part of your site that looks "different". Parents notice when the fonts, colours and card style change halfway through booking. You want the form to look like the rest of the site while Zooza keeps handling capacity, pricing, trials and payment. ## How it looks ![Branded booking widget: illustrated programme tiles with duration, and class tiles with price and availability](/img/examples/branded-booking-tiles.png) ## Two levels of customisation | Level | Effort | You control | |---|---|---| | **1. CSS on top of the default tiles** | Minutes | Colours, fonts, borders, spacing, grid | | **2. Your own tile templates** | An hour | Everything inside each tile: images, copy, badges, buttons | Both levels keep the widget's own logic: the tile wrapper, selection, collapse and the rest of the booking flow. ## Level 1: CSS only Little Movers uses a plum and sunshine-yellow palette with rounded cards. Scope your rules to your own placeholder so they never leak into the rest of the page: ```html
``` ```css .lm-booking { --lm-plum: #5b2a86; --lm-plum-dark: #431f63; --lm-sun: #ffc83d; --lm-line: #e6dcef; --lm-radius: 18px; font-family: "Nunito", system-ui, sans-serif; color: #2d2338; } /* Programme (age group) tiles */ .lm-booking .zooza_courses_course { border: 1.5px solid var(--lm-line); border-radius: var(--lm-radius); padding: 1.25rem; background: #fff; transition: border-color .15s, box-shadow .15s; } .lm-booking .zooza_courses_course:hover { border-color: var(--lm-plum); box-shadow: 0 6px 18px rgba(91, 42, 134, .12); } .lm-booking .zooza_courses_course.selected { border-color: var(--lm-plum); background: #faf6fd; } /* Class tiles */ .lm-booking .zooza_schedules_schedule { border: 1.5px solid var(--lm-line); border-top: 4px solid var(--lm-sun); border-radius: var(--lm-radius); padding: 1rem 1.25rem; } /* Select / Choose buttons */ .lm-booking .zooza_courses_course_select, .lm-booking .zooza_schedules_schedule_select { border-radius: 999px; border: 2px solid var(--lm-plum); background: transparent; color: var(--lm-plum); font-weight: 700; padding: .5rem 1.25rem; } .lm-booking .zooza_courses_course_select:hover, .lm-booking .zooza_schedules_schedule_select:hover { background: var(--lm-plum); color: #fff; } ``` The `selected` class is added to the chosen tile when [`course_list_collapse_on_select`](../widgets/registration-widget.md#course_list_collapse_on_select) is `false`. For other parts of the form, download the widget's default stylesheet and start from its selectors, as described in [Use CSS](../widgets/registration-widget.md#use-css). ### Without touching the website: custom CSS in the Zooza admin If you can't edit the site's stylesheet, for example on a hosted website builder, paste the same CSS into **Publish > Widget > Custom CSS** in the Zooza admin. The widget loads it after its default styles, so plain overrides win. - **One stylesheet serves both the registration and the profile widget**, so put the rules for both in the same file and scope them by each widget's classes. - Prefix rules with `div.zooza` (the widget's root) instead of your own placeholder class, because the stylesheet doesn't know your markup. - Define your palette once as CSS variables on `div.zooza` and reuse them. - Leave `font-family` alone if the site's fonts should apply. The widget inherits the page font by default. ## Level 2: your own tile templates To change what's *inside* a tile, register [`render_course_tile`](../widgets/registration-widget.md#render_course_tile) and [`render_schedule_tile`](../widgets/registration-widget.md#render_schedule_tile). Your function returns the tile's inner HTML. The widget keeps the wrapper, selection and booking flow. Little Movers stores two pieces of public [metadata](../widgets/registration-widget.md#metadata_in) on each programme in Zooza: `thumbnail` (an image URL) and `duration` (minutes, as an `int`). The tiles use both: ```html
``` ```css .lm-course { display: flex; flex-direction: column; height: 100%; } .lm-course__thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px 14px 0 0; } .lm-course__body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; } .lm-course__title { margin: 0; font-size: 1.15rem; color: var(--lm-plum); } .lm-course__duration { margin: 0; font-weight: 700; } .lm-course__desc { margin: 0; color: #6a5f74; flex: 1; } .lm-session__date { margin: 0; font-weight: 800; color: var(--lm-plum); } .lm-session__meta, .lm-session__price { margin: .25rem 0; } .lm-button { align-self: flex-start; margin-top: .5rem; } ``` ### Why it's built this way - **The buttons carry the widget's class hooks** (`zooza_courses_course_select`, `zooza_schedules_schedule_select`). The widget handles the click, so you write no event listeners. Without them, the widget appends its own default button. - **Only stable fields are used**: `name`, `description`, `metadata` on the course and the `get_*_formatted()` getters on the schedule. Anything else is internal and may change. - **Data is escaped** before it goes into HTML. Programme names and descriptions are written by staff in the Zooza admin, and the page should not trust them as markup. - **Callbacks are registered on `window.ZOOZA.widgets.registration` before the loader runs**, so they reach the registration widget only, even with other Zooza widgets on the page. Merging into existing objects (`reg.callback || {}`) keeps other scripts' settings intact, for example a WordPress plugin's. - Registering `render_course_tile` switches the course list to grid mode automatically. ## Variations - **Badges from metadata:** add `age_from`/`age_to` or `level` metadata and render them as pills. Filter the same keys with [`metadata_in`](../widgets/registration-widget.md#metadata_in). - **Separators between weeks or terms:** use [`schedule_list_rendered`](../widgets/registration-widget.md#schedule_list_rendered) to insert headings between groups of classes. - **Trial-only page:** combine with the [multi-step trial booking](./multi-step-trial-booking.md) settings. {`I want the Zooza registration widget on my site to match my design. Read the Zooza docs first: https://docs.zooza.online/llms-full.txt Use this example as the pattern: https://docs.zooza.online/examples/branded-booking-tiles/ Tasks: 1. Inspect my site's design tokens (colours, fonts, radius, button style). 2. Level 1: write scoped CSS for the course and class tiles and their Select/Choose buttons. 3. If I want images or extra info on tiles, write render_course_tile / render_schedule_tile callbacks that read course metadata, escape all data, and use the zooza_*_select class hooks for buttons. 4. Ask me which metadata keys my programmes have before using them.`} --- # Age-group tabs as the course selector ## The problem Parents don't think in programme names. They think *"my daughter is six"*. A drama or sports school with one programme per age band wants the first thing on the form to be a simple row of ages, not a list of programme descriptions. ## What you'd have to build yourself A custom selector that loads programmes, maps them to ages, loads the classes of the selected one, and then hands over to booking with the right ids. With Zooza you keep the widget's booking flow and only change how programmes are **displayed**. ## How it looks ![Age tabs 3–4, 5–7, 8–10, 11–13, 14–18 above a list of classes for the selected age, each showing its date range](/img/examples/age-tabs.png) A row of tabs labelled by age: **3–4 · 5–7 · 8–10 · 11–13 · 14–18 years**. Selecting a tab highlights it and shows that age group's classes below. Each class tile shows only its date range and a **Choose** button. The tabs stay visible, so switching age is one click. ## Set-up in Zooza Give each programme a public [metadata](../widgets/registration-widget.md#metadata_in) entry `age` with the label you want on the tab, for example `5-7`. Order the programmes in the admin from youngest to oldest, or pass them in order with [`course_ids`](../widgets/registration-widget.md#course_ids). ## The code ```html
``` ```css /* Turn the course grid into a tab strip */ .lm-age .zooza_courses_course { padding: 0; border: 0; background: none; } .lm-tab { width: 100%; display: flex; flex-direction: column; align-items: center; padding: .8rem .5rem; border: 2px solid #e6dcef; border-radius: 14px; background: #fff; color: #5b2a86; font-weight: 800; cursor: pointer; } .lm-tab__age { font-size: 1.4rem; line-height: 1.1; } .lm-tab__unit { font-size: .75rem; font-weight: 600; opacity: .7; } .lm-age .zooza_courses_course.selected .lm-tab { background: #5b2a86; border-color: #5b2a86; color: #fff; } .lm-dates { margin: 0; font-weight: 800; color: #5b2a86; } .lm-cap { margin: .25rem 0 .6rem; color: #6a5f74; } ``` ### Why it's built this way - **The tab *is* the select control.** It carries `zooza_courses_course_select`, so the widget handles the click and loads that programme's classes. You write no click handlers. - **[`course_list_collapse_on_select: false`](../widgets/registration-widget.md#course_list_collapse_on_select)** keeps all tabs on screen and adds `selected` to the active one, which is what a tab strip needs. - **The age comes from metadata**, so staff change labels in Zooza without touching the website. - Only public, documented members are used. There are no internal widget elements or DOM observers, so the example survives widget updates. ## Variations - **Language versions:** run one page per language and filter its classes with [`labels_in`](../widgets/registration-widget.md#labels_in), for example `labels_in: ['english']`. - **Variant under the age:** add a second metadata key (for example `track`: *stage* / *film*) and print it as a small line in the tab. - **Multi-step:** add [`multi_step_form: true`](../widgets/registration-widget.md#multi_step_form) to put the tabs on step 1 on their own. {`I want parents to pick their child's age first on my Zooza booking form. Read: https://docs.zooza.online/examples/age-tabs/ and https://docs.zooza.online/widgets/registration-widget/ Tasks: 1. Ask me for my age bands and the metadata key holding them on each programme. 2. Configure course_list_collapse_on_select false and render_course_tile returning a tab with the zooza_courses_course_select class. 3. Add a simple render_schedule_tile with date range and capacity. 4. Write CSS that turns the course grid into a tab strip matching my site; escape all data in templates.`} --- # Block packages with selection limits ## The problem Some programmes aren't one class you join for a whole term. A dance school runs a season of short **blocks**: three technique blocks, two repertoire blocks, two choreography blocks. Students buy a **package** that defines the mix: *Starter* gets one of each, *Plus* gets two technique blocks, *Pro* gets two technique and two choreography blocks. Parents need to see the blocks grouped so the choice makes sense, and the form has to stop them from choosing more than their package allows. ## What you'd have to build yourself - Blocks with their own dates, price and capacity inside one class, plus pricing for any combination. - Live availability per block, including blocks that free up later in the season. - A booking form that handles several blocks in one order. - The package rules on top. Zooza already sells classes in [Blocks](../concepts.md#terms-in-other-languages) with per-block capacity and pricing. This example only adds the **grouping** and the **package limits**, using the registration widget's block callbacks. ## How it looks ![Block list grouped into Technique, Repertoire and Choreography with a Starter / Plus / Pro package switch; blocks over the package limit are greyed out](/img/examples/block-packages.png) Above the list sits a package switch: **Starter · Plus · Pro**. Below it, blocks appear under three headings. When the parent reaches the limit for a category, the remaining blocks in it are greyed out with a short note. Deselecting a block enables them again. Switching package clears the selection. ## The code ```html
``` ```css .lm-packages { display: flex; gap: .5rem; margin-bottom: 1rem; } .lm-packages button { border: 2px solid #5b2a86; background: #fff; color: #5b2a86; border-radius: 999px; padding: .45rem 1.1rem; font-weight: 700; } .lm-packages button[aria-pressed="true"] { background: #5b2a86; color: #fff; } .lm-group { margin: 1.25rem 0 .5rem; color: #5b2a86; } .zooza_segments_segment.lm-locked { opacity: .45; } .zooza_segments_segment.lm-locked a.zooza_button { display: none; } .zooza_segments_segment.lm-locked::after { content: "Package limit reached"; display: block; font-size: .85rem; margin-top: .4rem; } ``` ### Why it's built this way - **[`segment_list_rendered`](../widgets/registration-widget.md#segment_list_rendered)** tags each tile with its category from the block name, then regroups the tiles under headings. `segments[ i ]` matches the i-th tile, so tagging happens before anything moves. - **[`on_segment_selected`](../widgets/registration-widget.md#on_segment_selected)** fires after every select and deselect, so the limits are re-evaluated after each click. - **Locked blocks only hide the widget's `a.zooza_button`.** Nothing about the booking changes, so price and availability still come from Zooza. - **Switching package clicks the widget's own buttons** to deselect, so the widget's price and form stay correct. - **The handler is idempotent** and chains any `on_segment_selected` handler that was already registered. :::caution Limits are a front-end rule The package limits live in your page, not in Zooza. If a package must also be enforced on payment, for example a different price per package, model it in Zooza as well: use separate programmes or price rules, and use this page for the guided selection. ::: ## Variations - **Category from metadata instead of names:** use [`render_segment_tile`](../widgets/registration-widget.md#render_segment_tile) to print a badge per block, and keep the category list in your CMS keyed by block id. - **Show "frees up on …" for full blocks:** read `segment.earliest_available_date` in `render_segment_tile`. - **One package per page:** drop the switch and set `state.pkg` from the URL. {`My Zooza class is sold in blocks (registration_display_mode 'segments_only'). I want blocks grouped by category and package-based limits. Read: https://docs.zooza.online/examples/block-packages/ and the block callbacks in https://docs.zooza.online/widgets/registration-widget/ Tasks: 1. Ask me for my block categories (and how to recognise them in block names) and my packages with per-category limits. 2. Implement segment_list_rendered (grouping + package switch, idempotent) and on_segment_selected (re-apply limits), chaining existing callbacks. 3. Only hide a.zooza_button on locked blocks; clear the selection by clicking the widget's own buttons. 4. Style it to match my site.`} --- # Parent zone designs ## The problem After the first booking, the parent zone is the page parents use most. They check when the next session is, say a child can't come, book a make-up, pay an instalment, or download a document. It has to feel like part of your website, work on a phone, and show the logged-in parent everywhere on the site, not only on that one page. ## What you'd have to build yourself Login without passwords, family accounts with several children, bookings, cancellations within your deadlines, make-ups, payment plans and receipts, documents, plus all the emails around them. The Zooza [profile widget](../widgets/profile-widget.md) does all of it. You decide how it looks and where it sits. ## The embed The same two lines for every variant below: ```html
``` Set the page address in **Publish > Widget > Profile > [URL](../widgets/profile-widget.md#url)**, so the emails and the other widgets link parents back to it. Everything else is design. ## Variant A: playful dashboard page ![Little Movers parent zone: welcome heading, child switcher chips, a payment-due alert and a make-up-available alert, upcoming sessions and bookings in rounded cards](/img/examples/profile-dashboard-movers.png) A full-width page that matches a colourful brand: big welcome heading, rounded cards, soft shadows. The child switcher, alerts (payment due, make-up available), upcoming sessions and bookings all come from the widget. Only the heading above it is your own HTML. ```html

Parent zone

Your classes

``` ```css .lm-parent-zone { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 4rem; } /* Theme the widget's dashboard */ .lm-parent-zone div.zooza { --z2-bg: transparent; --z2-surface: #ffffff; --z2-text: #2d2338; --z2-border: #e6dcef; --z2-border-soft: #f1eaf7; --z2-radius: 18px; --z2-gap: 16px; --z2-pad: 18px; --z2-shadow: 0 8px 24px rgba(91, 42, 134, 0.10); --z2-warn-bg: #fff4e0; --z2-warn-border: #f3d39a; --z2-ok-bg: #e9f8f0; --z2-ok-border: #b7e4cb; --z2-badge-bg: #f5eefb; --z2-badge-border: #e6dcef; } ``` ## Variant B: minimal account area with a header menu ![Studio Nord account page: serif heading, a site sidebar with Overview, Lessons, Payments, Make-ups and Documents, flat line-based lists, and a header dropdown with the parent's name and a Log out link](/img/examples/profile-account-nord.png) A calm, editorial look: no shadows, square corners, hairline borders. The parent's name stays in the site header on **every page**, with a **Log out** link, using the widget's [login events](../widgets/profile-widget.md#events). ```css .nord-account div.zooza { --z2-bg: transparent; --z2-surface: transparent; --z2-border: #dcd9cf; --z2-border-soft: #dcd9cf; --z2-shadow: none; --z2-radius: 0; --z2-gap: 0; --z2-pad: 14px; --z2-badge-bg: transparent; --z2-badge-border: #2f6f5e; } ``` The header menu works on any page of the site, even where the widget isn't embedded: ```html ``` The page around the widget (the sidebar with Overview, Lessons, Payments and so on) is your own navigation. Point its links to sections of your site, or keep a single account page and use the sidebar for help, contact and FAQs. ## Variant C: mobile first ![Splash Academy parent zone on a phone: dark header with "Hi Sara", swimmer switcher chips, the next lesson, a yellow make-up alert, payment status and a More sheet](/img/examples/profile-mobile-splash.png) Parents of swimmers check the app at the poolside, on a phone. Give the widget the full width on small screens, use larger touch targets, and let one bold colour carry the brand. ```css .splash-account div.zooza { --z2-bg: #eef8fc; --z2-surface: #ffffff; --z2-text: #0b2e59; --z2-border: #cfe6f1; --z2-radius: 12px; --z2-radius-sheet: 22px; --z2-pad: 14px; --z2-ok-bg: #fff4c2; --z2-ok-border: #ffd23f; --z2-overlay: rgba(11, 46, 89, 0.55); } @media (max-width: 640px) { /* Edge to edge on phones: drop your page's side padding around the widget */ .splash-account { padding-left: 0; padding-right: 0; } .splash-account div.zooza { --z2-gap: 12px; } } ``` ## Tips for every variant - **Put the profile on one page** and set that page's URL in the widget settings. The registration and checkout widgets, and Zooza's emails, send parents there. - **Link to it from your main navigation** ("Parent zone", "My account"). Returning parents look for it in the header. - **Use the variables first.** They cover colours, borders, corners, spacing and the alert colours. Use other CSS rules only for details the variables don't reach, and expect to revisit those after widget updates. - **Pair it with your chatbot:** the [AI chatbot example](./chatbot-logged-in-client.md) uses the same login events to greet the logged-in parent. {`I want a parent zone (customer profile) page on my website with the Zooza profile widget, matching my design. Read: https://docs.zooza.online/examples/parent-zone/ and https://docs.zooza.online/widgets/profile-widget/ Tasks: 1. Ask me for my widget key, region and the page URL; remind me to set the URL in Publish > Widget > Profile. 2. Inspect my site's design tokens and set the --z2-* theme variables on div.zooza to match (colours, borders, radius, spacing, alert colours). 3. Add a header account menu that shows the logged-in parent on every page (localStorage zooza_user, zooza_user_logged_in / zooza_user_logged_out) with a Log out link using zooza_user_force_logout. 4. Make it work well on phones.`} --- # Contact and lead form designs ## The problem Not every parent is ready to book. Many want to ask first: *"Which group is right for my 4-year-old?"*, *"Is there space at the pool near us?"*. Those questions are leads. They should land in the same system as your bookings, with the source campaign attached, so someone follows up and the enquiry turns into a trial booking. ## What you'd have to build yourself A form backend with validation and spam protection, consent records, campaign attribution (UTM, click ids, the first page the visitor came from), notifications, an owner and a to-do for each enquiry, an automatic reply, and analytics events. The Zooza [contact widget](../widgets/contact-widget.md) handles this, and enquiries arrive as contacts in Zooza. You choose the fields in **Settings > Contact forms** and the design on your site. ## The embed ```html
``` `config_id` picks which form configuration (fields, consents, after-submit behaviour) to show. Leave it out to use the default one. Add every domain the form runs on under [Additional domains](../widgets/contact-widget.md#additional-domains). The form is styled with **theme variables** on `.zooza-contact-widget`. Every default rule has zero specificity, so your CSS always wins without `!important`. See the [full list of variables and class names](../widgets/contact-widget.md#styling). ## Variant A: split landing page for trial enquiries ![Little Movers landing page: headline "Tell us about your child" with three steps on the left, and a rounded form card with name, email (with a typo suggestion), phone, child's age, message, consents and an orange Send enquiry button on the right](/img/examples/contact-split-movers.png) For paid campaigns: the promise and the steps on the left, the form on the right, visible without scrolling. The form asks only what a coach needs to call back, and a custom **Child's age** drop-down is set up in the form configuration. ```html

Not sure which class?

Tell us about your child and we'll suggest the right group

  1. We match your child's age and experience to a class.
  2. You get a free trial session at a venue near you.
  3. Book the full term only if your child loves it.

Ask about a class

``` ```css .lm-enquiry { display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: 3rem; align-items: start; } @media (max-width: 860px) { .lm-enquiry { grid-template-columns: 1fr; } } .lm-enquiry__form { background: #fff; border: 1.5px solid #e6dcef; border-radius: 18px; padding: 1.5rem; box-shadow: 0 8px 24px rgba(91, 42, 134, .10); } .lm-enquiry .zooza-contact-widget { --zooza-font-family: inherit; --zooza-accent: #ff8a6b; --zooza-border-color: #e6dcef; --zooza-border-width: 1.5px; --zooza-radius: 11px; --zooza-control-background: #fff; --zooza-control-padding: .65em .8em; --zooza-gap: .9em; --zooza-max-width: 100%; --zooza-error-color: #c2410c; } .lm-enquiry .zooza-contact-button__primary { width: 100%; border-radius: 999px; background: #ff8a6b; border-color: #ff8a6b; color: #fff; font-weight: 700; } ``` Turn on **Remember where the visitor first came from** in the configuration if the ad sends visitors to another page first. The UTM parameters are then kept with the enquiry. Do this only with consent from your cookie banner, see [Attribution](../widgets/contact-widget.md#attribution). ## Variant B: minimal footer form ![Studio Nord footer on a near-black background: "Questions?" with the studio address on the left, and a form with underline-only inputs for name, email and message, a consent checkbox and an outlined uppercase Send button on the right](/img/examples/contact-footer-nord.png) One short form in the footer of every page: name, email and message, nothing else. On a dark background the form inherits the light text colour, and underline-only inputs keep it quiet. ```css .nord-footer .zooza-contact-widget { --zooza-text-color: #e9e7e0; --zooza-accent: #ffffff; --zooza-border-color: #77756d; --zooza-radius: 0; --zooza-control-padding: .5em 0; --zooza-control-background: transparent; --zooza-max-width: 100%; --zooza-success-color: #c9b27c; } .nord-footer .zooza-contact-input, .nord-footer .zooza-contact-textarea { border-width: 0 0 1px; /* underline only */ } .nord-footer .zooza-contact-label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #8f8c83; } .nord-footer .zooza-contact-button__primary { background: transparent; border: 1px solid #fff; color: #fff; letter-spacing: .08em; text-transform: uppercase; } ``` Create a separate, short configuration for the footer (for example `config_id` 14 with only name, email and message), so footer enquiries are easy to tell apart in reports. ## Variant C: one form per venue, with hidden fields ![Splash Academy venue page for Bayside Pool with facts and a map, a form "Ask about lessons at Bayside" with a custom question "Can your child swim 10 metres?", and next to it the success state "Thanks, Sara!" in a bordered card](/img/examples/contact-location-splash.png) A swim school with many pools wants every enquiry tagged with the pool, without a separate form for each one. One configuration has a **hidden field** whose value source is the embed code attribute `location`. Each venue page passes its own value: ```html
``` Style the success state too. The widget root carries `data-status="success"` after a successful send: ```css .splash-venue .zooza-contact-widget { --zooza-accent: #19b5d8; --zooza-border-color: #cfe6f1; --zooza-radius: 12px; --zooza-control-background: #fff; --zooza-max-width: 100%; } .splash-venue .zooza-contact-button__primary { width: 100%; background: #19b5d8; border-color: #19b5d8; color: #fff; font-weight: 800; } .splash-venue .zooza-contact-widget[data-status='success'] { padding: 2rem; border: 2px solid #19b5d8; border-radius: 12px; background: #dff2fa; text-align: center; } ``` Write the success text in the configuration (*"Thanks! We'll call you within one working day about lessons at Bayside Pool."*), or send visitors to a thank-you page. ## Track enquiries as conversions All variants push the same [analytics events](../widgets/contact-widget.md#analytics). Use `zooza_event_contact_form_submitted` as your lead conversion in Google Tag Manager, GA4 or Meta, and `zooza_contact_form_id` to compare the landing page, footer and venue forms. In Google Tag Manager, create a **Custom Event** trigger named `zooza_event_contact_form_submitted` and attach your GA4 or Google Ads conversion tag to it. Add a variable for `zooza_contact_form_id` to break leads down by form. The events never contain the visitor's name, email, phone or message. :::warning Don't reveal hidden elements The form contains elements that are hidden on purpose for spam protection. Don't add CSS that makes hidden inputs inside the widget visible. ::: {`I want a contact (lead) form on my website with the Zooza contact widget, styled to match my site. Read: https://docs.zooza.online/examples/contact-lead-forms/ and https://docs.zooza.online/widgets/contact-widget/ Tasks: 1. Ask me where the form goes (landing page, footer, venue pages) and which config_id to use. 2. Write the page section and CSS using the --zooza-* theme variables on .zooza-contact-widget and the zooza-contact-* classes; no !important. 3. If I have several venues or campaigns, use one configuration with a hidden field and data-zooza-field- per page. 4. Style the success state ([data-status='success']) and set up zooza_event_contact_form_submitted as my lead conversion.`} --- # Selling passes and vouchers with the checkout ## The problem Term bookings aren't the only thing an activity business sells. Drop-in classes need **class passes** ("10 classes, valid 6 months"), parents buy **gift vouchers** at Christmas, private lessons sell as **lesson cards**, and some studios sell recordings or documents. Each needs a clear price, maybe a payment plan, a payment, and the credit appearing in the parent's account straight away. ## What you'd have to build yourself Product and price management, options such as pack sizes and payment plans, card and bank payments, consents, receipts, invoices, and linking the purchase to the parent's account so it can be used to book. The Zooza [checkout widget](../widgets/checkout-widget.md) sells any product enabled for the checkout in the Zooza app, and the purchase shows up in the parent's [profile](./parent-zone.md). ## How it fits together ``` Your pricing page ──"Buy"──▶ /checkout/?product=ID&return_url=https%3A%2F%2F…%2Fparent-zone%2F │ checkout widget: option → details → payment ▼ Thank-you screen ──"Continue"──▶ return_url (parent zone) ``` ```html
``` The product comes from the page URL ([`product`](../widgets/checkout-widget.md#product)), not from the embed. Without it, the widget shows a list of all products. [`return_url`](../widgets/checkout-widget.md#return_url) sets where **Continue** leads after payment. It must be a full `https://` address on the same domain as the checkout or your profile widget, URL-encoded. ## Variant A: pricing page with "Buy" buttons ![Little Movers pricing page "Come when it suits you" with three cards — Single class £12, 10-class pass £99 or 3 × £33 monthly marked Most popular, and Holiday voucher £50 — each with a Buy button](/img/examples/checkout-pricing-movers.png) Your marketing page, in your own HTML, with one card per product. Each **Buy** button is a plain link to the checkout page: ```html

Single class

£12

Buy
Most popular

10-class pass

£99 or 3 × £33 monthly

Buy

Holiday voucher

£50

Buy
``` Keep the prices on this page in sync with the products in Zooza. The checkout always charges the price set in Zooza. If the pack offers a payment plan, the checkout lets the parent choose it. ## Variant B: product page with the checkout embedded ![Studio Nord 8-lesson card page: product description on the left, and on the right a square-cornered checkout with option rows (2 × €128 instalments or €248 now), buyer details on underline inputs, due-today total, Card / Bank transfer choice, consent and a green Pay button](/img/examples/checkout-embedded-nord.png) One page per product: the description on the left, the checkout beside it. The checkout follows the page's minimal style: square corners, hairlines and one accent colour. ```html

8-lesson card

Flexible private lessons in piano, violin or voice …

``` ```css .nord-product { display: grid; grid-template-columns: 1fr minmax(0, 560px); gap: 3.5rem; } @media (max-width: 900px) { .nord-product { grid-template-columns: 1fr; } } .nord-product .zooza-checkout-widget { --zooza-font-family: inherit; --zooza-accent: #2f6f5e; --zooza-border-color: #dcd9cf; --zooza-radius: 0; --zooza-gap: 1.1em; --zooza-max-width: 100%; background: #fff; border: 1px solid #dcd9cf; padding: 1.75rem; } .nord-product .zooza-checkout-heading { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #6b6a64; } .nord-product .zooza-checkout-button__primary { width: 100%; background: #2f6f5e; border-color: #2f6f5e; color: #fff; } /* Product options and payment methods still use older class names */ .nord-product .zooza-checkout-widget .zooza_service_option { border-radius: 0; } ``` Link this page with `?product=…` already in the URL, for example from your menu, so the right product is preselected. ## Variant C: branded thank-you screen ![Splash Academy thank-you screen: large aqua check mark, "You're all set, Sara!", order summary of a 6-swim pass, three next steps and a Continue to My account button](/img/examples/checkout-thankyou-splash.png) The moment after payment is the best time to tell parents what happens next. The widget root carries `data-status="thank_you"` on that screen, so you can restyle it into a celebration: ```css .splash-checkout .zooza-checkout-widget { --zooza-accent: #19b5d8; --zooza-border-color: #cfe6f1; --zooza-radius: 12px; } .splash-checkout .zooza-checkout-widget[data-status='thank_you'] { padding: 2.5rem 2rem; border-radius: 16px; background: linear-gradient(180deg, #dff2fa, #ffffff); text-align: center; } .splash-checkout .zooza-checkout-widget[data-status='thank_you'] .zooza-checkout-button__primary { background: #19b5d8; border-color: #19b5d8; color: #fff; border-radius: 12px; } ``` Put your own next steps (*"Open My account → pick a free session → see you at the pool"*) **around** the widget on the page, and show them only after payment: ```css .splash-next-steps { display: none; } .splash-checkout:has(.zooza-checkout-widget[data-status='thank_you']) .splash-next-steps { display: grid; } ``` ## Good to know - The checkout has **no coupon field**. Use discounts set up in Zooza, or sell vouchers as products. - Buyers enter email, first name, last name and phone. A free product asks only for the email. - Payment methods (card, online bank transfer, cash) depend on what the product allows. A single available method is preselected. - Each step has its own `data-status` (`loading`, `listing`, `data`, `payment`, `thank_you`, `error`) for step-specific styling. See [Styling](../widgets/checkout-widget.md#styling). {`I want to sell class passes / vouchers on my website with the Zooza checkout widget. Read: https://docs.zooza.online/examples/checkout-passes/ and https://docs.zooza.online/widgets/checkout-widget/ Tasks: 1. Ask me for my product ids, prices (for display only), widget key, region and my parent zone URL. 2. Build a pricing section with Buy links to /checkout/?product=ID&return_url=. 3. Create the /checkout/ page with the checkout embed (v1 loader) and style it with the --zooza-* variables on .zooza-checkout-widget and the zooza-checkout-* classes. 4. Style the thank-you step via [data-status='thank_you'] and add my next-steps block.`} --- # Calendar and timetable designs ## The problem A timetable answers the question parents ask most: *"What's on, when, and is there space?"*. It has to show live availability, react when a class fills up or a session is cancelled, and send the parent to booking with one click. And it should look like the rest of your site. ## What you'd have to build yourself A data feed of classes and sessions, availability that updates with every booking, cancelled sessions, filters by venue, programme and instructor, and links into booking. The Zooza [calendar widget](../widgets/calendar-widget.md) does this without a server. If you need a timetable that search engines can index, or a fully custom layout, build it from the REST API instead, as in [Weekly timetable with filters](./filtered-timetable.md). ## The embed ```html
``` Most of the design decisions below are **settings** in **Publish > Widget > Calendar**, so the same embed gives three very different timetables. ## Variant A: colourful week view with filters ![Little Movers week view: filter drop-downs for venue, programme and instructor, Monday to Saturday columns with tiles showing time, class, venue, instructor and availability text such as "Spots available" or "Last spot available", and a colour legend by age group](/img/examples/calendar-week-movers.png) The default **abstract week view** shows every running and upcoming class in a Monday-to-Saturday grid, without specific dates. That's ideal for "our regular weekly timetable". | Setting | Value | |---|---| | [Customize sessions shown in calendar](../widgets/calendar-widget.md#customize-sessions-shown-in-calendar) | System (default) | | [Availability](../widgets/calendar-widget.md#availability) | Text information: *"Last spot available"* | | [Show instructor](../widgets/calendar-widget.md#show-instructor) | On | | [Show course filtering](../widgets/calendar-widget.md#show-course-filtering) | On, filter by location, course and instructor | | [Show filter button](../widgets/calendar-widget.md#show-filter-button) | On, so the filters stay tucked away until needed | | [Use link to registration](../widgets/calendar-widget.md#use-link-to-registration) | On, so a tile opens the booking form | Colour-code the tiles by age group by adding a class from the programme name in [`event_tile_render`](../widgets/calendar-widget.md#event_tile_render): ```html ``` ```css .lm-tile { border-left: 5px solid #ff8a6b; border-radius: 12px; } .lm-tile--babies { border-left-color: #ffc83d; } .lm-tile--kids { border-left-color: #5b2a86; } ``` ## Variant B: classic month calendar ![Studio Nord month calendar for November 2026: a seven-column grid with dates, small session labels like "16:15 Piano F." and "18:00 Jazz", one session crossed out as cancelled, and today highlighted](/img/examples/calendar-month-nord.png) For one-off lessons, workshops and anything with specific dates, switch to the **classic calendar view** and show cancelled sessions, so parents see the gap instead of wondering. | Setting | Value | |---|---| | Customize sessions shown in calendar | **Custom selection** → *Session dates in current classes*, *Dates for future classes*, *Cancelled sessions*, *Classic calendar view* | | Availability | Do not show (private lessons) | | [Use link for more information](../widgets/calendar-widget.md#use-link-for-more-information) | On, so a tile opens the programme page on your site | Keep the styling quiet. Square corners, hairlines and one accent colour match an editorial site. Download the default stylesheet as described in [Use CSS](../widgets/calendar-widget.md#use-css) and override only colours, borders and fonts, scoped to your page: ```css .nord-schedule div.zooza { font-family: inherit; color: #1d1d1b; } /* Then copy the grid and tile selectors you need from the default stylesheet and override only their colours, borders and radius, e.g. hairline #dcd9cf borders, square corners and #2f6f5e for links. */ ``` ## Variant C: one venue, with level badges ![Splash Academy timetable for Bayside Pool: stage filters on the left, and day-by-day rows on the right with time, class name, a Stage badge, length, lane and coach, a Book button, and one class marked "Full · join waitlist"](/img/examples/calendar-list-splash.png) A swim school publishes one timetable per pool. Each pool page embeds the calendar limited to that venue with [`place_id`](../widgets/calendar-widget.md#place_id), and adds a level badge to every tile: ```html
``` ```css .splash-level { display: inline-block; margin-bottom: .25rem; padding: .1rem .5rem; border-radius: 6px; background: #dff2fa; color: #0b2e59; font-size: .75rem; font-weight: 800; } ``` The illustration shows a compact day-by-day layout. The calendar widget renders its own week or month grid. For a list layout that you fully control, build it from the REST API as in [Weekly timetable with filters](./filtered-timetable.md), and keep the calendar widget for pages where the built-in grid is enough. ## Tips - **[`filter_courses`](../widgets/calendar-widget.md#filter_courses) and [`course_id`](../widgets/calendar-widget.md#course_id)** give a programme page its own small timetable. - **[Hide information about current class](../widgets/calendar-widget.md#hide-information-about-current-class)** skips the class summary when a tile opens the booking form, which shortens the path to booking. - **[Import your own sessions](../widgets/calendar-widget.md#import-your-own-sessions)** to show events from another system in the same calendar. {`I want a class timetable on my website using the Zooza calendar widget. Read: https://docs.zooza.online/examples/calendar-designs/ and https://docs.zooza.online/widgets/calendar-widget/ Tasks: 1. Ask me: weekly regular classes (week view) or dated sessions (classic calendar)? One venue or all? Show availability? 2. List the exact settings to choose in Publish > Widget > Calendar. 3. Write the embed (v2 loader) with place_id / course_id if needed. 4. If I want colour coding or badges, write an event_tile_render callback that only wraps or prepends to the html it receives, plus scoped CSS.`} --- # Branch and franchise location map ## The problem Once a business runs classes in more than a handful of venues, *"Is there a class near me?"* becomes the most common question. Parents want to type a postcode, see the nearest venues, and go straight to a class that suits their child. Franchise networks need the same thing across many operators. ## What you'd have to build yourself - A venue database with addresses and coordinates, kept in sync with your timetable. - Geocoding for postcodes and addresses, distance calculation and a radius filter. - A map with pins, a venue detail panel, and the list of classes at each venue with live availability. - Links from each class into booking, plus "navigate here" for the parent's maps app. The Zooza map widget covers all of this from the venues and classes you already manage in Zooza. ## How it looks ![Location map with postcode search, radius filter, venue pins and a venue panel listing its classes](/img/examples/location-map.png) Little Movers' "Find a class" page has a short intro, then a full-width map with a pin for each venue. A search field accepts a postcode or address, and a slider narrows the radius. Below the map, the classes at the venues in view are listed by venue, nearest first. Selecting a pin highlights that venue and opens a bubble with its address, a booking link and a **Get directions** button. Each class links to the booking form. ## The code ```html

Locations

Find your nearest class

We run classes in twelve towns, with new venues every term. Search by postcode or browse the map.

``` ```css .lm-map-host { position: relative; min-height: 560px; /* reserve space: no layout shift while loading */ border-radius: 24px; overflow: hidden; background: #f3eef8; } .lm-map-skeleton { position: absolute; inset: 0; display: grid; place-items: center; color: #5b2a86; font-weight: 700; background: repeating-linear-gradient( 135deg, #f3eef8 0 24px, #ece4f4 24px 48px ); } /* Hide the skeleton once the map has finished loading (or failed) */ .lm-map-host:has( .zooza-map-widget:not( [data-status="loading"] ) ) .lm-map-skeleton { display: none; } /* Brand the map through its theme variables */ .lm-map-host .zooza-map-widget { --zooza-accent: #5b2a86; --zooza-pin-color: #ff7a59; --zooza-radius: 14px; --zooza-max-width: none; } ``` The map widget uses the same v1 loader (`/widgets/v1/loader.js`) as the registration widget. Little Movers operates in the UK, so the loader comes from `https://uk.api.zooza.app`, and the map shows distances in miles automatically. Use your own region's URL. ### Settings in the Zooza admin The map's behaviour is configured in **Publish > Widget > Map**, not in code: | Setting | Little Movers uses it for | |---|---| | [Search by ZIP code](../widgets/map-widget.md#search-by-zip-code) | Postcode search alongside addresses | | [Show radius filter](../widgets/map-widget.md#show-radius-filter) | "Within 10 miles" slider | | [Show use current location](../widgets/map-widget.md#show-use-current-location) | One-tap "near me" on phones | | [Use age filter](../widgets/map-widget.md#use-age-filter) | Only classes for the child's age | | [Show navigate button](../widgets/map-widget.md#show-navigate-button) | Opens the parent's maps app | | [URL](../widgets/map-widget.md#url) | Where the map lives, so links come back to it | Clicking a class takes the parent to the [registration widget](../widgets/registration-widget.md), so set its URL in the admin too. ### Why it's built this way - **Reserved height and a skeleton** keep the page from jumping when the map appears. That helps both parents and Core Web Vitals (CLS). - **The skeleton sits outside the placeholder**, so the widget never has to deal with your markup. It is hidden by the widget's documented [`data-status`](../widgets/map-widget.md#class-names) attribute, with no script. - **Branding goes through [theme variables](../widgets/map-widget.md#theme-variables)** on `.zooza-map-widget`, so it survives widget updates without overriding internal rules. - **Venues come from Zooza**, so opening a new venue or closing one updates the map without touching the website. ## Design variants The same map widget fits very different sites. The widget draws the map and, after a venue is selected, its details and classes below the map. The page around it is yours. ![Little Movers: rounded map with a pill-shaped postcode search floating over it, and venue cards with distance below](/img/examples/map-stacked-movers.png) **Stacked (Little Movers).** Rounded map with the search on top. Below it, your own three "nearest venue" cards with links to venue landing pages. ![Studio Nord: square-cornered monochrome map on the left and a hairline list of three studios with their instruments on the right](/img/examples/map-split-nord.png) **Split (Studio Nord).** Map on the left, and on the right your own list of studios (from your CMS or the [venues API](/api/reference#tag/company/GET/places)) with what is taught at each. Muted colours and no rounded corners. ![Splash Academy on a phone: map on the top part of the screen with Near me search and age chips, and the selected pool's details, lessons and a Navigate button below](/img/examples/map-mobile-splash.png) **Mobile (Splash Academy).** On phones the map takes the top of the screen. Turn on **Show use current location** and **Show navigate button** so the nearest pool and directions are one tap away. Style the widget's own parts by downloading the default stylesheet ([Use CSS](../widgets/map-widget.md#use-css)) and overriding colours, corners and fonts, scoped to your container. ## Variations - **Venue landing pages for SEO:** create one page per town ("Kids' dance classes in Bristol") with local copy and a registration widget filtered by [`place_ids`](../widgets/registration-widget.md#place_ids). Link them from the map page. - **Franchise networks:** each franchisee keeps their own Zooza company, and the network site shows all venues together. - **Regional pages:** open the map on one region instead of fitting every pin, with [`map_view`](../widgets/map-widget.md#map_view): ```html ``` - **Venue overview without the class list:** add `data-zooza-show-schedules="false"` to the placeholder ([`show_schedules`](../widgets/map-widget.md#show_schedules)) to show only the pins and their bubbles. - **Deeper styling:** when the variables are not enough, target the [`zooza-map-*` classes](../widgets/map-widget.md#class-names), scoped to `.lm-map-host`. {`I want a "Find your nearest class" page with the Zooza map widget. Read the Zooza docs first: https://docs.zooza.online/llms-full.txt Use this example as the pattern: https://docs.zooza.online/examples/location-map/ Tasks: 1. Build the page with an intro, a reserved-height map container with a CSS-only skeleton, and the map widget embed (v1 loader). 2. Ask me for my widget key and region (Europe / UK / UAE). 3. List which map settings I should enable in Publish > Widget > Map for my use case. 4. Brand the map with --zooza-* theme variables on .zooza-map-widget. 5. Optionally scaffold one landing page per town with a registration widget filtered by place_ids, or open the map on a region with window.ZOOZA.widgets.map.map_view.`} --- # Weekly timetable with filters ## The problem Parents and returning clients want to see the whole week at once: *"What's on Saturday morning in Riverton?"* A timetable that search engines can read and that answers this in one glance brings in more bookings than a form. It has to stay accurate as classes fill up, move or get added mid-term. ## What you'd have to build yourself - A source of truth for classes, venues, times, instructors and capacity, plus a way to keep it in sync with your booking system. - Availability that reflects real bookings, waiting lists and capacity changes. - Filtering by town, programme and day that works without a page reload. - A handover from "I like this class" into booking without asking the parent to pick it again. With Zooza, classes and availability already live in one place. The website only reads and displays them. ## How it looks ![Weekly timetable with town and programme filter chips, Monday to Sunday columns and Enrol buttons](/img/examples/filtered-timetable.png) Little Movers' timetable page has filter chips at the top: one row of **towns**, one of **programmes**, and a **Clear filters** link. Below is a seven-column week, Monday to Sunday. Each class card shows the term dates, programme, class name, time, venue and an availability line ("Spaces available" or "Waiting list"), with an **Enrol** button. ## Architecture ``` Browser ──GET /timetable──▶ Your server ──(cached 10 min)──▶ Zooza API │ │ POST /v3/token (once an hour) │◀── HTML + JSON ──────────┘ GET /v3/schedules │ GET /v3/courses │ GET /v3/places └─ Enrol ─▶ /book/?course_id=…&schedule_id=… (registration widget) ``` The API key, its secret and the access token stay on the server. The page is rendered server-side, so search engines see every class. Filtering happens in the browser. ## Step 1: fetch and cache on the server ```javascript // timetable.js — Node 18+ (global fetch) // Secrets come from the environment (a git-ignored .env locally), never from code. const API = 'https://api.zooza.app/v3'; // UK: https://uk.api.zooza.app/v3, ASIA: https://asia.api.zooza.app/v3 // An access token lasts an hour. Mint one, reuse it, and renew it shortly before it expires. let token = { value: null, expires_at: 0 }; async function access_token() { if ( token.value && Date.now() < token.expires_at - 60 * 1000 ) return token.value; const response = await fetch( API + '/token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify( { grant_type: 'client_credentials', client_id: process.env.ZOOZA_CLIENT_ID, client_secret: process.env.ZOOZA_CLIENT_SECRET, email: process.env.ZOOZA_OWNER_EMAIL, // an owner of the key's company } ), } ); if ( ! response.ok ) throw new Error( `Zooza token: ${ response.status }` ); const body = await response.json(); token = { value: body.access_token, expires_at: Date.now() + body.expires_in * 1000 }; return token.value; } async function get( path ) { const response = await fetch( API + path, { headers: { Authorization: `Bearer ${ await access_token() }` }, } ); if ( ! response.ok ) throw new Error( `Zooza ${ path }: ${ response.status }` ); return response.json(); } // Paginated lists return { total, page, page_size, data } async function get_all( path, query = '' ) { const all = []; for ( let page = 1; ; page++ ) { const res = await get( `${ path }?${ query }${ query ? '&' : '' }page=${ page }&page_size=100` ); all.push( ...( res.data || [] ) ); if ( all.length >= ( res.total || 0 ) || ! ( res.data || [] ).length ) return all; } } let cache = { at: 0, data: null }; async function load_timetable() { if ( cache.data && Date.now() - cache.at < 10 * 60 * 1000 ) return cache.data; const [ courses, places, schedules ] = await Promise.all( [ get( '/courses' ), get_all( '/places' ), get_all( '/schedules', 'online_registration=true&ended=false' ), ] ); const course_by_id = new Map( courses.map( ( c ) => [ c.id, c ] ) ); const place_by_id = new Map( places.map( ( p ) => [ p.id, p ] ) ); const classes = schedules .filter( ( s ) => s.public !== false ) .map( ( s ) => { const course = course_by_id.get( s.course_id ) || {}; const place = place_by_id.get( s.place_id ) || {}; // Weekly classes repeat on the weekday of their first date const weekday = new Date( s.start + 'T12:00:00' ).getDay(); // 0 = Sunday const free = s.capacity ? s.capacity - ( s.__calc__registered || 0 ) : null; return { schedule_id: s.id, course_id: s.course_id, programme: course.name, name: s.name, weekday, starts_at: minutes_to_time( s.time ), ends_at: minutes_to_time( s.time + ( s.duration || 0 ) ), term: { from: s.start, to: s.end }, place_id: s.place_id, venue: place.name, town: place.city, status: free === null || free > 0 ? 'available' : 'waitlist', }; } ); cache = { at: Date.now(), data: classes }; return classes; } function minutes_to_time( minutes ) { const h = String( Math.floor( minutes / 60 ) ).padStart( 2, '0' ); const m = String( minutes % 60 ).padStart( 2, '0' ); return `${ h }:${ m }`; } module.exports = { load_timetable }; ``` Check each field against the [classes](/api/reference#tag/classes/GET/schedules), [programmes](/api/reference#tag/programmes/GET/courses) and [venues](/api/reference#tag/company/GET/places) reference before relying on it. A key always acts for its own company, so no company id is needed. In particular, the venue's `name`/`city` keys depend on how your places are set up. `time` is minutes from midnight, and `start`/`end` are the class's date range. ## Step 2: render with data attributes for filtering Render each class server-side with its filter values on the element, using any template engine: ```html

Monday

2 Sep 2026 – 30 Jun 2027

Tiny Movers · Beginners

15:00 – 15:45 · Riverside Community Hall

Spaces available

Enrol
``` ## Step 3: filter in the browser ```html ``` ## Step 4: the booking page `/book/` holds a normal [registration widget](../widgets/registration-widget.md). The widget reads [`course_id`](../widgets/registration-widget.md#course_id) and [`schedule_id`](../widgets/registration-widget.md#schedule_id) from the URL, so the parent lands on the class they clicked: ```html
``` ### Why it's built this way - **Server-side fetch keeps credentials private** and lets search engines index the full timetable. - **A short cache** (10 minutes) keeps the page fast and the API calls low, while availability stays fresh enough. The booking form always re-checks capacity live. - **Filters use data attributes and `hidden`**, so they work without a framework and keep the page accessible. - **Deep links into the widget** skip two steps of the booking form. ## Variations - **No server at all:** the [calendar widget](../widgets/calendar-widget.md) shows a live schedule with built-in filters by location, programme, type and instructor. - **Age filter:** keep the age range per programme in your CMS (keyed by `course_id`) and add it as another `data-` attribute. - **Instructor names:** add `load_trainers` to the schedules request and render the instructor on the card. {`I want a weekly class timetable on my site, built from the Zooza API. Read the setup guide for coding agents first: https://docs.zooza.online/agent-setup.md Full docs: https://docs.zooza.online/llms-full.txt Use this example as the pattern: https://docs.zooza.online/examples/filtered-timetable/ Tasks: 1. Ask me for my stack (WordPress/PHP, Node, Next.js, …) and region. 2. Fetch /courses, /places and /schedules server-side with cached results; mint an access token with POST /v3/token and cache it for its lifetime; read ZOOZA_CLIENT_ID, ZOOZA_CLIENT_SECRET and ZOOZA_OWNER_EMAIL from a git-ignored .env (never ask me to paste the secret). 3. Render a Monday–Sunday grid with filter chips (town, programme) and client-side filtering. 4. Link each class to my booking page with ?course_id=…&schedule_id=… for the registration widget. 5. Verify every field name against the API reference (https://api.zooza.app/v3/openapi.json) before using it.`} --- # Fully custom course catalogue on the API ## The problem A business with dozens of programmes in many towns usually outgrows a single booking form. It wants a catalogue that feels like part of the brand, with illustrations, age bands, SEO-friendly programme pages and filters, and still with live availability and proper booking. Marketing wants to edit the copy. Operations wants to manage classes in one system, not two. ## What you'd have to build yourself - A class and venue database with capacity, waiting lists, terms and instructors, in sync with everything the office does every day. - Availability that reacts to bookings, cancellations and transfers in real time. - Booking, payments, installments, make-ups and client accounts behind the "Sign up" button. With Zooza you build **only the presentation layer**. Everything behind it stays in Zooza. ## Who owns what | Data | Owner | Why | |---|---|---| | Programme copy, illustrations, age band, SEO text | **Your CMS** | Marketing edits it freely and it doesn't affect operations | | Programmes, classes, venues, times, instructors | **Zooza** | Staff manage them daily in Zooza | | Capacity, bookings, waiting list | **Zooza** | Must be live and exact | | Booking, payment, client account | **Zooza registration widget** | Already handles every rule | The two are linked by the Zooza `course_id`, stored as a field on each programme in your CMS. ## How it looks ![Custom programme catalogue with filter sidebar, illustrated programme cards and a class picker grouped by venue](/img/examples/custom-catalogue.png) Little Movers' site has three levels: 1. **Catalogue (`/programmes/`)**: a filter sidebar (town, child's age, programme type) and a grid of illustrated programme cards, for example *Tiny Movers 1 (3–5 months)* or *Explorers (12–18 months)*. 2. **Programme page (`/programmes/tiny-movers-1/`)**: description, length and group size, plus a "Choose your town" dropdown with search. 3. **Class picker (`/book/tiny-movers-1/riverton/`)**: the classes for that programme in that town, grouped by venue. Each class shows its time, instructor and availability, with **Sign up**. Full classes say so and offer the waiting list. **Sign up** opens the booking page with the registration widget, preselected to that class. ## Step 1: the catalogue (CMS only) The catalogue and programme pages are ordinary CMS pages. Each programme entry has: ```json { "slug": "tiny-movers-1", "title": "Tiny Movers 1", "age_band": "3–5 months", "type": "baby-classes", "illustration": "/img/programmes/tiny-movers-1.svg", "zooza_course_id": 101 } ``` Filters for age and type run on CMS data, with no API call. The town filter uses the town list from Step 2. ## Step 2: towns and classes from Zooza (server-side) ```php [ 'Content-Type' => 'application/json' ], 'body' => wp_json_encode( [ 'grant_type' => 'client_credentials', 'client_id' => getenv( 'ZOOZA_CLIENT_ID' ), 'client_secret' => getenv( 'ZOOZA_CLIENT_SECRET' ), 'email' => getenv( 'ZOOZA_OWNER_EMAIL' ), // an owner of the key's company ] ), 'timeout' => 10, ] ); if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) { return null; } $body = json_decode( wp_remote_retrieve_body( $response ), true ); set_transient( 'zooza_access_token', $body['access_token'], max( 60, $body['expires_in'] - 60 ) ); return $body['access_token']; } function zooza_get( string $path ): array { $cache_key = 'zooza_' . md5( $path ); $cached = get_transient( $cache_key ); if ( $cached !== false ) { return $cached; } $token = zooza_access_token(); if ( ! $token ) { return []; } $response = wp_remote_get( ZOOZA_API . $path, [ 'headers' => [ 'Authorization' => 'Bearer ' . $token ], 'timeout' => 10, ] ); if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) { return []; } $data = json_decode( wp_remote_retrieve_body( $response ), true ) ?: []; set_transient( $cache_key, $data, 10 * MINUTE_IN_SECONDS ); return $data; } /** Classes of one programme that are open for online booking, grouped by venue. */ function little_movers_classes( int $course_id, string $town ): array { // Both lists are paginated: { total, page, page_size, data } $places = zooza_get( '/places?page_size=100' ); $schedules = zooza_get( '/schedules?course_id=' . $course_id . '&online_registration=true&ended=false&load_trainers=true&page_size=100' ); $venues = []; foreach ( $places['data'] ?? [] as $place ) { if ( strcasecmp( $place['city'] ?? '', $town ) === 0 ) { $venues[ $place['id'] ] = [ 'place' => $place, 'classes' => [] ]; } } foreach ( $schedules['data'] ?? [] as $s ) { if ( ! isset( $venues[ $s['place_id'] ] ) ) { continue; } $free = isset( $s['capacity'] ) ? $s['capacity'] - ( $s['__calc__registered'] ?? 0 ) : null; $venues[ $s['place_id'] ]['classes'][] = [ 'schedule_id' => $s['id'], 'name' => $s['name'], 'time' => sprintf( '%02d:%02d', intdiv( $s['time'], 60 ), $s['time'] % 60 ), 'duration' => $s['duration'], 'full' => $free !== null && $free <= 0, ]; } return array_filter( $venues, fn( $v ) => count( $v['classes'] ) > 0 ); } ``` Verify the field names (`city`, `time`, `capacity`, `__calc__registered`, …) against the [classes](/api/reference#tag/classes/GET/schedules) and [venues](/api/reference#tag/company/GET/places) reference for your account. `time` is minutes from midnight. ## Step 3: the class picker template ```php

Choose your class

Class full? Sign up anyway. You'll join the waiting list and we'll contact you as soon as a place opens.

``` ## Step 4: booking `/book/` contains the [registration widget](../widgets/registration-widget.md). It picks up [`course_id`](../widgets/registration-widget.md#course_id) and [`schedule_id`](../widgets/registration-widget.md#schedule_id) from the URL. Whether a full class goes to the waiting list is decided by your programme settings in Zooza, not by the website. ```html
``` ### Why it's built this way - **Clear ownership:** marketing never touches classes, and staff never touch web copy. The only link between them is `course_id`. - **Server-side reads with a cache** keep credentials private, keep pages fast and indexable, and avoid an API call per visitor. - **Booking stays in the widget.** Prices, installments, trials, discounts, waiting lists and payment rules are enforced by Zooza, so the website can't sell something the business doesn't offer. - **The availability shown is a hint.** The widget re-checks it live at booking time. ## Variations - **Town landing pages:** `/riverton/` lists every programme with classes in that town. That's good for local SEO. - **Trial-first funnel:** send "Sign up" to a page with [`registration_display_mode: 'trials_only'`](./multi-step-trial-booking.md). - **Headless front-end:** the same pattern works in Next.js, Nuxt or Astro. Fetch on the server, render static pages and revalidate every few minutes. {`I want a fully custom course catalogue on my website: my CMS holds programme marketing content, Zooza holds classes, availability and booking. Read the setup guide for coding agents first: https://docs.zooza.online/agent-setup.md Full docs: https://docs.zooza.online/llms-full.txt Use this example as the pattern: https://docs.zooza.online/examples/custom-catalogue/ Tasks: 1. Ask me for my stack (WordPress, Next.js, …), region, and how my programmes are stored in the CMS. 2. Add a zooza_course_id field to each programme. 3. Build server-side helpers that read venues and classes from the Zooza API with caching; mint an access token with POST /v3/token and cache it for its lifetime; read ZOOZA_CLIENT_ID, ZOOZA_CLIENT_SECRET and ZOOZA_OWNER_EMAIL from the environment (never ask me to paste the secret). 4. Build the class picker page (grouped by venue, availability, waiting-list message) linking to /book/?course_id=…&schedule_id=… with the registration widget. 5. Verify every field against the API reference: https://api.zooza.app/v3/openapi.json`} --- # Give your AI chatbot the logged-in client ## The problem Many class businesses now run an AI chatbot or support widget on their website. Most questions it gets are personal: *"When is Emma's next class?"*, *"Did my payment go through?"*, *"Can I book a make-up for last Tuesday?"*. A bot that doesn't know who it's talking to can only answer *"please log in to your account"*. The parent is often already logged in, through the Zooza [profile widget](../widgets/profile-widget.md) on the same site. This example passes that identity to the chatbot, so it can: - greet the parent by name and skip "what's your email?", - hand the conversation to staff with the right client attached, - look up the parent's bookings through **your** backend, safely. ## How it looks ![Parent zone with bookings and a website chatbot that greets the logged-in parent and answers about the next class](/img/examples/chatbot-logged-in-client.png) *Illustration with a fictional brand and data.* ## What you'd have to build yourself Without Zooza you would need your own client accounts, login, session handling and booking data, and a way to keep all of it in sync with the chatbot. Here, Zooza already owns the client account and login. You only listen to two browser events and forward a few fields. ## Step 1: forward the identity to the chatbot The profile widget fires [`zooza_user_logged_in`](../widgets/profile-widget.md#zooza_user_logged_in) and [`zooza_user_logged_out`](../widgets/profile-widget.md#zooza_user_logged_out) on `document`. The logged-in user is also kept in `localStorage` under `zooza_user`, so a parent who logged in on an earlier page is recognised too. ```html ``` Most chatbot vendors have a call for this. It is usually named "identify", "set user", "update" or "client context". Put it inside the adapter and leave the rest unchanged. :::warning Forward identity, never credentials Only pass the fields above. **Never forward a Zooza token or cookie to a third-party chatbot**, even if it appears in the browser. Anyone holding that token can act as the parent in Zooza, and chat vendors store conversation context. ::: ## Step 2: let the bot look up bookings through your backend Everything in Step 1 runs in the browser, so treat it as a **hint** (good enough for a greeting) and not as proof of identity. When the bot needs real data, such as next classes, payments or make-up options, route the request through a small endpoint on your server: ``` Chatbot (tool call: "get_bookings") │ conversation id + zooza_user_id ▼ Your backend ── verifies the person ── calls the Zooza API with its own access token │ GET /v3/registrations?user_id=… ▼ Short, filtered answer back to the bot (next session, status, balance) ``` ```javascript // Node.js (Express): a tool endpoint your chatbot calls app.post( '/chatbot/tools/get-bookings', async ( req, res ) => { const { conversation_id } = req.body; // Your rule for trusting the identity: e.g. the chat vendor's signed // identity verification, or a one-time code you emailed to the parent. const user_id = await verified_zooza_user_id( conversation_id ); if ( ! user_id ) { return res.json( { error: 'not_verified' } ); } const response = await fetch( `https://api.zooza.app/v3/registrations?user_id=${ encodeURIComponent( user_id ) }`, { headers: { Authorization: `Bearer ${ await zooza_access_token() }` } } ); const { data = [] } = await response.json(); // Return only what the bot needs, never the raw payload. // Pick the fields from the Registration schema in the API reference. res.json( { bookings: data.map( ( r ) => ( { id: r.id, // e.g. class name, next session, payment status } ) ), } ); } ); // An access token lasts an hour: mint one with your API key, reuse it, renew it shortly before it expires. // The secret comes from the environment (a git-ignored .env locally), never from code. let token = { value: null, expires_at: 0 }; async function zooza_access_token() { if ( token.value && Date.now() < token.expires_at - 60 * 1000 ) return token.value; const response = await fetch( 'https://api.zooza.app/v3/token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify( { grant_type: 'client_credentials', client_id: process.env.ZOOZA_CLIENT_ID, client_secret: process.env.ZOOZA_CLIENT_SECRET, email: process.env.ZOOZA_OWNER_EMAIL, // an owner of the key's company } ), } ); if ( ! response.ok ) throw new Error( `Zooza token: ${ response.status }` ); const body = await response.json(); token = { value: body.access_token, expires_at: Date.now() + body.expires_in * 1000 }; return token.value; } ``` `verified_zooza_user_id()` is yours to implement. See [Authentication](../api/authentication.md) for access tokens, and [`GET /registrations`](/api/reference#tag/registrations/GET/registrations) in the API reference for all filters and response fields. A key with read-only access (`core_read`) is enough for this endpoint. ### Why it's built this way - **The browser only says who is probably there.** `localStorage` and DOM events can be edited by anyone, so they are fine for personalising a greeting but not for releasing data. - **The API key, its secret and the access token stay on your server.** The chatbot vendor never sees Zooza credentials. - **The bot gets a filtered answer**, not the raw API response, so it can't leak fields the parent shouldn't see. - **Logout clears the context**, so a shared family tablet doesn't keep the previous parent in the chat. ## Variations - **Human handover:** pass `zooza_user_id` into your help desk ticket, so staff can open the client in Zooza straight away. - **Proactive messages:** when a logged-in parent opens the timetable page, have the bot offer *"Book a make-up for a missed class?"* and link to the [profile widget](../widgets/profile-widget.md). - **Analytics:** send a `logged_in` event with the hashed user id to your analytics tool to measure how many chats come from existing clients. {`My website runs the Zooza profile widget (clients log in there) and an AI chatbot. I want the chatbot to know which client is logged in. Read the setup guide for coding agents first: https://docs.zooza.online/agent-setup.md Full docs: https://docs.zooza.online/llms-full.txt Use this example as the pattern: https://docs.zooza.online/examples/chatbot-logged-in-client/ Tasks: 1. Ask me which chatbot vendor I use, then write the adapter (identify/reset) for it. 2. Listen to zooza_user_logged_in / zooza_user_logged_out and read localStorage 'zooza_user' on page load. 3. Never forward Zooza tokens or cookies to the chatbot. 4. If I want the bot to answer booking questions, scaffold a backend tool endpoint that verifies the person and calls the Zooza API (GET /v3/registrations?user_id=…) with an access token from POST /v3/token, reading ZOOZA_CLIENT_ID, ZOOZA_CLIENT_SECRET and ZOOZA_OWNER_EMAIL from the environment. Never ask me to paste the secret.`} --- # Package your widget customisation as a WordPress plugin ## The problem Most activity businesses run WordPress, often with a page builder such as Elementor, Divi or WPBakery. You've written a nice customisation for the booking widget: custom tiles, brand styles, a few settings. Now you need to: - put it on several pages with different settings (programme ids, columns, colours), - let the site owner place it without editing code, - survive page builders and content filters that **strip `\n", wp_json_encode( array_filter( $config, fn( $v ) => $v !== [] ) ) ); // 2. Your callbacks (render_course_tile, render_schedule_tile, …) printf( "\n", esc_url( plugins_url( 'assets/booking.js?ver=1.0.0', __FILE__ ) ) ); // 3. The Zooza loader last printf( "\n", esc_url( LM_ZOOZA_API_URL . '/widgets/v1/loader.js' ) ); } ); ``` `assets/booking.js` is any of the callback scripts from the other examples, for example [branded tiles](./branded-booking-tiles.md) or [age tabs](./age-tabs.md). Make it **merge** into `window.ZOOZA.widgets.registration.callback` instead of replacing it: ```javascript ( function () { window.ZOOZA = window.ZOOZA || {}; window.ZOOZA.widgets = window.ZOOZA.widgets || {}; var reg = window.ZOOZA.widgets.registration = window.ZOOZA.widgets.registration || {}; reg.callback = reg.callback || {}; if ( ! reg.callback.render_course_tile ) { reg.callback.render_course_tile = function ( course ) { /* … */ }; } } )(); ``` ### Why it's built this way - **Page builders strip inline scripts** in content. Shortcode output that contains only a `
` is safe, and `wp_footer` output isn't filtered. - **One placeholder plus one loader** follows the standard [embed](../widgets/embed-methods.md). Shortcode attributes become [initialisation options](../widgets/registration-widget.md#initialisation-options), so editors can change programmes or columns per page. - **Settings are JSON-encoded with `wp_json_encode`** and attributes are escaped, so editor input can't break the page. - **Assets are versioned files**, so browsers cache them and you update everything by releasing a new plugin version. :::tip Already using the Zooza WordPress plugin? The official Zooza plugin places the widget with `[zooza type="registration"]`. You can keep it for the embed and use your own plugin **only** for styling and callbacks. In that case, skip the placeholder in your shortcode and print just the settings and `booking.js` in the footer. ::: ## Variations - **Settings page:** add an admin page under *Settings* that lists the shortcode attributes for editors. - **Several widgets per site:** register one shortcode per use case (`[lm_trial_booking]`, `[lm_parent_zone]`) that share the same assets. - **Multisite / franchise:** read the widget key from a site option, so each franchise site uses its own Zooza company. {`I have custom JavaScript/CSS for the Zooza registration widget and I want to ship it as a WordPress plugin with a shortcode. Read: https://docs.zooza.online/examples/wordpress-plugin/ and https://docs.zooza.online/widgets/registration-widget/ Tasks: 1. Ask me for my widget key, region, and which shortcode attributes editors need. 2. Create the plugin: shortcode outputs only the placeholder div; settings and scripts are printed in wp_footer (settings → my callbacks → Zooza loader). 3. Move my JS/CSS into versioned asset files; make the JS merge into window.ZOOZA.widgets.registration.callback. 4. Escape all attributes and JSON-encode settings.`} --- # API overview The Zooza API gives your integration access to a Zooza company's programmes, classes, sessions, registrations, attendance and invoices. It is a JSON-over-HTTPS API: you exchange an API key for an access token, then call the operations your key's access groups allow. :::tip New here? [Getting started](getting-started.md) takes you from an API key to your first successful call in about ten minutes. ::: ## When to use the API Zooza offers two ways to integrate: **widgets** (embeddable booking, calendar, profile and map components) and the **API** (programmatic access from your server). Many integrations use both. **Use widgets** when you want ready-made Zooza components on your website. They need no server code and no API key: see the [widget docs](../widgets/index.md). **Use the API** when you need to: - build back-office tools or reports on top of Zooza data; - show programmes and classes in your own website design, from data you cache on your server; - synchronise registrations, sessions or invoices with another system (CRM, accounting, ERP). The API is called from a **server**. Your key's secret must never reach a browser or a mobile app; see [Security](keys.md#security). ## How it works ```mermaid sequenceDiagram participant S as Your server participant Z as Zooza API S->>Z: POST /v3/token (client_id, client_secret, owner email) Z-->>S: access_token (valid 60 minutes) S->>Z: GET /v3/me (Authorization: Bearer …) Z-->>S: your access groups, rate tier, remaining points S->>Z: GET /v3/courses, /v3/schedules, … Z-->>S: JSON + X-RateLimit-* headers ``` 1. **Get a key.** A company owner creates it in the Zooza app under **Developers → API keys**. See [Keys](keys.md). 2. **Exchange it for a token.** `POST /v3/token` returns a bearer token that lasts 60 minutes. See [Authentication](authentication.md). 3. **Call the API** with `Authorization: Bearer `. What you may call depends on your key's access groups; every call costs points from your company's budget. See [Access and rate limits](access-and-rate-limits.md). ## Regions and base URLs Each region has its own host. A key belongs to the region of the company that created it, and works only there. | Region | Base URL | |---|---| | EU | `https://api.zooza.app/v3` | | UK | `https://uk.api.zooza.app/v3` | | ASIA | `https://asia.api.zooza.app/v3` | Examples in these docs use the EU base URL. Use your company's region instead; `GET /v3/me` returns it as `region`. ## What the API covers | Resource | Zooza term | What you can do | Reference | |---|---|---|---| | Programmes | [programme](../concepts.md#programme-course) (`courses`) | List, read, create, update | [Programmes](/api/reference#tag/programmes) | | Classes | [class](../concepts.md#class-group) (`schedules`) | List, create, update | [Classes](/api/reference#tag/classes) | | Sessions | [session](../concepts.md#session-lessoneventterm) (`events`) | List, read, create, update one or several | [Sessions](/api/reference#tag/sessions) | | Calendar | sessions by date | Read a calendar of sessions | [Calendar](/api/reference#tag/calendar) | | Attendance | attendance register | Read a session's register | [Attendance](/api/reference#tag/attendance) | | Registrations | registration | Search, read, update | [Registrations](/api/reference#tag/registrations) | | Extra fields | custom registration fields | Set and update values | [Extra fields](/api/reference#tag/extra-fields) | | Invoices | customer invoices | List, read, create, download | [Invoices](/api/reference#tag/invoices) | | Company | [venues](../concepts.md#place-locationvenue) (`places`) | List venues | [Company](/api/reference#tag/company) | | Users | company users | List | [Users](/api/reference#tag/users) | | Agreements | terms and consents | Read an agreement version | [Agreements](/api/reference#tag/agreements) | If an operation is not in the [API reference](/api/reference), it is not part of the API. The API uses the database names (`courses`, `schedules`, `events`); the Zooza app shows programme, class and session. The [glossary](../concepts.md) maps the two. ## Good to know A few things that catch first integrations. Each links to the full rule in the reference. - **Lists come in more than one shape.** Most lists return `{total, page, page_size, settings, data}` with a zero-based `page`, but `GET /v3/courses` is a plain array and `GET /v3/registrations` returns `{total, total_capped, page, offset, results}`. See [Lists and pagination](/api/reference#description/lists-and-pagination). - **Pages start at 0, and `total` stops at 500.** On `GET /v3/registrations`, `total_capped: true` means there are more, and the pages go on past 500. `page` comes back `null`, so use `offset`. See [Find registrations](guides/find-registrations.md#4-page-through-the-results). - **Searching registrations needs `advanced_search=1`.** Always send it on [`GET /v3/registrations`](/api/reference#tag/registrations/GET/registrations). Without it the API answers `422` naming the missing parameter. - **Dates and times are local to the region**: `Europe/Bratislava` for EU, `Europe/London` for UK, `Asia/Dubai` for ASIA. See [Dates and times](/api/reference#description/dates-and-times). Times of day are **minutes after midnight** (`570` = 9:30). Timestamps such as `created` look like `2026-11-20 18:21:34`, without `T` or a time zone. A class with no sessions yet has `start` `"0000-00-00"`. - **Whether amounts include VAT depends on the company's setting.** See [Amounts](/api/reference#description/amounts). - **Error messages are in the company's language**, not one your request chooses. Build logic on error codes, not on message text. See [Errors](errors.md) and the [error code reference](error-codes.md). ## Machine-readable reference The full reference is published as an OpenAPI 3 document, one per region, without authentication: - `https://api.zooza.app/v3/openapi.json` (EU) - `https://uk.api.zooza.app/v3/openapi.json` (UK) - `https://asia.api.zooza.app/v3/openapi.json` (ASIA) Use it to generate a client or to give an AI coding agent the exact contract. {`Help me build a server-side integration against the Zooza API (/v3). Read these first and do not invent endpoints: - Guide: https://docs.zooza.online/api/getting-started - Machine-readable reference: https://api.zooza.app/v3/openapi.json (use my region's host) Facts: - Authenticate with POST /v3/token (client_credentials) using client_id, client_secret and the email of an owner of my company. Read client_id, client_secret and the email from environment variables (a git-ignored .env locally). Never ask me to paste the secret into this chat. - Send Authorization: Bearer . Tokens last 60 minutes; cache and reuse them, request a new one when they expire. - Calls cost points; respect 429 + Retry-After. GET /v3/me shows what my key may call and what is left. - Keys act on live data. Ask me before writing code that creates or changes anything. What I want to build: [describe your use case — e.g. "export this term's registrations to CSV", "show my classes on my website", "sync new registrations into my CRM"] Language: [Node.js / Python / PHP / other]`} ## Next steps - [Getting started](getting-started.md): key → token → first call - [Authentication](authentication.md): the token request in full - [Access and rate limits](access-and-rate-limits.md): access groups, company scope, points and tiers - [Errors](errors.md): status codes and error bodies - [Error codes](error-codes.md): every `400` error code and what it means - Guides: [Find registrations](guides/find-registrations.md), [Change a registration](guides/change-a-registration.md), [Set up a term](guides/set-up-a-term.md) - [Keys](keys.md): creating, rotating and revoking keys, and security practices - [API reference](/api/reference): every operation --- # Getting started This page takes you from nothing to a working call in four steps: get a key, request a token, check what the key can do, and list the company's programmes. Every step is read-only, so nothing in the company changes. You need: - a Zooza company, and an account with the **owner** role in it; - a server-side environment with cURL, Node.js 18+ or Python 3 (the secret must never run in a browser). ## 1. Create a key A company owner creates keys in the Zooza app: **Developers → API keys → New key**. Other roles can't create keys. A new key has: | Part | Example | Notes | |---|---|---| | `client_id` | `zk_4768b32989b7303eac7ff30e` | Not secret. Identifies the key. | | `client_secret` | `` | **Shown once.** Copy it straight into your secret store. If you lose it, rotate the key to get a new one. | | Access groups | `core_read` | What the key may call. New keys are read only. | | Company scope | `pinned` | The key acts only for the company that created it. | Store the values as environment variables. Locally, use a `.env` file that is listed in `.gitignore`: ```bash title=".env (git-ignored)" ZOOZA_CLIENT_ID=zk_… ZOOZA_CLIENT_SECRET= ZOOZA_OWNER_EMAIL=owner@yourcompany.example ZOOZA_BASE_URL=https://api.zooza.app/v3 ``` `ZOOZA_OWNER_EMAIL` is the email of an owner of the company: the token acts as that owner (see [why](authentication.md#owner-email)). Use the base URL of your company's [region](index.md#regions-and-base-urls). :::warning Never paste the secret into chat Don't paste `client_secret` into a chat, a support ticket or an AI agent. If an agent helps you write the code, let it read the secret from the environment. ::: ## 2. Request an access token Exchange the key for a token at [`POST /v3/token`](/api/reference#tag/authentication/POST/token). ```bash curl -s -X POST "$ZOOZA_BASE_URL/token" \ -H "Content-Type: application/json" \ -d "{\"grant_type\":\"client_credentials\",\"client_id\":\"$ZOOZA_CLIENT_ID\",\"client_secret\":\"$ZOOZA_CLIENT_SECRET\",\"email\":\"$ZOOZA_OWNER_EMAIL\"}" ``` ```js // Node.js 18+ (built-in fetch). Load .env with e.g. `node --env-file=.env token.js`. const res = await fetch(`${process.env.ZOOZA_BASE_URL}/token`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ grant_type: 'client_credentials', client_id: process.env.ZOOZA_CLIENT_ID, client_secret: process.env.ZOOZA_CLIENT_SECRET, email: process.env.ZOOZA_OWNER_EMAIL, }), }); if (!res.ok) throw new Error(`Token request failed: ${res.status} ${await res.text()}`); const { access_token, expires_in } = await res.json(); ``` ```python import os import requests res = requests.post( f"{os.environ['ZOOZA_BASE_URL']}/token", json={ "grant_type": "client_credentials", "client_id": os.environ["ZOOZA_CLIENT_ID"], "client_secret": os.environ["ZOOZA_CLIENT_SECRET"], "email": os.environ["ZOOZA_OWNER_EMAIL"], }, timeout=10, ) res.raise_for_status() token = res.json() access_token = token["access_token"] ``` The response: ```json { "access_token": "eyJ…", "token_type": "Bearer", "expires_in": 3600, "scope": "core_read" } ``` The token lasts 60 minutes. Cache it and reuse it for every call; don't request a new token per call, because the token operation has its own strict limit. If you get `401 invalid_client`, see [why a token request is refused](authentication.md#invalid-client). ## 3. Check the key: `GET /v3/me` [`GET /v3/me`](/api/reference#tag/authentication/GET/me) costs no points. It confirms the token works and shows what the key may do. ```bash curl -s "$ZOOZA_BASE_URL/me" -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```js const me = await fetch(`${process.env.ZOOZA_BASE_URL}/me`, { headers: { Authorization: `Bearer ${access_token}` }, }).then((r) => r.json()); console.log(me.groups, me.tier, me.points); ``` ```python me = requests.get( f"{os.environ['ZOOZA_BASE_URL']}/me", headers={"Authorization": f"Bearer {access_token}"}, timeout=10, ).json() print(me["groups"], me["tier"], me["points"]) ``` ```json { "client_id": "zk_…", "region": "EU", "groups": ["core_read"], "tier": "free", "points": { "limit_minute": 60, "remaining_minute": 60, "limit_day": 1000, "remaining_day": 1000, "reset_day": "2026-11-19T00:00:00Z" }, "token": { "expires_at": "2026-11-18T11:00:00Z" }, "operations": [ { "op": "get_courses", "method": "GET", "path": "/v3/courses", "cost": 2 } ] } ``` `operations` lists every operation the key may call, with its cost. [Access and rate limits](access-and-rate-limits.md) explains groups, tiers and points. ## 4. Make your first call: list programmes [`GET /v3/courses`](/api/reference#tag/programmes/GET/courses) lists the company's [programmes](../concepts.md#programme-course). It costs 2 points. ```bash curl -s "$ZOOZA_BASE_URL/courses" -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```js const res = await fetch(`${process.env.ZOOZA_BASE_URL}/courses`, { headers: { Authorization: `Bearer ${access_token}` }, }); console.log('Points left this minute:', res.headers.get('X-RateLimit-Remaining')); const programmes = await res.json(); for (const p of programmes) console.log(p.id, p.name); ``` ```python res = requests.get( f"{os.environ['ZOOZA_BASE_URL']}/courses", headers={"Authorization": f"Bearer {access_token}"}, timeout=10, ) res.raise_for_status() print("Points left this minute:", res.headers.get("X-RateLimit-Remaining")) for p in res.json(): print(p["id"], p["name"]) ``` Every response carries `X-RateLimit-*` headers with your remaining budget, in points. ## Next steps - Read the [API reference](/api/reference) for the operations you need: [classes](/api/reference#tag/classes), [sessions](/api/reference#tag/sessions), [registrations](/api/reference#tag/registrations). - Handle token expiry and refused tokens: [Authentication](authentication.md). - Handle `429` and plan your call volume: [Access and rate limits](access-and-rate-limits.md). - Handle failures: [Errors](errors.md). - Need to create or change data? An owner can add the `core_write` access group to the key; see [Keys](keys.md). Keys act on **live data** and there is no sandbox yet, so test writes carefully. --- # Authentication The Zooza API uses the OAuth 2.0 **client credentials** flow, with one Zooza-specific field. You exchange your key's `client_id` and `client_secret`, plus the email of an owner of the company, for a bearer token. Then you send that token on every call. ``` POST /v3/token → access_token → Authorization: Bearer ``` Reference: [`POST /v3/token`](/api/reference#tag/authentication/POST/token). ## The token request Send the body as JSON or as `application/x-www-form-urlencoded`. | Field | Required | Value | |---|---|---| | `grant_type` | No | `client_credentials`, the only accepted value. You may leave it out. | | `client_id` | Yes | Your key's client id, e.g. `zk_4768b32989b7303eac7ff30e`. | | `client_secret` | Yes | Your key's secret. Read it from the environment; never put it in code. | | `email` | Yes | The email of an owner of the key's company. See [Owner email](#owner-email). | ```bash curl -s -X POST https://api.zooza.app/v3/token \ -H "Content-Type: application/json" \ -d "{\"grant_type\":\"client_credentials\",\"client_id\":\"$ZOOZA_CLIENT_ID\",\"client_secret\":\"$ZOOZA_CLIENT_SECRET\",\"email\":\"$ZOOZA_OWNER_EMAIL\"}" ``` ```js const res = await fetch('https://api.zooza.app/v3/token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ grant_type: 'client_credentials', client_id: process.env.ZOOZA_CLIENT_ID, client_secret: process.env.ZOOZA_CLIENT_SECRET, email: process.env.ZOOZA_OWNER_EMAIL, }), }); ``` ```python res = requests.post( "https://api.zooza.app/v3/token", json={ "grant_type": "client_credentials", "client_id": os.environ["ZOOZA_CLIENT_ID"], "client_secret": os.environ["ZOOZA_CLIENT_SECRET"], "email": os.environ["ZOOZA_OWNER_EMAIL"], }, timeout=10, ) ``` **HTTP Basic.** Instead of the body, you can send `client_id` and `client_secret` as HTTP Basic authentication (`Authorization: Basic base64(client_id:client_secret)`). `email` always goes in the body. ```bash curl -s -X POST https://api.zooza.app/v3/token \ -u "$ZOOZA_CLIENT_ID:$ZOOZA_CLIENT_SECRET" \ --data-urlencode "grant_type=client_credentials" \ --data-urlencode "email=$ZOOZA_OWNER_EMAIL" ``` **`scope`.** If your client sends a `scope`, it is ignored. The token always gets exactly the access groups the key has. ## The response ```json { "access_token": "eyJ…", "token_type": "Bearer", "expires_in": 3600, "scope": "core_read core_write" } ``` | Field | Meaning | |---|---| | `access_token` | Send it as `Authorization: Bearer `. | | `token_type` | Always `Bearer`. | | `expires_in` | Seconds until the token expires: 3600 (60 minutes). | | `scope` | The key's [access groups](access-and-rate-limits.md#access-groups), space-separated. | ## Owner email {#owner-email} `email` must belong to a user with the **owner** role in the key's company. The token acts as that owner: - every call runs with that owner's permissions, and a key can never do more than its owner may; - changes made through the API are attributed to that owner in Zooza, so the company's history stays meaningful. The key is not tied to one owner: any current owner of the company can be named. If the named user stops being an owner, calls made with their tokens stop working, and new token requests naming them are refused. In that case, name another owner. ## Token lifetime and caching - A token lasts **60 minutes**. There is **no refresh token**. - Cache the token and reuse it for every call until it expires. Request a new one when it expires, or shortly before (for example when fewer than 60 seconds are left, using `expires_in`). - Don't request a token per call. The token operation has its own limit (below), and calls with a cached token are faster. - A `401` on a normal call means the token is missing, invalid or expired: request a new token and retry once. ```js // Minimal token cache (Node.js) let cached = null; // { token, expiresAt } async function getToken() { if (cached && Date.now() < cached.expiresAt - 60_000) return cached.token; const res = await fetch(`${process.env.ZOOZA_BASE_URL}/token`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ client_id: process.env.ZOOZA_CLIENT_ID, client_secret: process.env.ZOOZA_CLIENT_SECRET, email: process.env.ZOOZA_OWNER_EMAIL, }), }); if (!res.ok) throw new Error(`Token request failed: ${res.status}`); const { access_token, expires_in } = await res.json(); cached = { token: access_token, expiresAt: Date.now() + expires_in * 1000 }; return access_token; } ``` ## Limits on the token operation `POST /v3/token` doesn't cost points, but it has its own limit: | Limit | Value | |---|---| | Tokens per key | 5 per minute | | Tokens per IP address | 20 per minute | Over the limit, it answers `429` with `Retry-After` (seconds to wait). ## Why a token request is refused {#invalid-client} Refused token requests use OAuth error bodies: ```json { "error": "invalid_client", "error_description": "…" } ``` | Status | `error` | Meaning | |---|---|---| | `400` | `invalid_request` | A required field is missing. | | `400` | `unsupported_grant_type` | `grant_type` is something other than `client_credentials`. | | `401` | `invalid_client` | The credentials were not accepted. | | `429` | — | Too many token requests; wait `Retry-After` seconds. | | `503` | — | The credentials couldn't be checked right now. This is not a credential problem; retry later. | **`invalid_client` never says why**, by design. Check each of these: 1. **Unknown key:** the `client_id` is mistyped, or belongs to another [region](index.md#regions-and-base-urls) (keys work only in their company's region). 2. **Wrong secret:** the `client_secret` is mistyped, or the secret was rotated and you're using the old one. 3. **Revoked key:** an owner revoked the key in the app. 4. **Not an owner:** `email` isn't the email of an owner of the key's company, or that user is no longer an owner. 5. **Locked key:** after **10 wrong secrets**, a key is locked for **5 minutes**. Requests during the lock are refused even with the right secret. Wait, then try again with the correct secret. ## Calling the API Send the token on every call: ``` GET https://api.zooza.app/v3/courses Authorization: Bearer ``` You don't need to send a company header: a key always acts for its own company (see [Company scope](access-and-rate-limits.md#company-scope)). ## Related - [Getting started](getting-started.md): the whole flow, step by step - [Access and rate limits](access-and-rate-limits.md): what a token may call, and its budget - [Keys](keys.md): rotating and revoking keys, and how quickly each change takes effect - [Errors](errors.md): error bodies on normal calls --- # Access and rate limits Two things decide what a call may do: - **Access groups** decide *which* operations a key may call, and **company scope** decides *whose data*. - The **rate tier** decides *how much* the key may call, measured in points. [`GET /v3/me`](/api/reference#tag/authentication/GET/me) shows all of it for your key, live, and costs nothing. ## Access groups {#access-groups} An access group is a named set of operations. Access is denied by default: a key may call only the operations of the groups it holds. A key with several groups may call the operations of all of them. | Group | Allows | |---|---| | `core_read` | The read operations (`GET`) | | `core_write` | The operations that create or change data (`POST`, `PUT`) | "Read only" means `core_read`. "Read and write" means `core_read` and `core_write`. - [Every operation, with its group and cost](#costs-per-operation) is listed below. In the machine-readable document they are each operation's `x-zooza-access` (`{"groups": […], "cost": …}`), and the reference shows them at the end of each operation's description. - Calling an operation outside the key's groups answers `403`. - **A key can never do more than its owner.** The token acts as the [owner named in the token request](authentication.md#owner-email), and access groups only narrow what that owner may do. - A change to a key's groups applies to tokens requested after the change (so within 60 minutes at most). See [Keys](keys.md#when-changes-take-effect). ## Company scope {#company-scope} A key acts for **exactly one company**: the company that created it (company scope `pinned`). It can't read or change another company's data, even a company the same owner also owns or one in the same network. You don't send a company id; every call works on the key's company. ## `GET /v3/me` ```json { "client_id": "zk_…", "region": "EU", "groups": ["core_read"], "tier": "free", "points": { "limit_minute": 60, "remaining_minute": 54, "limit_day": 1000, "remaining_day": 872, "reset_day": "2026-11-19T00:00:00Z" }, "token": { "expires_at": "2026-11-18T11:00:00Z" }, "operations": [ { "op": "get_courses", "method": "GET", "path": "/v3/courses", "cost": 2 } ] } ``` | Field | Meaning | |---|---| | `client_id` | The key | | `region` | `EU`, `UK` or `ASIA`: the key's region | | `groups` | The key's access groups | | `tier` | Your company's rate tier, the same for all its keys | | `points` | The company's budget per minute and per day, what's left, and when the day resets (midnight UTC) | | `token.expires_at` | When the token used for this call expires | | `operations` | Every operation the key may call, with its cost | It's the recommended way to check remaining budget and permissions before a batch job. ## Rate limits: points Limits are counted in **points, not requests**. Each operation costs points, and your company's rate tier gives it a budget per minute and per day. The day window resets at midnight UTC. The budget belongs to the company, not to a key: all of its keys draw on the same points, so two integrations running at once share it. The tier follows the company's Zooza plan; see `GET /v3/me` for the live numbers. :::note Today's defaults The costs and tiers below are today's defaults and may change. The authoritative numbers are in the [table of operations](#costs-per-operation) and the tier table below (both generated from the published document), and `GET /v3/me`. ::: **Costs** | Kind of call | Points | |---|---| | Read one record (`GET` with an id) | 1 | | Read a list | 2 | | Create or change (`POST`, `PUT`) | 5 | | Download link (invoice PDF) | 10 | | `GET /v3/me`, `POST /v3/token` | 0 | ### Costs per operation {#costs-per-operation} Generated from the published [OpenAPI document](https://api.zooza.app/v3/openapi.json), so it always matches what is charged. | Request | Access group | Points | |---|---|---| | POST /v3/token | any key | 0 | | GET /v3/me | any key | 0 | | GET /v3/agreements/{ID} | core_read | 1 | | GET /v3/events | core_read | 2 | | POST /v3/events | core_write | 5 | | PUT /v3/events | core_write | 5 | | GET /v3/events/{ID} | core_read | 1 | | PUT /v3/events/{ID} | core_write | 5 | | POST /v3/extra_fields | core_write | 5 | | PUT /v3/extra_fields/{ID} | core_write | 5 | | GET /v3/attendance | core_read | 2 | | GET /v3/calendar | core_read | 2 | | GET /v3/registrations | core_read | 2 | | GET /v3/registrations/{ID} | core_read | 1 | | PUT /v3/registrations/{ID} | core_write | 5 | | GET /v3/courses | core_read | 2 | | POST /v3/courses | core_write | 5 | | GET /v3/courses/{ID} | core_read | 1 | | PUT /v3/courses/{ID} | core_write | 5 | | GET /v3/schedules | core_read | 2 | | POST /v3/schedules | core_write | 5 | | GET /v3/schedules/{ID} | core_read | 1 | | PUT /v3/schedules/{ID} | core_write | 5 | | GET /v3/billing_periods | core_read | 2 | | GET /v3/customer_invoices | core_read | 2 | | POST /v3/customer_invoices | core_write | 5 | | GET /v3/customer_invoices/{ID} | core_read | 1 | | GET /v3/customer_invoices/{ID}/download | core_read | 10 | | GET /v3/customer_invoices/download | core_read | 10 | | GET /v3/places | core_read | 2 | | GET /v3/users | core_read | 2 | **Rate tiers** | Tier | Points per minute | Points per day | |---|---|---| | free | 60 | 1000 | | standard | 300 | 20000 | | partner_xl | 1200 | 100000 | The tier is your company's and follows its Zooza plan. `GET /v3/me` shows which tier applies. ### When points are charged - Points are charged **before** the call runs. - They are refunded only when the API couldn't handle the call at all: `503` (temporarily unavailable) and `504` (no answer in time). - Every other answer costs the operation's points, including `400` and `500`. ## Rate-limit headers Every successful call and every `429` carries the budget, in points: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Points per minute | | `X-RateLimit-Remaining` | Points left in the current minute | | `X-RateLimit-Reset` | Seconds until the minute budget resets | | `X-RateLimit-Limit-Day` | Points per day | | `X-RateLimit-Remaining-Day` | Points left today (UTC) | | `X-RateLimit-Reset-Day` | Seconds until the daily budget resets | ## Handling `429` Over budget, the API answers `429` with a `Retry-After` header: the number of seconds to wait. - Wait at least `Retry-After` seconds before the next call. Don't retry in a tight loop. - For batch jobs, watch `X-RateLimit-Remaining` and slow down before you hit zero. - If you regularly run out of the daily budget, cache what you read: programmes, classes and venues change rarely. ```js async function callWithRetry(url, options, attempts = 3) { for (let i = 0; i < attempts; i++) { const res = await fetch(url, options); if (res.status !== 429) return res; const wait = Number(res.headers.get('Retry-After') || 1); await new Promise((r) => setTimeout(r, wait * 1000)); } throw new Error('Still rate limited after retries'); } ``` The token operation has its own, separate limit: see [Authentication](authentication.md#limits-on-the-token-operation). ## Related - [Keys](keys.md): changing a key's access groups - [Errors](errors.md): `403`, `429` and the other error bodies - [API reference](/api/reference): the groups and cost of every operation --- # Errors The Zooza API answers with standard HTTP status codes. Errors come in three body shapes, depending on the status. | Status | Body | Meaning | |---|---|---| | `400` | [`RequestError`](#requesterror) | The request was understood but failed, e.g. a record wasn't found or a business rule refused it. Messages are localised. | | `401` | [`Error`](#error) | The access token is missing, invalid or expired. | | `403` | [`Error`](#error) | The operation is outside your key's [access groups](access-and-rate-limits.md#access-groups). | | `404` | [`Error`](#error) | The path doesn't exist. | | `422` | [`Error`](#error) with `errors` | The request doesn't match the operation's schema. [Every problem is listed](#validation). | | `429` | [`Error`](#error) | Over your company's point budget (shared by all its keys). Wait `Retry-After` seconds. | | `500` | either | An unexpected error. | | `503` | [`Error`](#error) | Temporarily unavailable. No points were charged. | | `504` | [`Error`](#error) | No answer in time. No points were charged. | | `400`, `401` on `POST /v3/token` | [OAuth error](#oauth-errors) | The token request was refused. | ## `Error` {#error} ```json { "error": "rate_limited", "message": "Over the point budget.", "request_id": "…" } ``` | Field | Meaning | |---|---| | `error` | A stable machine code, e.g. `validation_failed` or `rate_limited`. Branch on this, not on `message`. | | `message` | A human-readable explanation, in English. | | `request_id` | Identifies the request. Also sent as the `X-Request-Id` header. **Quote it when you contact support.** | | `errors` | On `422` only: every validation problem (below). | ## Validation errors (`422`) {#validation} Requests are checked against the documented schema of the operation before they run. A `422` lists **every** problem found (up to 100 per response), not only the first, so you can fix them all at once. ```json { "error": "validation_failed", "message": "The request does not match this operation's schema.", "request_id": "…", "errors": [ { "location": "body", "path": "/capacity", "code": "type_invalid", "message": "Expected an integer.", "expected": { "type": "integer" }, "received": { "type": "string", "value": "12" } } ] } ``` | Field | Meaning | |---|---| | `location` | `body`, `query` or `path` | | `path` | A JSON Pointer into the body (e.g. `/participants/0/email`), or the name of the query or path parameter | | `code` | What is wrong, as a stable code (below) | | `message` | The problem in words, in English | | `expected` | The rule that was broken, e.g. `{"maximum": 200}` | | `received` | What was sent: its type and its value, truncated to 100 characters. The value is never echoed for secret-looking fields. | **Codes:** `required_missing`, `type_invalid`, `enum_invalid`, `format_invalid`, `pattern_mismatch`, `minimum`, `maximum`, `min_length`, `max_length`, `min_items`, `max_items`, `unknown_field`, `invalid`. **Types.** Query and path parameters are converted to the documented type, so `?page_size=50` is fine. Body values are not converted: send `5`, not `"5"`, where a number is expected. **Not everything is checked up front.** Some operations accept several kinds of request in one body, for example `PUT /registrations/{ID}` with `action`. For those, the up-front check covers the types and the fields every kind needs. The fields a particular `action` needs are checked when the request runs, so you may still get a `400`. ## `RequestError` {#requesterror} `400` (and some `500`) responses use the request-error envelope: ```json { "errors": [ { "0065": "Resource not found - Registration" } ], "request_valid": false } ``` - `errors` has one entry per error. The key is a four-digit **error code**; look it up in the [error code reference](error-codes.md). The value is a message in the **company's language** (its own setting, not something the request chooses). - When an error names what was refused, the value ends the message, as in the example. A few codes return it under key `0` instead: `{"0074": "…", "0": "…"}`. The [error code reference](error-codes.md) says which. - Branch on the code, never on the message: messages are translated and reworded. - `request_valid` is always `false`. - Only `errors` and `request_valid` are part of the contract. Other fields may appear; don't rely on them. ## Token errors {#oauth-errors} `POST /v3/token` uses OAuth error bodies: ```json { "error": "invalid_client", "error_description": "…" } ``` `error` is `invalid_request` (a field is missing), `unsupported_grant_type` or `invalid_client` (credentials not accepted, with no reason given). See [why a token request is refused](authentication.md#invalid-client). ## Retrying | Status | Retry? | |---|---| | `400` | No. Fix the request; the [error code](error-codes.md) says what is wrong. | | `401` | Request a new token, then retry once. If it fails again, check the key (see [Authentication](authentication.md#invalid-client)). | | `403` | No. The key lacks the access group. An owner can add it (see [Keys](keys.md)). | | `404` | No. Check the path against the [reference](/api/reference). | | `422` | No. Fix every problem in `errors`. | | `429` | Yes, after `Retry-After` seconds. Never in a tight loop. | | `500` | Possibly, once, after a short wait. If it repeats, contact support with the `request_id`. | | `503`, `504` | Yes, with increasing waits (e.g. 1 s, 2 s, 4 s). No points were charged. | Be careful when retrying writes (`POST`, `PUT`) after a `500` or `504`: the change may have been made. Read the record first to check. ## In practice What the recorded calls in the guides showed: - **"Not found" is a `400`, not a `404`.** Reading or changing a registration that isn't the company's answers `400` with code `0065` in the [request-error](#requesterror) shape. The same goes for creating a class in a programme that doesn't exist. See [Find registrations](guides/find-registrations.md#5-open-one-registration). - **One call can answer in both shapes.** A value the schema refuses is a `422` [`Error`](#error); a value Zooza refuses while running the request is a `400` `RequestError`. Changing a status can give either. See [Change a registration](guides/change-a-registration.md#the-two-error-shapes). - **A `400` request error has no `request_id` in its body.** Take it from the `X-Request-Id` header when you contact support. - **Some required fields aren't in the schema**, so leaving one out is a `400` that doesn't name the field, not a `422` `required_missing`. See [Set up a term](guides/set-up-a-term.md#6-when-a-write-fails). - **A `200` isn't always "done".** Some writes skip what they can't use without an error. Read the result back. See [Set up a term](guides/set-up-a-term.md#5-read-the-term-back). ## Contacting support Got a `500`, or something you can't explain? Tell us in the chat: choose **Create a ticket**, then **API Problem**. Include the `request_id` (or the `X-Request-Id` response header), the operation, the time of the call and the region. Report a problem: support@zooza.online Never include your `client_secret` or an access token. If you've shared one by mistake, [revoke the key](keys.md#security). --- # Error codes A `400` response carries one or more four-digit error codes in the [`RequestError`](errors.md#requesterror) envelope. This page lists every code. It is generated from the API reference, so it always matches what the API publishes. ```json { "errors": [{ "0066": "Neplatný zľavový kód" }], "request_valid": false } ``` - **Branch on the code, never on the message.** A code never changes meaning. Messages are written for people: they come in the **company's language** and their wording may change. The English messages below are for reference only. - **Some codes name a value.** The table says which, and where to find it: - *The value ends the message*, after ` - `, or in place of a placeholder: `{"0037": "Neplatná hodnota parametra - rate_tier"}`. - *The value comes under key `0`*, next to the code: `{"0074": "…", "0": "…"}`. - **Codes aren't tied to particular operations.** General codes such as `wrong_parameters_sent`, `resource_not_found`, `invalid_value` and `update_failed` can come from almost any operation, so handle codes you didn't expect. Link to a single code with `/api/error-codes#`, for example [`#0065`](#0065). A code that isn't clear, or one you think is returned by mistake? Ask us: support@zooza.online | Code | Name | Area | When it is returned | English message | Value | |---|---|---|---|---|---| | 0001 | wrong_version | Requests and validation | Returned when the request targets an API version that does not exist. | Wrong API version | | | 0002 | api_key_missing | Authentication and access | Returned when the request carries no credentials. | API Key Invalid | | | 0003 | api_key_invalid | Authentication and access | Returned when the API key is not recognised or cannot be used for this request. The message ends with the key that was sent; check it is correct and active. | API Key Invalid | value ends the message | | 0004 | invalid_method | Requests and validation | Returned when the HTTP method is not supported for the endpoint, or is not one of GET, POST, PUT or DELETE. | Invalid method | | | 0005 | resource_missing | Requests and validation | Returned when the record addressed by the request (for example by its id in the path) does not exist or is not available to your company. Check the id. | Resource missing | | | 0006 | auth_token_missing | Authentication and access | Returned when the operation needs a signed-in user and the request carries none. | Auth token missing | | | 0007 | user_not_logged_in | Authentication and access | Returned when the endpoint requires a signed-in user and the token sent is missing, invalid or expired. Sign in again and retry with a fresh token. | User is not logged in | | | 0008 | low_permissions | Authentication and access | Returned when the signed-in user or API key is not allowed to perform this action or access this record, for example because of its role or because the record belongs to someone else. | User lacks sufficient permissions | | | 0009 | no_user_found | Users and people | Returned when a booking or reservation cannot proceed because the client it refers to could not be found or created. | User not found | | | 0010 | already_registered | Bookings | Returned when the client already has an active booking for this programme, class or session. | User already enrolled | | | 0011 | event_full | Sessions and attendance | Returned when the session has no free places left, for example when booking a make-up or additional session. Choose another session. | This session is fully booked | | | 0012 | could_not_create_event | Sessions and attendance | Returned when a session could not be created. Not currently returned by the API. | Could not create session | | | 0013 | cant_create_registration | Bookings | Returned when a booking could not be created, for example because the submitted data was incomplete or the booking could not be saved. | Can't create booking | | | 0014 | create_user_no_email | Users and people | Returned when creating a client or user without an email address. Provide an email. | Can't create user: No email provided | | | 0015 | create_user_db_error | Users and people | Returned when a new client or user could not be saved. Retry, and contact support if it persists. | Can't create user: Database error | | | 0016 | create_user_bad_email | Users and people | Returned when creating a client or user with an email address that is not in a valid format. | Can't create user: Wrong email format | | | 0017 | bad_email | Requests and validation | Returned when an email address is missing, malformed or known to be undeliverable, for example on booking, sign-in or a user update, or when messaging a client whose email bounces. | Email has an incorrect format | | | 0018 | action_token_expired | Authentication and access | Returned when a one-time verification or authorisation token (for example from an email link) has expired, or when a connected service's authorisation has been revoked. Request a new link or reconnect. | Token expired | | | 0019 | course_doesnt_exist | Programmes and classes | Returned when the programme referenced by the request does not exist or is not available to your company. | Programme doesn't exist | | | 0020 | online_registration_disabled | Bookings | Returned when online booking is switched off for this programme or class. | Online sign-ups for this programme are not possible | | | 0021 | unknown_registration_type | Bookings | Returned when the booking request is made against a programme whose booking type does not support this operation. | Unknown booking type | | | 0022 | email_missing | Requests and validation | Returned when an email address is required (for example for the booking's client or buyer) but none was sent. | Email missing | | | 0023 | action_token_not_found | Authentication and access | Returned when a one-time verification token (for example from an email link) does not exist or was issued for a different action. Request a new link. | Token not found | | | 0024 | already_requested | Bookings | Returned when the client already has a pending booking request for this programme or class and no way of resolving the conflict was chosen; also when a one-off notification has already been sent. | Email with verification token already sent | | | 0025 | bad_datetime | Requests and validation | Returned when a date or time in the request (for example a scheduled send time for a message) cannot be parsed. The message ends with the refused value. | Incorrect date or time | value ends the message | | 0026 | email_subject_missing | Communication | Returned when sending an email message without a subject. | Enter email subject | | | 0027 | email_message_missing | Communication | Returned when sending an email message without a body. | Enter email message | | | 0028 | email_template_not_found | Communication | Returned when the requested email template does not exist. Not currently returned by the API. | Email template not found | | | 0029 | no_recipients | Communication | Returned when sending a message or sharing a link with no recipients selected. | No recipients selected | | | 0030 | action_token_error | Integrations | Returned when a token for an action or connected service is missing or invalid. Not currently returned as its own error code. | Action token expired or not found | | | 0031 | update_failed | Requests and validation | Returned when a change could not be saved, for example because the record is in a state that does not allow it or the save itself failed. The message ends with detail about what failed. | Update failed | value ends the message | | 0032 | cancellation_limit_reached | Sessions and attendance | Returned when a client tries to cancel attendance at a session after the cancellation deadline. The message ends with the deadline date and time. | Cancellation was allowed till {value} | value ends the message | | 0033 | wrong_parameters_sent | Requests and validation | Returned when required parameters are missing or have the wrong shape or value. The message ends with the parameter or detail that was refused. | Wrong parameters sent or parameters missing. | value ends the message | | 0034 | first_name_missing | Bookings | Returned when a booking is submitted without the client's first name. | First name missing | | | 0035 | last_name_missing | Bookings | Returned when a booking is submitted without the client's last name. | Last name missing | | | 0036 | phone_missing | Bookings | Returned when a booking is submitted without a phone number and the programme requires one. | Phone number missing | | | 0037 | invalid_value | Requests and validation | Returned when a parameter is present but its value is not allowed. The message ends with the field or detail that was refused. | Invalid parameter value | value ends the message | | 0038 | email_already_registered | Users and people | Returned when changing a user's email to an address that is already used by another account. | Email is already enrolled | | | 0039 | nothing_to_update | Requests and validation | Returned when an update request contains no changes compared with the stored data. | Nothing to update | | | 0040 | upload_failed | Files and documents | Returned when a file upload or generated file (such as an export) could not be stored, or when the upload request contained no file. | Upload failed | | | 0041 | registrations_cap_reached | Bookings | Returned when the class or programme has reached the maximum number of bookings allowed. | Maximum number of bookings reached | | | 0042 | unknown_feedback_token | Communication | Returned when a feedback link's token is missing, invalid or no longer valid. | Wrong token for feedback | | | 0043 | could_not_cancel_event | Sessions and attendance | Returned when a client's attendance at a session could not be cancelled, for example because no matching attendance record exists for the booking. | Could not cancel session | | | 0044 | replacements_limit_reached | Sessions and attendance | Returned when the client has used the maximum number of make-up sessions. Not currently returned as its own error code. | You've reached maximum number of make-up sessions | | | 0045 | invalid_replacement_credit | Sessions and attendance | Returned when the make-up credit used for a make-up session request is not valid, for example already used, expired or not applicable to the chosen session. | Your request for make-up session is not valid | | | 0046 | deleting_failed | Requests and validation | Returned when a record could not be deleted, for example because it is still in use or the delete failed. Some responses end the message with detail about what failed. | Deleting failed | | | 0047 | consent_required | Sessions and attendance | Returned when a client cancels a make-up session without confirming the required consent (for example that the make-up credit may be lost). Repeat the request with consent given. | Consent required | | | 0049 | schedule_doesnt_exist | Programmes and classes | Returned when the class referenced by the request does not exist or is not available to your company. | Class doesn't exist | | | 0050 | internal_error | Other | Returned when an unexpected server-side problem stops the request, for example a failure to prepare storage for a document. Retry, and contact support if it persists. | Internal error | | | 0051 | product_doesnt_exist | Payments | Returned when an order refers to a product that does not exist or is not available. | Product not found | | | 0052 | parameter_not_found | Payments | Returned when a payment request cannot find the record it relies on. The message ends with what is missing, such as the order or the payment. | Parameter not found | value ends the message | | 0053 | min_persons | Bookings | Returned when a booking includes fewer participants than the class requires, or no participant list. Add participants. | You need to enrol more persons | | | 0054 | max_persons | Bookings | Returned when a booking includes more participants than the class allows. Remove participants. | You need to enrol fewer persons | | | 0055 | invalid_company | Authentication and access | Returned when the requested company is not accessible to the user, is inactive, or does not own the record being accessed. | Invalid company | | | 0056 | schedule_started | Bookings | Returned when booking a class that has already started and the programme asks the client to confirm a late booking. Repeat the request with the late booking confirmed. | Class has already started | | | 0057 | unknown_payment_method | Payments | Returned when the requested payment method is not recognised or not available for this booking or order. | Unknown payment method | | | 0058 | registration_not_found | Bookings | Returned when the booking referenced by the request does not exist or is not accessible. | Booking not found | | | 0059 | event_not_found | Sessions and attendance | Returned when the session referenced by the request does not exist or does not belong to the given class. | Session not found | | | 0060 | invalid_amount | Communication | Returned when sending a message to more than 10 recipients without a matching confirmation of the recipient count. Send the exact number of recipients as confirmation. | Invalid amount | | | 0061 | attendance_doesnt_exist | Sessions and attendance | Returned when the attendance record does not exist. Not currently returned by the API. | Attendance doesn't exist | | | 0062 | sub_resource_not_found | Requests and validation | Returned when a linked item (such as a file or URL attached to a programme, class, session or booking) cannot be found. The message ends with the type of item. | Sub resource not found | value ends the message | | 0063 | relation_already_exist | Requests and validation | Returned when trying to attach an item (such as a file, URL or product) that is already attached. | Relation already exists | | | 0064 | delete_failed | Requests and validation | Returned when a record could not be deleted, for example because it is still in use. Some responses end the message with detail about what failed. | Deleting failed | | | 0065 | resource_not_found | Requests and validation | Returned when a record referenced by the request does not exist or does not belong to your company. The message ends with the type of record that was not found. | Resource not found | value ends the message | | 0066 | invalid_discount_code | Payments | Returned when the discount code does not exist, is no longer valid, or cannot be used for this class or booking. | Invalid discount code | | | 0067 | already_canceled | Sessions and attendance | Returned when cancelling attendance at a session that has already been cancelled for this booking. | Session already cancelled | | | 0068 | insert_failed | Requests and validation | Returned when a new record could not be created. The message may end with detail about what failed. | Insert failed | | | 0069 | invalid_url | Integrations | Returned when checking a booking form installation and the page address given is not a valid URL. | URL of the widget is not a valid URL | | | 0070 | url_doesnt_exist | Integrations | Returned when checking a booking form installation and the page address given could not be reached. | URL could not be reached. Make sure you've entered existing URL. | | | 0071 | invalid_script | Integrations | Returned when checking a booking form installation and the Zooza script on the page is not the expected type. | The Zooza script exists on page, but it's not of correct type | | | 0072 | too_many_scripts | Integrations | Returned when checking a booking form installation and the page contains more than one Zooza script. | There's too many Zooza scripts on page | | | 0073 | script_not_found | Integrations | Returned when checking a booking form installation and no Zooza script was found on the page. | No Zooza script found on page | | | 0074 | payment_transfer_failed | Payments | Returned when a payment cannot be moved from one booking or order to another, for example because only cash or bank transfer payments can be moved. The detail is returned alongside the message. Some responses carry extra detail under key `0`, next to the message. | Payment transfer failed | value under key 0 | | 0075 | invalid_currency | Payments | Returned when the booking requests a currency the programme does not support. Some responses carry extra detail under key `0`, next to the message. | Invalid Currency | value under key 0 | | 0076 | invalid_account_status | Authentication and access | Returned when the company's account is not yet verified (or is otherwise restricted) and the action, such as sending custom or bulk emails, importing or emailing exports, is not allowed yet. Some responses carry extra detail under key `0`, next to the message. | Your account is not yet verified, so you cannot make this change – please continue with other settings, or contact our support (question mark) to speed up the verification. | value under key 0 | | 0078 | trial_registration_exists_in_schedule | Bookings | Returned when the client already has a trial booking in this class. Some responses carry extra detail under key `0`, next to the message. | You already have a trial booked in this class. Check your profile for the details. | value under key 0 | | 0079 | share_link_expired | Bookings | Returned when a booking or verification uses a private access link that has expired or been disabled. Some responses carry extra detail under key `0`, next to the message. | This private access link has expired or been disabled. Please contact the organizer to receive a new link. | value under key 0 | | 0080 | last_owner_cannot_change_role | Users and people | Returned when the only remaining owner of the company tries to change their own role. Add another owner first. Some responses carry extra detail under key `0`, next to the message. | You are the last remaining user with the Owner role. You cannot change your role unless you add another owner. | value under key 0 | | 0081 | event_full_trial | Bookings | Returned when booking a trial session that has no free places left. Choose another session. | This trial session is fully booked—please choose another time. | | | 0082 | invoice_not_generated | Invoicing | Returned when refreshing an invoice's document before the invoice has been issued (it has no invoice number yet). | The invoice has not been generated yet | | | 0083 | buyer_data_not_found | Bookings | Reserved for when the buyer details of a booking cannot be found. Not currently returned. | Buyer details not found | | | 0084 | buyer_person_not_assigned | Users and people | Reserved for when a booking has no buyer person assigned. Not currently returned. | No buyer is assigned | | | 0085 | not_deleted | Requests and validation | Returned when you try to restore a session, class, programme or booking that is not deleted. | This item is not deleted, so it cannot be restored | | | 0086 | not_restorable | Requests and validation | Returned when a deleted session, class or booking cannot be restored because it was deleted before restoring was supported. | This item cannot be restored | | | 0087 | restore_window_expired | Requests and validation | Returned when you try to restore a deleted item (session, class, programme, booking or scheduled payment) after the 30-day restore window has passed. | The time to restore this item has passed | | | 0088 | bank_statement_source_invalid | Invoicing | Returned when a billing profile is saved with a bank statement source that is not one of the supported values. | Invalid bank statement source | value ends the message | | 0089 | online_card_provider_invalid | Payments | Returned when the company's default programme settings name an online card payment provider that is not available for the company's region. | This card payment provider is not available | value ends the message | | 0090 | direct_debit_provider_invalid | Payments | Returned when the company's default programme settings name a direct debit provider that is not available for the company's region. | This direct debit provider is not available | value ends the message | | 0091 | online_transfer_provider_invalid | Payments | Returned when the company's default programme settings set an online bank transfer provider; this payment method is no longer supported, so send null or omit it. | This online bank transfer provider is not available | value ends the message | | 0092 | gc_bank_data_reconnect_failed | Payments | Returned when reconnecting the bank account feed on a billing profile fails. Try the reconnection again. | Reconnecting the bank account failed | | | 0093 | gc_bank_data_iban_not_found | Payments | Returned when you try to remove a bank account (IBAN) from a billing profile's bank feed and that IBAN is not connected to it. | Bank account not found | value ends the message | | 0094 | pso_offline_charge_disabled | Payments | Returned when you manually send a scheduled payment to be charged automatically (stored card or direct debit), but automatic charging is not enabled for that booking's payment plan. | Offline charging is not enabled for this payment plan | | | 0095 | already_in_offline_queue | Payments | Returned when you manually send a scheduled payment to be charged automatically, but it has already been queued for charging. | This payment is already queued for an offline charge | | | 0096 | scheduled_payment_not_processed | Payments | Returned when you manually send a scheduled payment to be charged automatically before it has been processed; only processed payments can be pushed. | This scheduled payment has not been processed yet | | | 0097 | missing_offline_charge_provider | Payments | Returned when you manually send a scheduled payment to be charged automatically, but the booking has no stored card or direct debit provider to charge. | No provider is set up for offline charges | | | 0098 | offline_charge_no_longer_eligible | Payments | Returned when you manually send a scheduled payment to be charged automatically, but the booking can no longer be charged that way, e.g. the stored card was removed or the direct debit mandate cancelled. | This payment can no longer be charged offline | | | 0100 | todo_not_found | Other | Returned when the requested to-do does not exist or does not belong to your company. | Task not found | | | 0101 | invalid_status_transition | Requests and validation | Returned when an item cannot move to the requested status from its current one, e.g. changing a to-do to a status not allowed from its current status, or deleting or restoring a scheduled payment that is not in a deletable or restorable state. | This status change is not allowed | | | 0102 | todo_assignee_not_in_company | Other | Returned when a to-do is assigned to a user who has no role in your company. | The assignee is not a member of this company | | | 0103 | todo_not_deleted | Other | Returned when you try to restore a to-do that is not deleted. | The task could not be deleted | | | 0150 | slack_oauth_state_invalid | Integrations | Returned (as an error on the redirect back to the app) when the Slack authorization response is missing or carries an invalid state. Start the Slack connection again. | The Slack connection request is invalid. Please try again. | | | 0151 | slack_oauth_state_expired | Integrations | Returned (as an error on the redirect back to the app) when the Slack authorization took too long and its state expired. Start the Slack connection again. | The Slack connection request has expired. Please try again. | | | 0152 | slack_oauth_exchange_failed | Integrations | Returned (as an error on the redirect back to the app) when connecting Slack fails after authorization, e.g. Slack rejects the authorization code. | Connecting to Slack failed. Please try again. | | | 0153 | slack_connection_not_found | Integrations | Returned when the requested Slack connection does not exist for your company. | Slack connection not found | | | 0154 | slack_connection_inactive | Integrations | Returned when the Slack workspace installation is no longer active, so it cannot be connected or its channels listed. Reconnect Slack. | The Slack connection is inactive | | | 0155 | slack_needs_reauth | Integrations | Reserved for when a Slack connection needs to be re-authorised. Not currently returned. | The Slack connection needs to be authorised again | | | 0156 | slack_workspace_owned_by_other_network | Integrations | Returned when the Slack workspace is already connected to a different network than your company's. | This Slack workspace belongs to another network | | | 0157 | slack_uninstall_owner_only | Integrations | Returned when a company that did not install the Slack workspace tries to disconnect it; only the installing company can. | Only the company that connected this Slack workspace can disconnect it | | | 0158 | slack_channel_not_found | Integrations | Returned when the channels of the connected Slack workspace cannot be listed. | Slack channel not found | | | 0159 | slack_invalid_target | Integrations | Reserved for when a Slack delivery target is invalid. Not currently returned. | Invalid Slack channel or user | | | 0160 | slack_link_otp_invalid | Integrations | Reserved for an invalid one-time code when linking a Slack user to a Zooza user. Not currently returned. | Invalid code | | | 0161 | slack_link_otp_expired | Integrations | Reserved for an expired one-time code when linking a Slack user to a Zooza user. Not currently returned. | The code has expired | | | 0162 | slack_link_otp_rate_limited | Integrations | Reserved for too many one-time code attempts when linking a Slack user to a Zooza user. Not currently returned. | Too many attempts. Please try again later. | | | 0163 | slack_link_no_zooza_user_found | Integrations | Reserved for when no Zooza user matches a Slack user being linked. Not currently returned. | No Zooza user was found for this Slack account | | | 0164 | delivery_provider_not_found | Integrations | Reserved for an unknown notification delivery provider. Not currently returned. | Message delivery provider not found | | | 0165 | delivery_subscription_not_found | Integrations | Returned when the requested Slack notification subscription does not exist on that connection. | Notification subscription not found | | | 0166 | slack_install_not_found | Integrations | Returned when the Slack workspace installation you try to connect to does not exist. | Slack installation not found | | | 0167 | until_must_be_future | Payments | Returned when you set a payment grace period on a booking with an end date that is not in the future. | The end date must be in the future | | | 0168 | registration_paid | Payments | Returned when you set a payment grace period on a booking that is already fully paid or has nothing to pay. | The booking is already fully paid | | | 0169 | invalid_value_type | Requests and validation | Returned when a custom metadata field is created with an unsupported value type, or a metadata value does not match its field's type (string, int, bool or JSON). | Invalid value type | | | 0170 | metadata_key_immutable_type | Requests and validation | Returned when you try to change the value type of an existing custom metadata field; the type cannot be changed after creation. | The type of this key cannot be changed | | | 0171 | metadata_key_duplicate_name | Requests and validation | Returned when you rename a custom metadata field to a name another field in your company already uses. | A key with this name already exists | | | 0172 | unknown_user | Authentication and access | Returned when a login is rejected, or no Zooza user exists for the authenticated email address. | Unknown user | | | 0173 | relationship_already_exists | Users and people | Returned when you create a relationship between two people that already exists. | This relationship already exists | | | 0174 | relationship_self_reference | Users and people | Returned when you try to create a relationship between a person and themselves. | A person cannot be related to themselves | | | 0175 | relationship_target_missing | Users and people | Returned when the other person in a new relationship does not exist in your company. | The related person was not found | | | 0176 | relationship_type_invalid | Users and people | Returned when the relationship category and type sent do not match a known relationship type. | Invalid relationship type | | | 0177 | relationship_creation_failed | Users and people | Returned when a relationship between two people could not be saved. | The relationship could not be created | | | 0178 | company_inactive | Authentication and access | Returned for any request made to a company whose Zooza account is no longer active. | This organisation's account is no longer active. Please contact the organiser for assistance. | | | 0179 | file_too_large | Files and documents | Returned when an uploaded file exceeds the maximum size allowed for that type of file. | The file is too large | | | 0180 | user_already_in_company | Users and people | Returned when you invite someone as staff who already has a staff role in your company. | This user is already a member of the company | | | 0181 | mandate_id_format_invalid_bacs | Direct debit | Returned when a direct debit mandate reference (or the mandate reference format being saved) does not meet the BACS rules, e.g. wrong length or characters. | Invalid BACS mandate reference format | value ends the message | | 0182 | mandate_id_format_invalid_sepa | Direct debit | Returned when a direct debit mandate reference (or the mandate reference format being saved) does not meet the SEPA rules, e.g. wrong length or characters. | Invalid SEPA mandate reference format | value ends the message | | 0183 | direct_debit_fields_invalid | Direct debit | Returned when the payer's direct debit details (such as account holder or bank account) are missing or invalid. | Invalid direct debit details | value ends the message | | 0184 | fastpay_token_invalid | Direct debit | Returned when connecting FastPay with a token that FastPay rejects. Check the token and try again. | The FastPay token is invalid | | | 0185 | fastpay_connection_failed | Direct debit | Reserved for a failed FastPay connection. Not currently returned. | Connecting to FastPay failed | | | 0186 | fastpay_not_connected | Direct debit | Returned when you submit a FastPay direct debit batch but the company has no FastPay connection. | FastPay is not connected | | | 0187 | fastpay_period_already_submitted | Direct debit | Returned when a FastPay direct debit batch for that charge date has already been submitted; submitting it again would charge clients twice. | Charges for this date have already been submitted to FastPay | value ends the message | | 0188 | fastpay_duplicate_reference | Direct debit | Returned when a FastPay direct debit batch cannot be built because two charges share the same direct debit reference. | FastPay refused a duplicate reference | | | 0189 | fastpay_no_charges | Direct debit | Returned when there are no charges to collect for the requested FastPay batch and charge date. | There are no charges to submit to FastPay | | | 0190 | fastpay_submission_failed | Direct debit | Returned when a FastPay direct debit batch could not be submitted to FastPay. Nothing was charged, so you can retry. | Submitting the charges to FastPay failed | | | 0191 | provider_not_connected | Payments | Returned when a payment provider is used (on a payment, or set on a programme) that your company has not connected. | Online payments are not set up. Please contact the organiser. | | | 0192 | invalid_state_transition | Other | Returned when a changelog entry is moved to a state that is not allowed from its current state, e.g. from draft straight to published. | This status change is not allowed | | | 0193 | segment_pricing_tier_exceeds_base | Payments | Returned when a payment plan's per-block pricing tier is set higher than the plan's base price. | A block price cannot be higher than the base price | | | 0194 | signup_rate_limited | Authentication and access | Returned when too many sign-up attempts come from the same IP address. Wait before trying again. | Too many sign-up attempts. Please try again later. | | | 0195 | discount_code_already_applied | Payments | Returned when a discount code is applied to a booking that already uses that code. | This discount code has already been applied. | | | 0196 | payment_routing_cycle | Payments | Returned when a payment cannot be recorded because the bookings or orders that manage each other's payments form a loop. | Payment cannot be routed: the payment-management chain forms a loop. | | | 0197 | payment_routing_depth_exceeded | Payments | Returned when a payment cannot be recorded because the chain of bookings or orders that manage each other's payments is too long. | Payment cannot be routed: the payment-management chain is too long. | | | 0198 | payment_routing_cross_company | Payments | Returned when a payment would be recorded on a booking or order that manages it but belongs to another company. | Payment cannot be routed to a record in another company. | | | 0199 | cannot_modify_managed_registration | Payments | Returned when you change billing, the payment plan, the debt or the registration fee of a booking whose payments are managed by another booking or order. The message ends with the refused operation. | Payments on this booking are managed elsewhere and cannot be changed here: {value} | value ends the message | | 0200 | google_oauth_not_configured | Integrations | Returned when you try to connect Google but the Google integration is not available on this server. | Google integration is not configured. | | | 0201 | google_connection_not_found | Integrations | Returned when your company has no Google connection for the requested action. Connect Google first. | Google connection not found. | | | 0202 | google_service_not_found | Integrations | Returned when the requested Google service is not connected for your company. | Google service not found. | | | 0203 | google_service_invalid | Integrations | Returned when you request a Google service that is not supported. The message ends with the service you sent. | Invalid Google service: {value} | value ends the message | | 0204 | google_oauth_failed | Integrations | Returned when Google authorization fails during connection. The message ends with the reason reported by Google. | Google authorization failed: {value} | value ends the message | | 0205 | google_business_profile_inactive | Integrations | Returned when a Google Business Profile action is attempted but your company's Google Business Profile service is not active. | This Google Business Profile is inactive. | | | 0206 | google_api_error | Integrations | Returned when a request to Google fails, e.g. linking or submitting a venue, fetching locations or categories, or reading forms. The message ends with the operation that failed. | Google API request failed: {value} | value ends the message | | 0207 | google_location_not_found | Integrations | Returned when no Google Business Profile account or location is available to submit a venue to. | Google location not found. | | | 0208 | missing_category | Integrations | Returned when a venue is submitted to Google Business Profile without a primary category. | Category is required. | | | 0209 | missing_region | Integrations | Returned when a venue is submitted to Google Business Profile but its address has no usable region. | Region is required. | | | 0210 | invalid_export_type | Requests and validation | Returned when an export is requested with an unknown export type. | Invalid export type | | | 0211 | export_type_not_supported | Requests and validation | Returned when the requested export type is recognised but cannot be produced yet. | This export type is not supported yet | | | 0212 | too_many_recipients | Communication | Returned when a shared link is sent to more than 10 recipients in one request. Split the recipients into smaller batches. | You can share a link with at most 10 recipients at a time. | | | 0213 | invalid_email | Requests and validation | Returned when an email address in the request is not valid, e.g. a shared-link recipient or a contact's email. The message carries the offending address or the field name. | Invalid email address: {value} | value ends the message | | 0214 | shared_link_daily_limit | Communication | Returned when a shared link is sent to an address that is not an existing client and already received a shared link in the last 24 hours; the whole batch is refused. The message carries the address, one error per address. | This address already received a shared link in the last 24 hours: {value} | value ends the message | | 0215 | iban_already_used_by_profile | Invoicing | Returned when saving a bank account whose IBAN is already used by another invoice profile. Use a different IBAN or edit the profile that already holds it. | This IBAN is already used by another invoice profile. | | | 0216 | billing_resolver_not_reconciled | Invoicing | Returned when switching a company's invoicing over to invoice profiles is refused because existing billing data still has unresolved differences. Resolve the differences first, then retry. | This invoice profile isn't reconciled yet and can't be switched over until the outstanding differences are resolved. | | | 0217 | cannot_delete_default_bank_account | Invoicing | Returned when trying to delete the default bank account. Set another account as default first. | You can't delete the default bank account. Set another account as default first. | | | 0218 | cannot_delete_default_profile | Invoicing | Returned when trying to delete the default invoice profile. | The default invoice profile can't be deleted. | | | 0219 | view_config_invalid | Requests and validation | Returned when a saved view's configuration is malformed or contains an unknown setting. The message carries the name of the refused setting. | Invalid view configuration. | value ends the message | | 0220 | view_config_too_large | Requests and validation | Returned when a saved view's configuration exceeds the maximum allowed size. | View configuration is too large. | | | 0221 | export_format_invalid | Requests and validation | Returned when a view or report export is requested in an unsupported file format. | Invalid export format | | | 0222 | export_too_large | Requests and validation | Returned when a view or report export would contain more rows than the allowed maximum. Narrow the filters and try again. | Export is too large, try narrowing the filters | | | 0223 | view_type_not_exportable | Requests and validation | Returned when exporting a view whose type does not support export. | This view cannot be exported yet | | | 0224 | google_forms_inactive | Integrations | Returned when a Google Forms operation is requested but the Google Forms service is not connected for the company. Connect it first. | The Google Forms service is not connected for this company. | | | 0225 | google_scope_not_granted | Integrations | Returned when connecting a Google service and the user did not approve all the permissions that service needs. The message names the service; reconnect and approve all requested access. | Google did not grant the permissions the {value} service needs. Please connect again and approve all requested access. | value ends the message | | 0226 | google_form_not_accessible | Integrations | Returned when a Google Form cannot be opened with the connected Google account, e.g. it was deleted or belongs to another account. The message carries the form id. | Zooza cannot open this form ({value}). Select it again using the Google account connected to Zooza. | value ends the message | | 0227 | google_form_no_email_collection | Integrations | Returned for a Google Form that does not collect respondents' email addresses, so it cannot be attached. Turn on email collection in Google Forms and attach it again. | This form does not collect respondents' email addresses. Turn email collection on in Google Forms, then attach it again. | | | 0228 | google_form_invalid_send_trigger | Integrations | Returned when attaching a Google Form with a send moment that is not possible at that level, e.g. 'after registration' on a form attached to an existing booking. | A form attached to a single registration cannot be sent after registration — that moment has already passed. | | | 0229 | google_form_answers_expired | Integrations | Returned as the error key on a form response whose stored answers were deleted because the company's retention period passed. The form was completed but the answers are no longer available. | The retention period for these answers has passed, so they were deleted. The form was completed; the answers themselves are no longer available. | | | 0230 | google_form_answers_purged_registration | Integrations | Returned as the error key on a form response whose answers were deleted together with the booking. The form was completed but the answers are no longer available. | The booking was deleted, so these answers were deleted with it. The form was completed; the answers themselves are no longer available. | | | 0231 | google_form_answers_purged_person | Integrations | Returned as the error key on a form response whose answers were deleted together with the client profile. The form was completed but the answers are no longer available. | The client profile was deleted, so these answers were deleted with it. The form was completed; the answers themselves are no longer available. | | | 0232 | google_form_answers_purged_form | Integrations | Returned as the error key on a form response whose answers were deleted because the form was removed from Zooza. The form was completed but the answers are no longer available. | The form was removed from Zooza, so its stored answers were deleted. The form was completed; the answers themselves are no longer available. | | | 0233 | google_form_answers_purged | Integrations | Returned as the error key on a form response whose answers are no longer stored and the reason is not known. The form was completed but the answers are no longer available. | These answers are no longer stored. The form was completed; the answers themselves are no longer available. | | | 0234 | placement_target_occupied | Other | Returned when moving rows in a custom report into a section that already holds rows in other periods. The message carries the number of blocking periods and their dates. | The target section already holds rows in other periods | value ends the message | | 0235 | invalid_domain_name | Requests and validation | Returned when a domain submitted for card-payment wallets or for video embedding is not a valid domain name. | This is not a valid domain name. | | | 0236 | payment_method_domain_registration_failed | Payments | Returned when Stripe could not register a domain for wallet payments (e.g. Apple Pay, Google Pay). The message carries the domain; try again later. | Stripe could not register the domain {value}. Please try again later. | value ends the message | | 0237 | payment_method_domain_not_found | Payments | Returned when the requested payment-method domain does not exist in the company's Stripe account. The message carries the domain id. | The domain {value} was not found in your Stripe account. | value ends the message | | 0238 | payment_method_domains_read_failed | Payments | Returned when the list of registered payment-method domains could not be loaded from Stripe. Try again. | We could not load your registered domains from Stripe. Please try again. | | | 0239 | whatsapp_number_already_registered | Communication | Returned when a phone-number registration or verification step is requested for a WhatsApp number that is already connected to the WhatsApp Business app and needs no verification. | This number is already connected to the WhatsApp Business app, so it does not need verification. | | | 0240 | period_locked | Other | Returned when changing or recalculating custom report data for a period that has been locked. The message carries who locked it and when. | This period is locked | value ends the message | | 0241 | login_rate_limited | Authentication and access | Returned when too many login or sign-in attempts were made from the same address or for the same contact. Wait and try again later. | Too many attempts. Please try again later. | | | 0242 | invalid_contact | Authentication and access | Returned during client login when the entered contact is neither a valid email address nor a valid phone number. | Enter a valid email address or phone number. | | | 0243 | contact_channel_unavailable | Authentication and access | Returned when a login code cannot be sent to the given contact, e.g. the channel is not supported or the phone number does not match exactly one client. | We can't send a code to this contact right now. | | | 0244 | glue_set_invalid_vector | Sessions and attendance | Returned when the matching rules for linking classes' sessions are malformed, switch off an always-on rule (location, date) or contain an unknown rule. | Invalid linked sessions setup | | | 0245 | event_already_glued | Sessions and attendance | Returned when saving a set of linked classes that includes a class already linked in another active set. The message carries the class id. | This session is already linked | value ends the message | | 0246 | glued_session_full | Bookings | Returned when a booking is refused because the linked sessions shared between classes have no free places for the requested number of seats. | A linked session is full | | | 0247 | start_date_not_available | Bookings | Returned when a booking requests a later start date that is not available for the class. Choose another start date or join the waiting list. | The selected start date is not available. Please choose another start or join the waiting list. | | | 0248 | priority_window_closed | Bookings | Returned when booking a class that is open only for priority registration and the priority window is not open now. | Priority registration for this class is not open right now | | | 0249 | priority_not_eligible | Bookings | Returned when booking a class during its priority registration window and the client is not an eligible existing client. | Priority registration for this class is only available to existing clients | | | 0250 | replacement_admin_managed | Sessions and attendance | Returned when a client tries to book a make-up session for a class where make-ups are assigned only by the organiser. | Make-up sessions for this class are assigned by the organiser. Please contact them to arrange yours. | | | 0251 | additional_sessions_not_allowed | Sessions and attendance | Returned when a client tries to book an additional session but the programme does not allow additional sessions. | Additional sessions are not available for this course. | | | 0252 | additional_sessions_limit_reached | Sessions and attendance | Returned when the client has already booked the maximum number of additional sessions allowed. | You've reached the maximum number of additional sessions you can book. | | | 0253 | additional_session_too_soon | Sessions and attendance | Returned when the chosen session starts too soon to be booked or moved as an additional session. Pick a later session. | This session is too soon to book. Please choose a later one. | | | 0254 | refund_requests_not_allowed | Payments | Returned when a client submits a refund request but refund requests are not enabled for this booking or company. | Refund requests are not available here. Please contact the organiser. | | | 0255 | refund_request_exists | Payments | Returned when a client submits a refund request for a booking that already has one in progress. | You already have a refund request in progress for this booking. | | | 0256 | refund_request_not_found | Payments | Returned when the referenced refund request does not exist or does not belong to the company. | We could not find this refund request. | | | 0257 | refund_request_already_resolved | Payments | Returned when acting on a refund request that has already been resolved. | This refund request has already been resolved. | | | 0258 | additional_session_money_back_unavailable | Sessions and attendance | Returned when cancelling an additional session with a money-back option (e.g. refund or credit) that is not available for it. | This way of getting your money back is not available here. Please contact the organiser. | | | 0259 | additional_session_not_paid | Sessions and attendance | Returned when trying to move or cancel an additional session that has not been paid yet. | This extra session has not been paid for yet, so it cannot be moved and there is nothing to hand back. | | | 0260 | additional_session_cancellation_forfeited | Sessions and attendance | Returned when trying to move or cancel an additional session after its cancellation deadline has passed. | The cancellation deadline for this session has passed. It can no longer be moved and no money can be handed back. | | | 0261 | additional_session_event_not_eligible | Sessions and attendance | Returned when the chosen session cannot be used for an additional session. Pick another session from the offered list. | This session cannot be chosen for your extra session. Please pick another date from the list. | | | 0262 | person_not_found | Users and people | Returned when a participant or buyer referenced in a booking or order cannot be matched, e.g. the id does not exist or does not belong to the signed-in client. | Participant could not be matched | | | 0263 | cant_create_person | Users and people | Returned when a new participant could not be created while processing a booking. | Participant could not be created | | | 0264 | missing_parameters | Requests and validation | Returned when required fields are missing from the request, e.g. when creating or updating a contact or a session note. | Required information is missing | | | 0265 | place_already_exist | Programmes and classes | Returned when creating a venue that already exists for the company. | This venue already exists | | | 0266 | whatsapp_template_not_approved | Communication | Returned when sending a WhatsApp message with a template that has not been approved. | Template has not been approved | | | 0267 | api_error | Integrations | Returned when an external service the request depends on fails or is not configured, e.g. invoice document rendering or an SMS provider. The message names the failing service. | Service error | value ends the message | | 0268 | inserting_failed | Other | Returned when a record could not be created, e.g. an email signature or a VAT rate. The message names the record type. | Could not be created | value ends the message | | 0269 | missing_resource | Invoicing | Returned when a programme references an invoice profile that cannot be found. The message names the missing resource. | Required resource is missing | value ends the message | | 0270 | oauth_failed | Integrations | Returned when an authorisation step with an external provider fails, e.g. revoking access to an invoicing service. The message names the operation. | Authorisation failed | value ends the message | | 0271 | sync_failed | Integrations | Returned when synchronising data with an external system fails, e.g. invoicing accounts, invoice series or video domains. The message names what failed to sync. | Synchronisation failed | value ends the message | | 0272 | unsupported_provider | Integrations | Returned when the requested provider is not supported for the operation, e.g. an unknown email integration or invoice templates for a non-Zooza invoicing engine. The message names the provider where known. | Provider is not supported | value ends the message | | 0273 | xero_auth_failed | Integrations | Returned when connecting Xero fails during authorisation. | Connecting to Xero failed | | | 0274 | domain_already_added | Integrations | Returned when adding a video embedding domain that is already on the company's list. | This domain is already on your list. | | | 0275 | domain_is_platform_managed | Integrations | Returned when adding a video embedding domain that Zooza already manages and always allows; it does not need to be added. | Zooza manages this domain for you, so it is always allowed. You do not need to add it. | | | 0276 | vimeo_domain_sync_failed | Integrations | Returned when the update of allowed domains on the company's videos could not be started. Try again. | We could not start updating your videos. Please try again. | | | 0277 | refund_gateway_declined | Payments | Returned when the payment provider declines or fails a refund. The message carries the provider's reason. | The refund was declined by the payment provider | value ends the message | | 0278 | contact_field_key_invalid | Users and people | Returned when a contact custom field key is invalid: use lowercase letters, digits and underscores, starting with a letter. The message carries the refused key. | Invalid custom field key. Use lowercase letters, digits and underscores, starting with a letter. | value ends the message | | 0279 | contact_field_key_exists | Users and people | Returned when creating a contact custom field with a key that already exists. The message carries the key. | A custom field with this key already exists | value ends the message | | 0280 | contact_field_not_found | Users and people | Returned when a contact refers to a custom field that does not exist. The message carries the field key. | Custom field not found | value ends the message | | 0281 | contact_field_type_change_forbidden | Users and people | Returned when trying to change the key or type of an existing contact custom field. The message names the refused property. | The key and type of a custom field cannot be changed | value ends the message | | 0282 | contact_form_invalid_settings | Users and people | Returned when contact form settings are invalid. The message carries the path of the refused setting. | Invalid contact form settings | value ends the message | | 0283 | contact_email_exists | Users and people | Returned when creating or updating a contact with an email address another contact already uses. | Another contact already uses this email address. | | | 0284 | contact_email_required | Users and people | Returned when converting a contact to a client and the contact has no email address. | The contact needs an email address before it can be converted to a client. | | | 0285 | contact_already_client | Users and people | Returned when converting a contact that is already linked to a client. | This contact is already linked to a client. | | | 0286 | contact_form_origin_not_allowed | Users and people | Returned when a contact form is submitted from a website that is not allowed for that form. | This contact form cannot be used on this website. | | | 0287 | contact_form_default_cannot_be_archived | Users and people | Returned when trying to archive the company's default contact form. | The default contact form cannot be archived. | | | 0288 | provider_cannot_charge | Payments | Returned when a client tries to pay by card but the company's Stripe account cannot take charges yet (e.g. onboarding unfinished or the account disabled). | Card payments are not available right now. Please contact the organiser. | | | 0289 | meta_page_already_connected | Integrations | Returned when activating a Facebook Page that is already connected to another company. The message carries the Page id. | This Facebook Page is already connected to another company | value ends the message | | 0290 | meta_graph_error | Integrations | Returned when Meta (Facebook) rejects a request made on behalf of the connected account, for example while listing its pages. The message ends with the Meta resource that failed. | Meta returned an error | value ends the message | | 0291 | meta_mapping_invalid | Integrations | Returned when a Meta lead form field mapping is malformed or points to a field that cannot be used. The message ends with the path of the invalid mapping entry. | The Meta form field mapping is invalid | value ends the message | | 0292 | global_payments_keys_invalid | Integrations | Returned when the Global Payments App ID or App Key cannot be verified, either while connecting the account or when a payment is started. Check the credentials and connect again. | The Global Payments App ID or App Key is invalid. Please check the credentials and try again. | | | 0293 | global_payments_connection_in_use | Integrations | Returned when you try to remove a Global Payments connection that is still the fallback for other connections or is linked to billing profiles. Reassign those first. | This Global Payments account can't be removed while it is the fallback for other accounts. Set another account as the fallback first. | | | 0294 | global_payments_declined | Payments | Returned when a Global Payments card payment is declined or does not complete. The client should check the card details or use another card. | The card payment could not be completed. Please check your card details or try another card. | | | 0295 | payment_request_expired | Payments | Returned when a card payment is attempted on a payment request that has expired. Start a new payment instead of retrying the old one. | This payment session has expired. Please start the payment again. | | | 0296 | global_payments_sca_required | Payments | Returned when a Global Payments card payment is submitted without a completed 3D Secure verification. The client must complete card verification with their bank and try again. | Card verification (3D Secure) wasn't completed. Please try again and confirm the payment with your bank. | | | 0297 | already_registered_open | Bookings | Returned when a client tries to book a pay-as-you-go class they already have a booking in. Log in to book a session, or explicitly ask for a new booking. | You are already registered for this. Log in to book your session, or register again. | | | 0298 | claim_already_open | Users and people | Returned when an email verification (identity claim) is already pending for this person. Wait for it to be confirmed or cancel it first. | An email verification is already pending for this person. Wait until it is confirmed, or cancel it first. | | | 0299 | identity_claim_not_confirmable | Users and people | Returned when an email verification can no longer be completed or cancelled, for example because it expired, was cancelled, or the target account changed. | This email verification can no longer be completed. It may have expired or been cancelled. | | | 0300 | person_has_no_identity | Users and people | Returned when a person without an email address is asked to become the account holder or buyer. Add an email address to the person first. | This person has no email address, so they cannot become the account holder. Add an email address first. | | | 0301 | identity_change_not_allowed | Users and people | Returned when you try to change the login email of a person who already has one. The login email cannot be changed through this operation. | This person already has an email address used for logging in. It cannot be changed here. | | | 0302 | owner_required | Users and people | Returned when someone other than the account owner tries to manage email verifications or promote a person to account holder. | Only the account owner can do this. | | | 0303 | no_registrations_selected | Users and people | Returned when promoting a person to account holder without selecting any of their bookings to move. Select at least one booking. | No bookings are selected. Select at least one booking. | | | 0304 | invoice_series_counter_lower | Invoicing | Returned when an invoice series counter would be set below its current value without confirmation. The message ends with the lowest allowed next number; confirm to lower it anyway. | The invoice counter cannot be set lower than the current value ({value}). Confirm to lower it anyway. | value ends the message | | 0305 | invoice_series_counter_conflict | Invoicing | Returned when the invoice series counter was changed by someone else in the meantime. Reload the series and try again. | The invoice counter was changed in the meantime. Reload the series and try again. | | | 0306 | invoice_series_order_mismatch | Invoicing | Returned when reordering invoice series with a list that does not match the current series. Reload the series and reorder them again. | The order of the series is out of date. Reload the series and reorder them again. | | | 0307 | invoice_series_ser_in_default | Invoicing | Returned when the {SER} tag is used in the default invoice number format, where it is not allowed. Use it only in additional invoice series. | The {SER} tag can only be used in additional invoice series, not in the default series. | | | 0308 | invoice_series_mode_unsupported | Invoicing | Returned when additional invoice number series are managed for a company whose invoicing system does not support them. | The invoicing system you use does not support additional invoice number series. | | | 0309 | invoice_series_code_duplicate | Invoicing | Returned when an invoice series code is already used by another series of the same billing profile, or one code is a prefix of another. The message ends with the conflicting code. | Series code {value} is already used by another series of this billing profile. Codes must differ, and one code must not start with another. | value ends the message | | 0310 | invoice_series_template_invalid | Invoicing | Returned when an invoice number template is not valid: it must start with {SER}, contain a counter, use only known tags, not place {VS} next to the counter, and stay within the length limit. | The number template must start with {SER}, contain a counter ({N} or {N1}–{N10}), use only known tags, not put {VS} directly next to the counter, and produce an invoice number of at most 50 characters, with room for the counter to grow. | | | 0311 | invoice_series_engine_series_unknown | Invoicing | Returned when the chosen series cannot be found in the connected invoicing system. The message ends with the series name; refresh the list of series and choose again. | Series {value} was not found in your invoicing system. Refresh the list of series and choose again. | value ends the message | | 0312 | invoice_series_code_locked | Invoicing | Returned when you try to change the code of an invoice series that already has issued invoices. The message ends with the locked code; create a new series instead. | Series code {value} cannot be changed because invoices were already issued in this series. Create a new series instead. | value ends the message | | 0313 | availability_days_invalid | Users and people | Returned when some days in an instructor's availability are not valid. The response lists the failing days with a reason for each. | Some days in the availability are not valid. Check the highlighted days and try again. | | | 0314 | availability_batch_wrong_state | Users and people | Returned when an instructor availability change is not allowed in the availability's current state, for example it was already submitted or approved. Reload and try again. | This availability change cannot be done in its current state. Reload the page and try again. | | | 0315 | return_comment_required | Users and people | Returned when instructor availability is returned to the instructor without a comment explaining why. | Add a comment explaining why the availability is being returned to the instructor. | | | 0316 | availability_span_invalid | Users and people | Returned when an instructor availability period ends before it starts or spans more than 31 days. | The availability must end after it starts and can span at most 31 days. | | | 0317 | entry_pass_not_found | Payments | Returned when the requested entry pass does not exist in this company. | Entry pass not found. | | | 0318 | entrance_voucher_item_via_entry_pass | Payments | Returned when you try to add an entry pass item directly to a product. Entry pass packs are set up on the entry pass itself. | Entry pass items are set up on the entry pass itself, not added to a product. | | | 0319 | entry_pass_has_active_plans | Payments | Returned when you try to archive an entry pass that a payment plan is still renewing. | This entry pass cannot be archived while a payment plan is still renewing it. | | | 0320 | entry_pass_variant_not_found | Payments | Returned when the requested entry pass pack does not exist on this entry pass. | Entry pass pack not found. | | | 0321 | course_not_available | Programmes and classes | Returned when an entry pass is linked to a programme that is inactive or deleted. | This programme is not available. | | | 0322 | entry_pass_course_not_linked | Programmes and classes | Returned when you try to unlink an entry pass from a programme it is not sold on. | This entry pass is not sold on that programme. | | | 0323 | entry_pass_template_already_linked | Payments | Returned when a payment plan is attached to an entry pass it is already attached to. | This payment plan is already attached to this entry pass. | | | 0324 | renewal_incompatible_variant | Payments | Returned when a pack that is released before payment is used on an entry pass that renews through a payment plan. | A pack that is released before payment cannot be used on a renewing entry pass. | | | 0325 | renewal_plan_bills_its_own_cycles | Payments | Returned when you try to add a manual payment to a renewal payment plan. Renewal plans bill their own cycles. | A renewal plan bills its own cycles. You cannot add a payment to it by hand. | | | 0326 | purchase_limit_reached | Bookings | Returned when the client has already bought this item the maximum number of times allowed. | You've reached the maximum number of purchases allowed for this item. | | | 0327 | entry_pass_requires_payment_plan | Bookings | Returned when a client tries to buy an entry pass pack outright that is only offered with a payment plan. Choose a payment plan for the purchase. | This entry pass can only be bought with a payment plan. | | | 0328 | entry_pass_course_not_open | Programmes and classes | Returned when an entry pass is linked to a programme that is not pay-as-you-go. | An entry pass can only be sold on a pay-as-you-go programme. | | | 0329 | service_item_requires_schedule | Bookings | Returned when a service priced per session or per day is ordered without a class. | This service is priced per session or per day, so it can only be bought together with a class. | | | 0330 | payment_schedule_variant_not_in_order | Payments | Returned when the selected payment plan does not belong to any entry pass pack in the order. | The selected payment plan does not match any entry pass pack in this order. | | | 0331 | linking_rule_broken | Bookings | Returned when linking bookings together, or removing a linked booking, would break a booking-linking rule. The message ends with the code of the broken rule. | These booking links can't be saved because they break a linking rule: {value} | value ends the message | | 0332 | linking_decision_missing | Bookings | Returned when a booking-linking change needs an explicit choice that was not sent. The message ends with the code of the rule that needs the decision; send the choice and retry. | These booking links need one more decision before they can be saved: {value} | value ends the message | | 0333 | linking_root_has_members | Bookings | Returned when you try to cancel or delete a booking that other bookings are linked under. Handle the linked bookings first. | Other bookings are linked under this booking, so it can't be cancelled or deleted on its own. | | | 0335 | course_info_tab_enforced | Programmes and classes | Returned when a company tries to create, change, delete, reset or restore programme info content that its network enforces. | This content is set by your network and can't be changed here. | | | 0336 | cancellation_reason_category_needs_one | Bookings | Returned when a change to cancellation reasons would leave a category without any active reason. Keep at least one active reason per category. | Each category must keep at least one active cancellation reason. | | | 0337 | cancellation_reasons_network_enforced | Bookings | Returned when a company tries to change cancellation reasons that its network manages and enforces. | Cancellation reasons are managed by your network and cannot be changed here. | | | 0338 | cancellation_reason_required | Bookings | Returned when a booking is cancelled without a cancellation reason and the company requires one. | Choose a cancellation reason. | | | 0339 | cancellation_reason_invalid | Bookings | Returned when the cancellation reason sent is unknown or not active for this company. Choose another one. | This cancellation reason is not available. Choose another one. | | | 0340 | registration_status_not_billable | Payments | Returned when a payment plan is applied to a booking that is not in a registered status. | A payment plan can only be applied to a registered booking. | | | 0341 | gp_webpay_keys_invalid | Integrations | Returned when the GP webpay merchant number or private key cannot be verified, either while connecting the account or when a payment is signed. Check the credentials and connect again. | The GP webpay merchant number or private key is invalid. Please check the credentials and try again. | | | 0342 | gp_webpay_connection_in_use | Integrations | Returned when you try to remove a GP webpay connection that is still the fallback for other connections or is linked to billing profiles. Reassign those first. | This GP webpay account can't be removed while it is the fallback for other accounts or is linked to invoice profiles. Set another fallback account or reassign those profiles first. | | | 0343 | gp_webpay_declined | Payments | Intended for a declined GP webpay card payment; currently not returned on its own (its text is reused inside the refund-declined error). | The card payment could not be completed. Please check your card details or try another card. | | | 0344 | refund_not_settled_yet | Payments | Returned when a GP webpay payment is refunded before the bank has settled it. Try again once the payment has settled, usually the next day. | This payment can't be refunded yet because it hasn't been settled by the bank. Please try again once it has settled. | | | 0345 | invalid_date_format | Programmes and classes | Returned when a date format setting for a programme's classes is not one of the allowed formats. | The date format is not valid. | | | 0346 | custom_customer_id_unknown_token | Requests and validation | Returned when the custom client ID template contains an unknown tag. The message ends with the unknown tag. | The customer ID template contains an unknown tag {value}. Allowed tags: {C}, {c}, {U1}–{U10}. | value ends the message | | 0347 | integration_not_found | Integrations | Returned when a payment needs an integration that is not connected, for example no GP webpay account is set up for the order. The message ends with the integration name. | Integration not found | value ends the message | | 0348 | schedule_not_active | Payments | Returned when a payment plan is applied to a booking in a class that is not active. | A payment plan can only be applied to a booking in an active class. | | | 0349 | schedule_ended | Payments | Returned when a payment plan is applied to a booking in a class that has already ended. | A payment plan cannot be applied to a booking in a class that has already ended. | | | 0350 | schedule_lead_collection | Payments | Returned when a payment plan is applied to a booking in a lead collection class. | A payment plan cannot be applied to a booking in a lead collection class. | | | 0351 | course_archived | Payments | Returned when a payment plan is applied to a booking in an archived programme. | A payment plan cannot be applied to a booking in an archived programme. | | | 0352 | payment_plan_not_active | Payments | Returned when you try to change a payment plan that has stopped or ended. Only its note can still be edited. | This payment plan is no longer active and can't be changed. Only its note can be edited. | | | 0353 | replacement_requires_payment | Sessions and attendance | Returned when a client tries to book a make-up session while their booking is still unpaid. Pay the booking first. | You can book a make-up session once your enrolment is paid. | | | 0354 | split_payment_template_exists | Payments | Returned when creating a split payment template while the company already has one. Only one is allowed per company. | Your company already has a split payment template. Only one is allowed. | | | 0355 | lecturer_bcc_requires_non_distinct | Communication | Returned when a bulk message asks for a copy to the instructor while recipients are grouped per person. Turn off per-person grouping or drop the instructor copy. | A copy for the instructor can't be sent when recipients are grouped per person. Turn off per-person grouping and try again. | | | 0356 | passkey_not_available | Authentication and access | Returned when passkey login is not available in this context. Log in with a one-time code instead. | Passkey login isn't available here. Please log in with a one-time code. | | | 0357 | passkey_domain_mismatch | Authentication and access | Returned when a passkey is used on a website it was not registered for. Log in with a one-time code instead. | This passkey can't be used on this website. Please log in with a one-time code. | | | 0358 | passkey_challenge_expired | Authentication and access | Returned when the passkey challenge is missing, already used or expired. Start the passkey login or registration again. | The passkey request has expired. Please try again. | | | 0359 | passkey_not_recognized | Authentication and access | Returned when the passkey presented is not registered to any account. Log in with a one-time code instead. | We don't recognise this passkey. Please log in with a one-time code. | | | 0360 | passkey_verification_failed | Authentication and access | Returned when the passkey response cannot be verified. Try again or log in with a one-time code. | We couldn't verify your passkey. Please try again or log in with a one-time code. | | | 0361 | passkey_already_registered | Authentication and access | Returned when registering a passkey that is already saved to the account. | This passkey is already saved to your account. | | | 0362 | google_form_registration_out_of_reach | Integrations | Returned when a Google Form response is assigned to a booking the form is not attached to through its programme, class, session or booking. The message ends with the booking ID. | This response cannot be assigned to registration {value}, because this form is not attached to its programme, class, session or registration. | value ends the message | | 0363 | invoice_nothing_to_bill | Invoicing | Returned when an invoice is requested but no payment has been received since the last invoice, so there is nothing to bill. | There is nothing to invoice: no payment has been received since the last invoice. | | | 0364 | api_key_not_entitled | Authentication and access | Returned when creating or configuring an API key with an option the company's Zooza plan does not include. The message ends with the refused option (for example the tier, scope or group). | Your Zooza plan does not include this API key option | value ends the message | | 0365 | create_user_already_exists | Users and people | Returned when creating a user with an email address that already belongs to an existing user. | Can't create user: User already exists | | | 0366 | invoice_creation_failed | Invoicing | Returned when the invoicing system refuses to create an invoice that was issued immediately. The value carries the error reported by the invoicing system. | Creating the invoice failed | value ends the message | | 0367 | meta_code_exchange_failed | Integrations | Returned when Meta does not accept the authorisation while connecting a Meta account. Connect Meta again. | Meta did not accept the connection. Please connect Meta again. | | | 0368 | schedule_already_copied_to_billing_period | Programmes and classes | Returned when a class is copied into a billing period that already holds a copy of it. The value lists the id(s) of the existing copy. | This class has already been copied into this billing period. Existing copy: {value} | value ends the message | | 9999 | custom_error | Other | Generic error used where no specific code exists, for example when a payment cannot be requested because there is nothing to pay. The message carries the specific reason. | Error | value ends the message | --- # Preflight check Some changes in Zooza do more than change one field: they can move money, affect other bookings, or need a decision first. A **preflight check** tests such a change before it happens. Send the request you mean to make with `?action=preflight_check` added, and Zooza answers what would happen and **writes nothing**. This page covers what's the same for every operation. **Each operation has its own checks and properties**: the [reference](/api/reference) documents them per operation, and the guides show how to use them in a real flow. ## How it works 1. **Check:** send the request with `?action=preflight_check`. 2. **Decide:** read `checks` to see whether the change would go through, and use `properties` to show the user what would happen, or to ask for the decisions it needs. 3. **Apply:** send the same request without `?action=preflight_check`, with the user's decisions added to the body. **The apply step checks everything again.** Data can change between the two calls, so the apply runs the same checks on current data and refuses the change if one fails. Nothing links the two calls (no token, nothing stored), so a check that passed a minute ago is not a promise. **A check costs the same points as the change itself**, although it writes nothing. ## The answer The answer is always a `200` with two objects: ```json { "checks": { "": { "name": "", "result": "passed", "severity": "error" } }, "properties": { "": { "name": "", "value": "" } } } ``` **`checks`**: each check is a question about the change, with a `result` of `passed` or `not_passed` and a severity: | Severity | If it didn't pass | |---|---| | `error` | The change would be refused. Don't offer to apply it: explain why, or ask for what's missing. | | `warning` | The change would go through, but the user should confirm something first. | | `notice` | Something the user should know. It never blocks the change. | **`properties`**: what you need to decide, such as the records involved, amounts, or the choices the change offers. Each property's `value` has its own shape. **The status is `200` whether or not the change would go through.** Read `checks`, not the status code. Here, a check with severity `error` didn't pass: **A refused change: still a 200** ``` PUT /v3/registrations/168321?action=preflight_check ``` ```json { "action": "change_status", "status": "pre_registered" } ``` Answer: 200 ```json { "checks": { "rules_hold": { "name": "rules_hold", "result": "passed", "severity": "error" }, "decision_missing": { "name": "decision_missing", "result": "passed", "severity": "error" }, "money_moves": { "name": "money_moves", "result": "passed", "severity": "notice" }, "transferred_money_stays": { "name": "transferred_money_stays", "result": "passed", "severity": "notice" }, "currency_conversion": { "name": "currency_conversion", "result": "passed", "severity": "notice" }, "status_allowed": { "name": "status_allowed", "result": "not_passed", "severity": "error" } }, "properties": { "result": { "name": "result", "value": { "booking": { "type": "registration", "id": 168321 }, "root": { "type": "registration", "id": 168321 }, "limits": { "max_depth": 3, "truncated": false }, "members": [ { "type": "registration", "id": 168321, "summary": { "name": "Ballet basics", "client_name": "Anna Novak", "course": { "id": 990, "name": "Kids gymnastics" }, … (38 more lines; the full answer is in the guide at docs.zooza.online) ``` ## Handling any preflight check You can handle every operation's check with the same code, and add operation-specific handling only where you need it: 1. If any check with severity `error` is `not_passed`, don't offer to apply. 2. If any check with severity `warning` is `not_passed`, ask the user to confirm. 3. Show each `notice` that's `not_passed` as information. 4. Read `properties` only for the operations your app knows, by property name. Ignore names you don't know: an operation can gain checks and properties over time. ## Errors Before it gets to `checks`, a preflight check can fail with the same errors as the change itself: a `422` when the body doesn't match the schema, or a `400` when Zooza refuses the request (a missing field the change needs, for example). See [Errors](errors.md). ## Operations with a preflight check | Operation | Request | What it checks | |---|---|---| | Update a registration | `PUT /v3/registrations/{ID}?action=preflight_check` | preview a `change_status` (send the same body as the change itself) without writing anything. Any other body `action` is refused. | For a worked example, see [Cancel a registration](guides/cancel-a-registration.md): it uses the check to find the client's make-up credits and the registrations booked together, and to ask the right question before cancelling. --- # Keys An API key lets a server integration act for one Zooza company. Keys are managed in the Zooza app under **Developers → API keys**, and only a company **owner** can create or change them. ## What a key is | Part | Example | Notes | |---|---|---| | `client_id` | `zk_4768b32989b7303eac7ff30e` | Identifies the key. Not secret. | | `client_secret` | `` | Shown **once**, when the key is created and again after a rotation. Zooza can't show it again. | | Label | "Website timetable" | A name for the owner's benefit. | | Access groups | `core_read` | What the key may call. See [access groups](access-and-rate-limits.md#access-groups). | | Company scope | `pinned` | The key acts only for the company that created it. See [company scope](access-and-rate-limits.md#company-scope). | A key belongs to the [region](index.md#regions-and-base-urls) of its company and works only there. A key has no rate tier of its own: all of a company's keys share the company's [point budget](access-and-rate-limits.md#rate-limits-points), and its tier follows the company's Zooza plan. ## Creating a key 1. As an owner, open **Developers → API keys** in the Zooza app and create a key. 2. Give it a label that says what it's for. 3. Copy the `client_secret` into your secret store straight away. It's shown only now. A new key starts at the lowest level: `core_read` (read only) and the `pinned` company scope. An owner can raise the access groups when editing the key, within what the company is entitled to. Every company with a Zooza subscription can create keys at the lowest level; higher levels may become paid add-ons. ## Editing, rotating and revoking {#when-changes-take-effect} | Action | What it does | When it takes effect | |---|---|---| | **Change access groups** | Widens or narrows what the key may call | On the next token request, so within 60 minutes at most | | **Change the label** | Renames the key (for the owner only) | Immediately | | **Rotate the secret** | Issues a new `client_secret`; the old one stops working | New token requests need the new secret immediately. Tokens issued before the rotation keep working until they expire (up to 60 minutes). | | **Revoke** | Disables the key permanently. This can't be undone. | Immediately. The next call fails, even with a token that hasn't expired. | Use **rotation** for routine secret changes, e.g. when someone who knew the secret leaves. Use **revocation** when a secret may have leaked (see below), because revoking is the only way to stop tokens that were already issued. ## Security {#security} - **Keep the secret on a server**: in an environment variable or a secret manager, and in a git-ignored `.env` for local work. Never put it in browser code, a mobile app, a URL or a repository. - **Never paste a secret** into a chat, a support ticket or an AI agent. If an agent writes code for you, let the code read the secret from the environment. - **If a secret may have leaked, revoke the key and create a new one.** Rotating isn't enough: tokens issued with the old secret keep working for up to 60 minutes. - **Use one key per integration**, so you can revoke one without breaking the others. - **Grant the least access.** Keep integrations that only read on `core_read`; add `core_write` only where needed. - **Keys act on live data.** There's no sandbox yet (coming), so test writes carefully, ideally against a company set up for testing. - **Watch for repeated `401 invalid_client`**: after 10 wrong secrets a key is locked for 5 minutes. See [Authentication](authentication.md#invalid-client). ## Related - [Getting started](getting-started.md): using a new key for the first time - [Authentication](authentication.md): the token request and the owner email - [Access and rate limits](access-and-rate-limits.md): groups, scope, points and tiers --- # Find registrations This guide searches a company's registrations the way a back office does, then opens one: 1. [List the newest registrations](#1-list-the-newest-registrations). 2. [Search by name, email or phone](#2-search-by-name-email-or-phone). 3. [Filter by programme, class and status](#3-filter-by-programme-class-and-status). 4. [Page through the results](#4-page-through-the-results). 5. [Open one registration](#5-open-one-registration). Every call here is a read, so nothing in the company changes. Every request and answer on this page was recorded from a real call. Names, emails and other personal data are replaced. ## Before you start - **A key with `core_read`.** A search costs 2 points per page, and opening one registration costs 1. See [Access and rate limits](../access-and-rate-limits.md). - **The token from [Authentication](../authentication.md).** Send it on every request as `Authorization: Bearer `. ## 1. List the newest registrations [`GET /v3/registrations`](/api/reference#tag/registrations/GET/registrations) is a search. **Send `advanced_search=1` on every call**, even with no filter. With nothing else sent, you get the first page of 20, newest first, without deleted registrations. **The newest registrations** ``` GET /v3/registrations?advanced_search=1 ``` Answer: 200 ```json { "total": 500, "total_capped": true, "page": null, "results": [ { "registration_id": 168321, "note": "", "created": "2026-11-20 18:21:34", "updated": "2026-11-20 20:45:11", "origin": "widget", "course_id": 990, "__calc__has_payment_schedule": false, "__calc__has_any_payment_schedule": false, "__calc__current_value": -110, "__payment_schedules_templates__name": null, "__calc__scheduled_payments__total_payments": 0, "__calc__scheduled_payments__processed_payments": 0, "__calc__scheduled_payments__next_payment": null, "payment_schedule_order_id": 0, "schedule_id": 6779, "company_note": "", "billing_period_id": 268, "paid": "0.0000", "payment_method": "cash", "status": "pre_registered", "user_id": 65604, "first_name": "Anna", "last_name": "Novak", "email": "client2@example.com", "phone": "+421900000002", "full_name": "Anna Novak", "payment_balance": -110, "payment_debt": -110, "payment_paid": 0, "__calc__paid": 0, "__calc__remaining_events": 0, "__calc__course_payment": -110, "__calc__registration_fee": 0, "payment_status": "awaiting_payment", "awaiting_payment_until": "2026-11-30", "awaiting_payment_source": "default", "awaiting_payment_note": null, "__calc__unpaid_since": null, "__calc__payments__last_received_at": null, "cancellation_reason": null, "cancellation_category": null, "cancellation_reason_id": null, "cancellation_reason_label": null, "canceled_by_user_id": null, "canceled_by_name": null, "canceled_at": null, "internal_note": "", "ef_full_name": "Anna Novak", "ef_dob": "An example answer.", "ef_address": "1 Example Street, Example Town", "ef_identification_number": "", "ef_business_name": "", "ef_business_address": "", "ef_business_id": "", … (1832 more lines; the full answer is in the guide at docs.zooza.online) ``` Without `advanced_search=1` the answer is a `422` that names the missing parameter: **Forgetting advanced_search=1: 422** ``` GET /v3/registrations ``` Answer: 422 ```json { "error": "validation_failed", "message": "The request does not match the endpoint's schema.", "request_id": "00000000-0000-4000-8000-000000000004", "errors": [ { "location": "query", "path": "advanced_search", "code": "required_missing", "message": "Required field is missing." } ] } ``` **Reading a row:** - **The id is `registration_id`.** A row has no `id`. Use `registration_id` to open the registration (step 5). - **The row carries its whole programme and class** in `course` and `schedule`, with their names, so the list needs no extra call per row. - **`created` and `updated` aren't ISO 8601.** They look like `2026-11-20 18:21:34`: a space, no `T` and no time zone. They're in the region's local time (see [Dates and times](/api/reference#description/dates-and-times)). `new Date()` doesn't parse that the same way everywhere, so parse it yourself. - **An empty note can be `""` or `null`.** Treat both as "no note". ## 2. Search by name, email or phone `user` is the free-text search. It takes part of a client's first name, last name, full name, email or phone, and matches case-insensitively. It also matches the registration id, so a short number can match phone digits and ids at once. **Free-text search by part of a name** ``` GET /v3/registrations?advanced_search=1&user=Novak ``` Answer: 200 ```json { "total": 9, "total_capped": false, "page": null, "results": [ { "registration_id": 168321, "note": "", "created": "2026-11-20 18:21:34", "updated": "2026-11-20 20:45:11", "origin": "widget", "course_id": 990, "__calc__has_payment_schedule": false, "__calc__has_any_payment_schedule": false, "__calc__current_value": -110, "__payment_schedules_templates__name": null, "__calc__scheduled_payments__total_payments": 0, "__calc__scheduled_payments__processed_payments": 0, "__calc__scheduled_payments__next_payment": null, "payment_schedule_order_id": 0, "schedule_id": 6779, "company_note": "", "billing_period_id": 268, "paid": "0.0000", "payment_method": "cash", "status": "pre_registered", "user_id": 65604, "first_name": "Anna", "last_name": "Novak", "email": "client2@example.com", "phone": "+421900000002", "full_name": "Anna Novak", "payment_balance": -110, "payment_debt": -110, "payment_paid": 0, "__calc__paid": 0, "__calc__remaining_events": 0, "__calc__course_payment": -110, "__calc__registration_fee": 0, "payment_status": "awaiting_payment", "awaiting_payment_until": "2026-11-30", "awaiting_payment_source": "default", "awaiting_payment_note": null, "__calc__unpaid_since": null, "__calc__payments__last_received_at": null, "cancellation_reason": null, "cancellation_category": null, "cancellation_reason_id": null, "cancellation_reason_label": null, "canceled_by_user_id": null, "canceled_by_name": null, "canceled_at": null, "internal_note": "", "ef_full_name": "Anna Novak", "ef_dob": "An example answer.", "ef_address": "1 Example Street, Example Town", "ef_identification_number": "", "ef_business_name": "", "ef_business_address": "", "ef_business_id": "", … (1807 more lines; the full answer is in the guide at docs.zooza.online) ``` **A search that matches nothing is a `200`** with `total: 0` and an empty `results`, not a `404`. Show your own "no match" message. **No match: 200 with no results** ``` GET /v3/registrations?advanced_search=1&user=zzzzqqq ``` Answer: 200 ```json { "total": 0, "total_capped": false, "page": null, "results": [], "offset": 0 } ``` **Don't send an empty `user=`.** It doesn't mean "match nothing": the API ignores it and returns the full list. Leave the parameter out when the search box is empty. **`email` isn't a search.** It matches one whole address exactly, and anything that isn't a valid address is refused with a `422`. To search by part of an address, use `user`. **Part of an address in email: 422** ``` GET /v3/registrations?advanced_search=1&email=client2 ``` Answer: 422 ```json { "error": "validation_failed", "message": "The request does not match the endpoint's schema.", "request_id": "00000000-0000-4000-8000-000000000008", "errors": [ { "location": "query", "path": "email", "code": "format_invalid", "message": "Must be a valid email.", "expected": { "format": "email" }, "received": { "type": "string", "value": "client2" } } ] } ``` ## 3. Filter by programme, class and status Three filters narrow the list: `course_id` (programme), `schedule_id` (class) and `status`. They combine with each other and with `user`, and every one must match. Offer choices loaded from the API, not ids typed by hand. **Programmes:** [`GET /v3/courses`](/api/reference#tag/programmes/GET/courses) returns every programme in one plain array, not paginated and sorted by name. Archived programmes are included (`archive: true`). Their registrations still exist, so keep them in the list and label them. **The programmes, for a filter** ``` GET /v3/courses ``` Answer: 200 ```json [ { "id": 3949, "company_id": 1, "created": "2026-08-04 09:56:02", "name": "Shared room", "url": "", "price": 300, "registration_fee": 0, "cash": false, "direct_debit": false, "direct_debit_provider": "go_cardless", "online_card": true, "online_transfer": false, "fees_included_in_price": true, "public": true, "archive": false, "online_registration": true, "on_behalf": false, "feedback_during_course": true, "feedback_after_course": true, "get_extra_fields_from": "all", "get_basic_fields_from": "registrant", "registration_type": "full2", "course_type": "course", "registration_slots_min": 1, "registration_slots_max": 5, "registration_open": 0, "show_on_site": 0, "hide_if_full": false, "allow_replacements": false, "allow_custom_replacements": false, "auto_approve_custom_replacements": false, "allow_cancel_until": 0, "allow_replacements_waitlist": false, "waitlist": "", "auto_waitlist_notification": false, "description": null, "use_extra_fields": false, "for_children": false, "replacements_limit": 2, "replacements_settings": [], "theme": null, "custom_email": 268, "custom_email_event_notification": 0, "event_notification": true, "late_registrations": "auto_approve", "allow_registration_after_end": false, "custom_label_note": null, "hide_before": 0, "collect_feedback_start": null, "iban": null, "swift": null, "custom_label_first_name": null, "custom_label_last_name": null, "custom_label_phone": null, "custom_label_email": null, "upcoming_events_notification": false, "__calc__fee_cash": 30, "__calc__fee_online_card": 20.7, … (1272 more lines; the full answer is in the guide at docs.zooza.online) ``` **Classes of a programme:** [`GET /v3/schedules`](/api/reference#tag/classes/GET/schedules) with `course_id`. Unlike the programme list, it is paginated (50 per page by default), so ask for a `page_size` large enough for one programme's classes. - **A class's `name` is often empty**, and two classes can share one. Label a class by its name and its start: `start` plus `time`, which is in **minutes after midnight** (`674` = 11:14). A class without sessions has `start` `"0000-00-00"`. - **When the programme changes, drop the old `schedule_id`.** The filters combine with AND, so a class from another programme matches nothing. **The classes of one programme** ``` GET /v3/schedules?course_id=990&page_size=200 ``` Answer: 200 ```json { "total": 13, "page": 0, "page_size": 200, "settings": { "course_id": [ "990" ], "status": [ "active", "inactive" ], "exclude_archived_courses": true }, "data": [ { "id": 1013233, "course_id": 990, "time": 643, "duration": 60, "place_id": 16, "room_id": 1, "trainer_id": 1, "registrations_cap": 0, "capacity": 10, "extra_capacity": 0, "total_events": 9, "type": "weekly", "name": "Blocks", "start": "2026-08-31", "end": "2026-10-26", "extra_capacity_usage": "add", "status": "active", "public": true, "online_registration": true, "price": 0, "registration_fee": 0, "note": null, "notify_trainer_on_cancellation": "never", "__calc__total_avg_nps_score": 0, "__calc__total_requests": 0, "__calc__registered": 4, "__calc__waitlist": 0, "__calc__late": 0, "trainer_rate_type_id": 0, "billable_events": 0, "__calc__events__elapsed": 9, "__calc__events__total": 9, "__calc__events__total_custom_replacements": 0, "__calc__events__total_billable": 0, "__calc__events__elapsed_billable": 0, "__calc__events__total_scheduled": 9, "__calc__events__total_unplanned": 0, "__calc__events__total_nonbillable": 9, "__courses__billable_events": 0, "__calc__possible_income": 0, "__calc__booked_income": 0, "__calc__debt_issued": 0, "__calc__debt_paid": 0, "__calc__debt_balance": 0, … (269 more lines; the full answer is in the guide at docs.zooza.online) ``` **Classes of an archived programme aren't listed.** `GET /schedules` leaves them out, even when you ask for that programme's `course_id`, and there's no parameter to include them. Filtering by the archived programme alone still works. **An archived programme: no classes** ``` GET /v3/schedules?course_id=100&page_size=200&sort_by=name_asc ``` Answer: 200 ```json { "total": 0, "page": 0, "page_size": 200, "settings": { "course_id": [ "100" ], "status": [ "active", "inactive" ], "exclude_archived_courses": true }, "data": [] } ``` **Status:** use the values the [reference](/api/reference#tag/registrations/GET/registrations) lists for `status`. **Programme, class and status together** ``` GET /v3/registrations?advanced_search=1&course_id=990&schedule_id=6779&status=registered ``` Answer: 200 ```json { "total": 9, "total_capped": false, "page": null, "results": [ { "registration_id": 168321, "note": "", "created": "2026-11-20 18:21:34", "updated": "2026-11-20 20:45:11", "origin": "widget", "course_id": 990, "__calc__has_payment_schedule": false, "__calc__has_any_payment_schedule": false, "__calc__current_value": -110, "__payment_schedules_templates__name": null, "__calc__scheduled_payments__total_payments": 0, "__calc__scheduled_payments__processed_payments": 0, "__calc__scheduled_payments__next_payment": null, "payment_schedule_order_id": 0, "schedule_id": 6779, "company_note": "", "billing_period_id": 268, "paid": "0.0000", "payment_method": "cash", "status": "pre_registered", "user_id": 65604, "first_name": "Anna", "last_name": "Novak", "email": "client2@example.com", "phone": "+421900000002", "full_name": "Anna Novak", "payment_balance": -110, "payment_debt": -110, "payment_paid": 0, "__calc__paid": 0, "__calc__remaining_events": 0, "__calc__course_payment": -110, "__calc__registration_fee": 0, "payment_status": "awaiting_payment", "awaiting_payment_until": "2026-11-30", "awaiting_payment_source": "default", "awaiting_payment_note": null, "__calc__unpaid_since": null, "__calc__payments__last_received_at": null, "cancellation_reason": null, "cancellation_category": null, "cancellation_reason_id": null, "cancellation_reason_label": null, "canceled_by_user_id": null, "canceled_by_name": null, "canceled_at": null, "internal_note": "", "ef_full_name": "Anna Novak", "ef_dob": "An example answer.", "ef_address": "1 Example Street, Example Town", "ef_identification_number": "", "ef_business_name": "", "ef_business_address": "", "ef_business_id": "", … (1832 more lines; the full answer is in the guide at docs.zooza.online) ``` Status filtering has three surprises: - **`status=registered` also returns `pre_registered`**, and so on for every value except `canceled` and `deleted`. The rows show each registration's real status. - **Leaving `status` out isn't "all statuses".** It means everything but deleted. To see deleted registrations, send `status=deleted`. - **An unknown value turns the filter off.** `status=bogus` isn't a `422`: it returns every registration, deleted ones included. A typo shows more, not less, so send only the reference's values. **An unknown status: the filter is ignored** ``` GET /v3/registrations?advanced_search=1&status=bogus ``` Answer: 200 ```json { "total": 500, "total_capped": true, "page": null, "results": [ { "registration_id": 168321, "note": "", "created": "2026-11-20 18:21:34", "updated": "2026-11-20 20:45:11", "origin": "widget", "course_id": 990, "__calc__has_payment_schedule": false, "__calc__has_any_payment_schedule": false, "__calc__current_value": -110, "__payment_schedules_templates__name": null, "__calc__scheduled_payments__total_payments": 0, "__calc__scheduled_payments__processed_payments": 0, "__calc__scheduled_payments__next_payment": null, "payment_schedule_order_id": 0, "schedule_id": 6779, "company_note": "", "billing_period_id": 268, "paid": "0.0000", "payment_method": "cash", "status": "pre_registered", "user_id": 65604, "first_name": "Anna", "last_name": "Novak", "email": "client2@example.com", "phone": "+421900000002", "full_name": "Anna Novak", "payment_balance": -110, "payment_debt": -110, "payment_paid": 0, "__calc__paid": 0, "__calc__remaining_events": 0, "__calc__course_payment": -110, "__calc__registration_fee": 0, "payment_status": "awaiting_payment", "awaiting_payment_until": "2026-11-30", "awaiting_payment_source": "default", "awaiting_payment_note": null, "__calc__unpaid_since": null, "__calc__payments__last_received_at": null, "cancellation_reason": null, "cancellation_category": null, "cancellation_reason_id": null, "cancellation_reason_label": null, "canceled_by_user_id": null, "canceled_by_name": null, "canceled_at": null, "internal_note": "", "ef_full_name": "Anna Novak", "ef_dob": "An example answer.", "ef_address": "1 Example Street, Example Town", "ef_identification_number": "", "ef_business_name": "", "ef_business_address": "", "ef_business_id": "", … (1832 more lines; the full answer is in the guide at docs.zooza.online) ``` ## 4. Page through the results **Pages start at 0.** `page=0` is the first page and `page=1` the second. A pager that counts from 1 skips the first page. Send `page_size` with `page`, and keep every filter when you change the page. Use `offset` from the answer to know where the page starts: `page` comes back `null`. **Paging: the first page** ``` GET /v3/registrations?advanced_search=1&page=0&page_size=20 ``` Answer: 200 ```json { "total": 500, "total_capped": true, "page": null, "results": [ { "registration_id": 168321, "note": "", "created": "2026-11-20 18:21:34", "updated": "2026-11-20 20:45:11", "origin": "widget", "course_id": 990, "__calc__has_payment_schedule": false, "__calc__has_any_payment_schedule": false, "__calc__current_value": -110, "__payment_schedules_templates__name": null, "__calc__scheduled_payments__total_payments": 0, "__calc__scheduled_payments__processed_payments": 0, "__calc__scheduled_payments__next_payment": null, "payment_schedule_order_id": 0, "schedule_id": 6779, "company_note": "", "billing_period_id": 268, "paid": "0.0000", "payment_method": "cash", "status": "pre_registered", "user_id": 65604, "first_name": "Anna", "last_name": "Novak", "email": "client2@example.com", "phone": "+421900000002", "full_name": "Anna Novak", "payment_balance": -110, "payment_debt": -110, "payment_paid": 0, "__calc__paid": 0, "__calc__remaining_events": 0, "__calc__course_payment": -110, "__calc__registration_fee": 0, "payment_status": "awaiting_payment", "awaiting_payment_until": "2026-11-30", "awaiting_payment_source": "default", "awaiting_payment_note": null, "__calc__unpaid_since": null, "__calc__payments__last_received_at": null, "cancellation_reason": null, "cancellation_category": null, "cancellation_reason_id": null, "cancellation_reason_label": null, "canceled_by_user_id": null, "canceled_by_name": null, "canceled_at": null, "internal_note": "", "ef_full_name": "Anna Novak", "ef_dob": "An example answer.", "ef_address": "1 Example Street, Example Town", "ef_identification_number": "", "ef_business_name": "", "ef_business_address": "", "ef_business_id": "", … (1832 more lines; the full answer is in the guide at docs.zooza.online) ``` **`total` stops counting at 500.** Past that, the answer says `total: 500` and `total_capped: true`, and the real number isn't available. Show "500+", not an exact-looking number, and don't compute the last page from `total`. **The rows don't stop at 500.** Pages past offset 500 keep coming, so with a capped total, a full page means there may be more: **Page 25: past the cap, still a full page** ``` GET /v3/registrations?advanced_search=1&page=25&page_size=20 ``` Answer: 200 ```json { "total": 500, "total_capped": true, "page": null, "results": [ { "registration_id": 50715, "note": "", "created": "2025-06-24 20:53:37", "updated": "2026-11-06 11:57:04", "origin": "widget", "course_id": 961, "__calc__has_payment_schedule": false, "__calc__has_any_payment_schedule": false, "__calc__current_value": 0, "__payment_schedules_templates__name": null, "__calc__scheduled_payments__total_payments": 0, "__calc__scheduled_payments__processed_payments": 0, "__calc__scheduled_payments__next_payment": null, "payment_schedule_order_id": 0, "schedule_id": 6662, "company_note": "", "billing_period_id": 310, "paid": "100.0000", "payment_method": "cash", "status": "pre_registered", "user_id": 11155, "first_name": "Smith", "last_name": "Clara", "email": "client6@example.com", "phone": "+421900000002", "full_name": "Smith Clara", "payment_balance": 100, "payment_debt": 0, "payment_paid": 100, "__calc__paid": 100, "__calc__remaining_events": 0, "__calc__course_payment": 0, "__calc__registration_fee": 0, "payment_status": "overpaid", "awaiting_payment_until": null, "awaiting_payment_source": null, "awaiting_payment_note": null, "__calc__unpaid_since": null, "__calc__payments__last_received_at": null, "cancellation_reason": null, "cancellation_category": null, "cancellation_reason_id": null, "cancellation_reason_label": null, "canceled_by_user_id": null, "canceled_by_name": null, "canceled_at": null, "internal_note": "An example note.", "ef_full_name": "Novak1", "ef_dob": "An example answer.", "ef_address": "", "ef_identification_number": "", "ef_business_name": "", "ef_business_address": "", "ef_business_id": "", … (1731 more lines; the full answer is in the guide at docs.zooza.online) ``` **A page past the end is a `200` with no results**, not an error. With a capped total and a full last page, Next leads to one empty page: show a message and keep Previous. **Past the end: 200 with no results** ``` GET /v3/registrations?advanced_search=1&page=67&page_size=20 ``` Answer: 200 ```json { "total": 500, "total_capped": true, "page": null, "results": [], "offset": 1340 } ``` ## 5. Open one registration [`GET /v3/registrations/{ID}`](/api/reference#tag/registrations/GET/registrations/{ID}) reads one registration, with `registration_id` from the list as `{ID}`. Read it fresh rather than reusing the row: the row is a copy from when the list was loaded, and it lacks `public_note`. **One registration** ``` GET /v3/registrations/50687 ``` Answer: 200 ```json { "id": 50687, "company_id": 1, "course_id": 964, "schedule_id": 6686, "event_id": 0, "user_id": 11155, "slots": 1, "billing_period_id": 310, "parent": 0, "total_events": 0, "status": "registered", "business_order": false, "created": "2025-06-08 15:52:45", "updated": "2026-11-20 21:46:26", "note": "", "company_note": "An example note.", "public_note": "An example note.", "payment_method": "cash", "notify": true, "paid": 0, "payment_status": "downpayment_unpaid", "value": 300, "preferred_payment_schedule": 0, "__users__full_name": "Smith Clara", "__users__phone": "+421900000002", "__users__email": "client6@example.com", "__calc__debt": -350, "__calc__paid": 0, "__calc__balance": -350, "notify_about_upcoming_events": true, "notify_alternate_email": null, "notify_alternate_email_only": false, "guest_id": 0, "__calc__guest_email": null, "__calc__guest_user_id": 0, "__calc__guest_notify": false, "attendance_management": "default", "extra_replacements_limit": 0, "payments_managed_by": 0, "iban": null, "swift": null, "invoice_profile": 0, "origin": "copy", "__courses__name": "Rhythm Rebels", "__courses__get_extra_fields_from": "all", "__schedules__name": "Saturday blocks", "offline_charge_available": false, "__users__first_name": "Smith", "__users__last_name": "Clara", "vat_level": 0, "payment_schedule_id": 0, "__calc__order_summary": "(HTML left out of the example)", "trial_started": "2025-06-08 15:52:45", "trial_ended": null, "trial_lost": null, "trial_won": null, "booking_link_sent": null, "first_followup_sent": null, "second_followup_sent": null, … (743 more lines; the full answer is in the guide at docs.zooza.online) ``` **The fields aren't named as in the list.** | In the list | In the detail | |---|---| | `registration_id` | `id` | | `full_name`, `email`, `phone` | `__users__full_name`, `__users__email`, `__users__phone` | | `course.name` | `__courses__name` | The detail has both notes: - `company_note` is the staff note, never shown to the client; - `public_note` is shown to the client in their profile and may hold basic HTML. Show it as text, or sanitise it before you render it. **An id that isn't the company's registration is a `400`, not a `404`.** The body is the [request error](../errors.md#requesterror) `{"errors": [{"0065": "…"}], "request_valid": false}`: - the message is in the company's language, so branch on the code `0065`; - there's no `request_id` in this body, only in the `X-Request-Id` header; - an error display built only for the standard error object shows nothing useful here, so handle both shapes. **A registration id that isn't the company's** ``` GET /v3/registrations/999999999 ``` Answer: 400 ```json { "errors": [ { "0065": "Resource not found - Registration" } ], "request_valid": false } ``` Check the id before you call: if it comes from a URL, send only whole numbers. ## Next [Change a registration](change-a-registration.md): save a staff note, or change the status after checking what the change would do. --- # Change a registration This guide changes one registration in two ways: 1. [Save the staff note](#1-save-the-staff-note). 2. [Change the status](#2-change-the-status): check the change first, then apply it. To cancel, see [Cancel a registration](cancel-a-registration.md). Both use [`PUT /v3/registrations/{ID}`](/api/reference#tag/registrations/PUT/registrations/{ID}). Every request and answer on this page was recorded from a real call. Names, emails and other personal data are replaced. ## Before you start - **A key with `core_read` and `core_write`.** Each `PUT` costs 5 points, the check included. See [Access and rate limits](../access-and-rate-limits.md). - **The registration's id.** [Find registrations](find-registrations.md) shows how to get one. - **The token from [Authentication](../authentication.md)**, sent as `Authorization: Bearer `. ### How this `PUT` decides what to do `PUT /registrations/{ID}` is one operation for several jobs. It looks at the request in a fixed order and does the first that matches: 1. `?action=preflight_check` (a check, step 2); 2. a `billing` object; 3. `notify_alternate_email` or `notify_alternate_email_only`; 4. `?confirm_registration=1`; 5. `slots`, `notify`, `business_order` or `notify_about_upcoming_events`; 6. a body `action` (a status change, step 2); 7. `actions`; 8. `?confirm_late=1`; 9. only then, the plain fields: `company_note`, `public_note`, `note`, `downpayment`, … So **send only the fields of the one job you mean**. The [reference](/api/reference#tag/registrations/PUT/registrations/{ID}) describes each job. ## 1. Save the staff note `company_note` is the staff note: the client never sees it. Send a body with only that field. Fields you leave out are kept, because this `PUT` changes what you send and doesn't replace the registration. So don't read the registration and send it all back. **Save the staff note** ``` PUT /v3/registrations/168321 ``` ```json { "company_note": "Called on Monday\nwill pay on Friday" } ``` Answer: 200 ```json { "id": 168321, "company_id": 1, "course_id": 990, "schedule_id": 6779, "event_id": 0, "user_id": 65604, "slots": 1, "billing_period_id": 268, "parent": 0, "total_events": 0, "status": "canceled", "business_order": false, "created": "2026-11-20 18:21:34", "updated": "2026-11-21 15:35:48", "note": "", "company_note": "Called on Monday\nwill pay on Friday", "public_note": null, "payment_method": "cash", "notify": true, "paid": 0, "payment_status": "awaiting_payment", "value": 110, "preferred_payment_schedule": 0, "__users__full_name": "Anna Novak", "__users__phone": "+421900000002", "__users__email": "client2@example.com", "__calc__debt": -110, "__calc__paid": 0, "__calc__balance": -110, "notify_about_upcoming_events": true, "notify_alternate_email": null, "notify_alternate_email_only": false, "guest_id": 0, "__calc__guest_email": null, "__calc__guest_user_id": 0, "__calc__guest_notify": false, "attendance_management": "default", "extra_replacements_limit": 0, "payments_managed_by": 0, "iban": null, "swift": null, "invoice_profile": 0, "origin": "widget", "__courses__name": "Kids gymnastics", "__courses__get_extra_fields_from": "all", "__schedules__name": "Tuesday 17:00", "offline_charge_available": false, "__users__first_name": "Anna", "__users__last_name": "Novak", "vat_level": 0, "payment_schedule_id": 0, "__calc__order_summary": "(HTML left out of the example)", "trial_started": "2026-11-20 18:21:34", "trial_ended": null, "trial_lost": null, "trial_won": null, "booking_link_sent": null, "first_followup_sent": null, "second_followup_sent": null, … (530 more lines; the full answer is in the guide at docs.zooza.online) ``` The answer is the whole registration as it is now, with the new note. To clear the note, send `""`: **Clear the note** ``` PUT /v3/registrations/168321 ``` ```json { "company_note": "" } ``` Answer: 200 ```json { "id": 168321, "company_id": 1, "course_id": 990, "schedule_id": 6779, "event_id": 0, "user_id": 65604, "slots": 1, "billing_period_id": 268, "parent": 0, "total_events": 0, "status": "pre_registered", "business_order": false, "created": "2026-11-20 18:21:34", "updated": "2026-11-20 21:50:49", "note": "", "company_note": "", "public_note": null, "payment_method": "cash", "notify": true, "paid": 0, "payment_status": "awaiting_payment", "value": 110, "preferred_payment_schedule": 0, "__users__full_name": "Anna Novak", "__users__phone": "+421900000002", "__users__email": "client2@example.com", "__calc__debt": -110, "__calc__paid": 0, "__calc__balance": -110, "notify_about_upcoming_events": true, "notify_alternate_email": null, "notify_alternate_email_only": false, "guest_id": 0, "__calc__guest_email": null, "__calc__guest_user_id": 0, "__calc__guest_notify": false, "attendance_management": "default", "extra_replacements_limit": 0, "payments_managed_by": 0, "iban": null, "swift": null, "invoice_profile": 0, "origin": "widget", "__courses__name": "Kids gymnastics", "__courses__get_extra_fields_from": "all", "__schedules__name": "Tuesday 17:00", "offline_charge_available": false, "__users__first_name": "Anna", "__users__last_name": "Novak", "vat_level": 0, "payment_schedule_id": 0, "__calc__order_summary": "(HTML left out of the example)", "trial_started": "2026-11-20 18:21:34", "trial_ended": null, "trial_lost": null, "trial_won": null, "booking_link_sent": null, "first_followup_sent": null, "second_followup_sent": null, … (530 more lines; the full answer is in the guide at docs.zooza.online) ``` **Line breaks from a browser textarea arrive as `\r\n`.** Turn them into `\n` before you send, if you want them stored the way the Zooza app stores them. **One extra field and the note is ignored.** A field from an earlier job in the list above makes the `PUT` do that job and read nothing else. The answer is still `200` with the registration, and the note is unchanged, with no error: **company_note with notify_about_upcoming_events: note unchanged** ``` PUT /v3/registrations/168321 ``` ```json { "company_note": "An example note.", "notify_about_upcoming_events": 1 } ``` Answer: 200 ```json { "id": 168321, "company_id": 1, "course_id": 990, "schedule_id": 6779, "event_id": 0, "user_id": 65604, "slots": 1, "billing_period_id": 268, "parent": 0, "total_events": 0, "status": "pre_registered", "business_order": false, "created": "2026-11-20 18:21:34", "updated": "2026-11-20 21:50:19", "note": "", "company_note": "Called on Monday\nsecond line", "public_note": null, "payment_method": "cash", "notify": true, "paid": 0, "payment_status": "awaiting_payment", "value": 110, "preferred_payment_schedule": 0, "__users__full_name": "Anna Novak", "__users__phone": "+421900000002", "__users__email": "client2@example.com", "__calc__debt": -110, "__calc__paid": 0, "__calc__balance": -110, "notify_about_upcoming_events": true, "notify_alternate_email": null, "notify_alternate_email_only": false, "guest_id": 0, "__calc__guest_email": null, "__calc__guest_user_id": 0, "__calc__guest_notify": false, "attendance_management": "default", "extra_replacements_limit": 0, "payments_managed_by": 0, "iban": null, "swift": null, "invoice_profile": 0, "origin": "widget", "__courses__name": "Kids gymnastics", "__courses__get_extra_fields_from": "all", "__schedules__name": "Tuesday 17:00", "offline_charge_available": false, "__users__first_name": "Anna", "__users__last_name": "Novak", "vat_level": 0, "payment_schedule_id": 0, "__calc__order_summary": "(HTML left out of the example)", "trial_started": "2026-11-20 18:21:34", "trial_ended": null, "trial_lost": null, "trial_won": null, "booking_link_sent": null, "first_followup_sent": null, "second_followup_sent": null, … (530 more lines; the full answer is in the guide at docs.zooza.online) ``` If you must be sure, compare `company_note` in the answer with what you sent. **An id that isn't the company's registration is a `400` request error with code `0065`**, as with `GET`: **Updating a registration that isn't the company's** ``` PUT /v3/registrations/999999999 ``` ```json { "company_note": "An example note." } ``` Answer: 400 ```json { "errors": [ { "0065": "Resource not found - Registration" } ], "request_valid": false } ``` ## 2. Change the status A status change can move money, affect other registrations booked together, and be refused by the company's rules. So check it first with a [preflight check](../preflight-check.md): the same `PUT` with `?action=preflight_check` tests the change and writes nothing. Then send the same body without the query to apply it. **Cancelling has decisions of its own**: a reason, the client's make-up credits, the registrations booked together, an email, and a date. [Cancel a registration](cancel-a-registration.md) covers them. This section covers any status change. **The body** is `{ "action": "change_status", "status": "" }`. - **Without `schedule_at`**, the change is made now. - **No email goes** unless you send `email` or `send_confirmation` (see [Cancel a registration](cancel-a-registration.md#4-email-and-date)). ### Check the change **Checking canceled → registered** ``` PUT /v3/registrations/168321?action=preflight_check ``` ```json { "action": "change_status", "status": "registered" } ``` Answer: 200 ```json { "checks": { "rules_hold": { "name": "rules_hold", "result": "passed", "severity": "error" }, "decision_missing": { "name": "decision_missing", "result": "passed", "severity": "error" }, "money_moves": { "name": "money_moves", "result": "passed", "severity": "notice" }, "transferred_money_stays": { "name": "transferred_money_stays", "result": "passed", "severity": "notice" }, "currency_conversion": { "name": "currency_conversion", "result": "passed", "severity": "notice" }, "status_allowed": { "name": "status_allowed", "result": "passed", "severity": "error" } }, "properties": { "result": { "name": "result", "value": { "booking": { "type": "registration", "id": 168321 }, "root": { "type": "registration", "id": 168321 }, "limits": { "max_depth": 3, "truncated": false }, "members": [ { "type": "registration", "id": 168321, "summary": { "name": "Ballet basics", "client_name": "Anna Novak", "course": { "id": 990, "name": "Kids gymnastics" }, … (38 more lines; the full answer is in the guide at docs.zooza.online) ``` The answer is a `200` with `checks` and `properties`, **whether or not the change is allowed**. If any check with severity `error` is `not_passed`, the change would be refused, so don't offer to apply it. With more than one registration in `properties.result.value.members`, say that the change applies to this registration. [Cancel a registration](cancel-a-registration.md#1-check-the-cancellation) describes each check and property of a status change. Here the change isn't allowed, because `status_allowed` didn't pass: **A change the check refuses: still 200** ``` PUT /v3/registrations/168321?action=preflight_check ``` ```json { "action": "change_status", "status": "pre_registered" } ``` Answer: 200 ```json { "checks": { "rules_hold": { "name": "rules_hold", "result": "passed", "severity": "error" }, "decision_missing": { "name": "decision_missing", "result": "passed", "severity": "error" }, "money_moves": { "name": "money_moves", "result": "passed", "severity": "notice" }, "transferred_money_stays": { "name": "transferred_money_stays", "result": "passed", "severity": "notice" }, "currency_conversion": { "name": "currency_conversion", "result": "passed", "severity": "notice" }, "status_allowed": { "name": "status_allowed", "result": "not_passed", "severity": "error" } }, "properties": { "result": { "name": "result", "value": { "booking": { "type": "registration", "id": 168321 }, "root": { "type": "registration", "id": 168321 }, "limits": { "max_depth": 3, "truncated": false }, "members": [ { "type": "registration", "id": 168321, "summary": { "name": "Ballet basics", "client_name": "Anna Novak", "course": { "id": 990, "name": "Kids gymnastics" }, … (38 more lines; the full answer is in the guide at docs.zooza.online) ``` ### Apply it Send the same body without `?action=preflight_check`. The answer is the registration with its new status, as here after a cancellation: **Apply the cancellation** ``` PUT /v3/registrations/168321 ``` ```json { "action": "change_status", "status": "canceled", "cancellation_reason": "personal_default" } ``` Answer: 200 ```json { "id": 168321, "company_id": 1, "course_id": 990, "schedule_id": 6779, "event_id": 0, "user_id": 65604, "slots": 1, "billing_period_id": 268, "parent": 0, "total_events": 0, "status": "canceled", "business_order": false, "created": "2026-11-20 18:21:34", "updated": "2026-11-21 15:36:41", "note": "", "company_note": "Called on Monday\nwill pay on Friday", "public_note": null, "payment_method": "cash", "notify": true, "paid": 0, "payment_status": "awaiting_payment", "value": 110, "preferred_payment_schedule": 0, "__users__full_name": "Anna Novak", "__users__phone": "+421900000002", "__users__email": "client2@example.com", "__calc__debt": -110, "__calc__paid": 0, "__calc__balance": -110, "notify_about_upcoming_events": true, "notify_alternate_email": null, "notify_alternate_email_only": false, "guest_id": 0, "__calc__guest_email": null, "__calc__guest_user_id": 0, "__calc__guest_notify": false, "attendance_management": "default", "extra_replacements_limit": 0, "payments_managed_by": 0, "iban": null, "swift": null, "invoice_profile": 0, "origin": "widget", "__courses__name": "Kids gymnastics", "__courses__get_extra_fields_from": "all", "__schedules__name": "Tuesday 17:00", "offline_charge_available": false, "__users__first_name": "Anna", "__users__last_name": "Novak", "vat_level": 0, "payment_schedule_id": 0, "__calc__order_summary": "(HTML left out of the example)", "trial_started": "2026-11-20 18:21:34", "trial_ended": null, "trial_lost": null, "trial_won": null, "booking_link_sent": null, "first_followup_sent": null, "second_followup_sent": null, … (689 more lines; the full answer is in the guide at docs.zooza.online) ``` **A refused change, applied anyway, is a `400`** with code `0033`: **Applying a refused change: 400 0033** ``` PUT /v3/registrations/168321 ``` ```json { "action": "change_status", "status": "pre_registered" } ``` Answer: 400 ```json { "errors": [ { "0033": "Wrong parameters sent or parameters missing - Invalid status for registration [#1]." } ], "request_valid": false } ``` ### The two error shapes A status value the API doesn't know is caught first, against the schema: a `422` in the standard [error object](../errors.md), with `request_id` in the body and `errors[].path` naming the field. **An unknown status: 422** ``` PUT /v3/registrations/168321?action=preflight_check ``` ```json { "action": "change_status", "status": "bogus" } ``` Answer: 422 ```json { "error": "validation_failed", "message": "The request does not match the endpoint's schema.", "request_id": "00000000-0000-4000-8000-000000000050", "errors": [ { "location": "body", "path": "/status", "code": "enum_invalid", "message": "Must be one of: 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.", "expected": { "enum": [ "pre_insert", "pre_registered", "registered" ] }, "received": { "type": "string", "value": "bogus" } } ] } ``` A refused change, or a cancellation without a reason, is caught when the request runs: a `400` [request error](../errors.md#requesterror) with a four-digit code, a message in the company's language and no `request_id` in the body, like the `0033` above. Handle both shapes, and branch on `error` and `errors[].code` for a `422`, or on the four-digit code for a `400`. --- # Cancel a registration Cancelling looks like one field, `status: canceled`, but it can do more: - cancel the client's unused make-up credits; - affect the other registrations booked together with this one; - move money; - email the client. This guide uses the [preflight check](../preflight-check.md) to find out what a cancellation would do, ask the user what it needs, and then apply it: 1. [Check the cancellation](#1-check-the-cancellation). 2. [Make-up credits](#2-make-up-credits): how many the client keeps. 3. [Registrations booked together](#3-registrations-booked-together): what happens to the group. 4. [Email and date](#4-email-and-date): whether the client hears about it, and when it happens. 5. [Apply](#5-apply). Every request and answer from a recorded call is marked as an example. Names, emails and other personal data are replaced. ## Before you start - **A key with `core_read` and `core_write`.** The check and the cancellation each cost 5 points. See [Access and rate limits](../access-and-rate-limits.md). - **The registration's id.** See [Find registrations](find-registrations.md). - **The token from [Authentication](../authentication.md)**, sent as `Authorization: Bearer `. Both calls are [`PUT /v3/registrations/{ID}`](/api/reference#tag/registrations/PUT/registrations/{ID}) with the body `action: change_status`. [Change a registration](change-a-registration.md) explains why that body must carry nothing else. ## 1. Check the cancellation Send the cancellation with `?action=preflight_check`. **A cancellation needs a reason**: `cancellation_reason`, one of the values the reference lists (for example `personal_default` or `not_paid_default`), or `cancellation_reason_id`, one of the company's own reasons. **Checking a cancellation** ``` PUT /v3/registrations/168321?action=preflight_check ``` ```json { "action": "change_status", "status": "canceled", "cancellation_reason": "personal_default" } ``` Answer: 200 ```json { "checks": { "rules_hold": { "name": "rules_hold", "result": "passed", "severity": "error" }, "decision_missing": { "name": "decision_missing", "result": "passed", "severity": "error" }, "money_moves": { "name": "money_moves", "result": "passed", "severity": "notice" }, "transferred_money_stays": { "name": "transferred_money_stays", "result": "passed", "severity": "notice" }, "currency_conversion": { "name": "currency_conversion", "result": "passed", "severity": "notice" }, "status_allowed": { "name": "status_allowed", "result": "passed", "severity": "error" } }, "properties": { "result": { "name": "result", "value": { "booking": { "type": "registration", "id": 168321 }, "root": { "type": "registration", "id": 168321 }, "limits": { "max_depth": 3, "truncated": false }, "members": [ { "type": "registration", "id": 168321, "summary": { "name": "Ballet basics", "client_name": "Anna Novak", "course": { "id": 990, "name": "Kids gymnastics" }, … (46 more lines; the full answer is in the guide at docs.zooza.online) ``` **The checks of a status change.** The reference doesn't describe them per check yet, so this table describes how they behave today: | Check | Severity | Not passed means | |---|---|---| | `status_allowed` | `error` | The registration can't go from its current status to this one. | | `rules_hold` | `error` | The change would break a rule about registrations booked together. `refusals` says which. | | `decision_missing` | `error` | The change needs a decision you haven't sent: what happens to the group (step 3). | | `replacement_conversion_count` | `error` | Only when you send `convert_replacements_to_free_event`: the number isn't a whole number from 0 to the make-up credits available (step 2). | | `money_moves` | `notice` | Money would move between registrations. `transfers` lists the movements. | | `transferred_money_stays` | `notice` | Money moved earlier stays where it is; it doesn't move back. | | `currency_conversion` | `notice` | A movement would convert between currencies. | **The properties:** | Property | What it holds | |---|---| | `result` | The registrations involved, as they would be after the change. `members` lists each with a `summary` (client, programme, class, status, balance, currency). | | `replacement_credits` | On a cancellation only: the client's unused, unexpired make-up credits from this registration (step 2). | | `refusals` | Why an `error` check failed: the `check`, the `booking` concerned and, when a decision would solve it, its `options`. | | `options` | Every choice the change offers, in the same shape as a refusal's `options`. `{}` when there's nothing to choose. | | `transfers` | The money movements the change would make. | | `balances` | Each affected registration's balance after the change. | A registration that isn't in a group passes every check about groups, and `options` is `{}`. **Without a reason, the check itself is refused**, with a `400` `0338`: **Checking a cancellation without a reason** ``` PUT /v3/registrations/168321?action=preflight_check ``` ```json { "action": "change_status", "status": "canceled" } ``` Answer: 400 ```json { "errors": [ { "0338": "Choose a cancellation reason." } ], "request_valid": false } ``` ## 2. Make-up credits When a client misses a session in time, they can earn a make-up credit (see [How make-up sessions work](../../make-up-sessions.md)). **Cancelling the registration cancels every make-up credit the client still has from it**, unless you say how many to keep as free sessions. `properties.replacement_credits` shows what the client has: ```json { "available": 2, "replacement": 2, "replacement_transfer": 0 } ``` `available` is the total, split into the two kinds of make-up credit. With `available: 0` there's nothing to ask. Otherwise, ask before you cancel: > This registration has 2 unused make-up credits. Cancelling it cancels them too. How many should the client keep > as free sessions? (0–2) Send the answer as `convert_replacements_to_free_event`. To validate the number first, include it in the check: `replacement_conversion_count` then says whether it's valid. - **Which credits are kept:** the ones that expire last. - **The rest:** cancelled together with the registration. Either all of it happens or none of it. - **Without the field, or with `0`:** every credit is cancelled. - **On apply:** the number is checked against the credits available then, so it fails if the client has used one in the meantime. There's no other `/v3` call that lists a registration's make-up credits. The check is the way to know. ## 3. Registrations booked together Registrations can be booked together, for example siblings in one booking, or a trial with the products bought with it. A group has one main registration, which may pay for the others. **Cancelling any other registration in the group changes nothing about the group.** The checks pass and `options` is `{}`. **Cancelling the main registration needs a decision.** Without it, `decision_missing` fails, and `refusals` and `options` list the choices: | Choice | What happens | |---|---| | `new_root` | Another registration of the group becomes the main one. `options.new_root` lists the registrations that can. The cancelled registration's money moves to the new main one, unless `options` offers `keep_balance` and you choose it. | | `whole_group` | Every registration in the group is cancelled with it. | | `disband` | The group stops existing, and each registration pays for itself. Optionally, `transfer_balance_to` (one of `options.transfer_balance_to`) receives the cancelled registration's remaining balance. | Send the choice in `linking`, next to `status`, both in the check and when you apply: ```json { "action": "change_status", "status": "canceled", "cancellation_reason": "personal_default", "linking": { "resolution": "new_root", "new_root": { "type": "registration", "id": 50715 } } } ``` Check again with the decision in. `decision_missing` then passes, and `transfers` and `balances` show what the choice does to the money. Show that to the user before you apply. ## 4. Email and date **Email.** Zooza emails the client only if you ask: - **`send_confirmation`** emails a cancellation confirmation **whatever its value**, `false` included. To send no email, leave the key out. - **`email`** sends your own message, but only when it has `subject`, `body` and `template`. The check doesn't say whether an email would go: that depends only on these two fields. **Date.** Without `schedule_at`, the registration is cancelled now. With `schedule_at: "YYYY-MM-DD"`, it is cancelled on that date, but some of it is decided **when you schedule it**: - the make-up credits are handled at once: kept as free sessions or cancelled; - the group decision (step 3) is applied at once; - only the status waits for the date. The check works the same for a scheduled cancellation. To call a scheduled cancellation off, send `action: revoke_scheduled_status_change`. That doesn't bring back make-up credits that were already cancelled. ## 5. Apply Send the same body without `?action=preflight_check`, with the decisions from steps 2 to 4 added. The answer is the registration with its new status. **Applying the cancellation** ``` PUT /v3/registrations/168321 ``` ```json { "action": "change_status", "status": "canceled", "cancellation_reason": "personal_default" } ``` Answer: 200 ```json { "id": 168321, "company_id": 1, "course_id": 990, "schedule_id": 6779, "event_id": 0, "user_id": 65604, "slots": 1, "billing_period_id": 268, "parent": 0, "total_events": 0, "status": "canceled", "business_order": false, "created": "2026-11-20 18:21:34", "updated": "2026-11-21 15:36:41", "note": "", "company_note": "Called on Monday\nwill pay on Friday", "public_note": null, "payment_method": "cash", "notify": true, "paid": 0, "payment_status": "awaiting_payment", "value": 110, "preferred_payment_schedule": 0, "__users__full_name": "Anna Novak", "__users__phone": "+421900000002", "__users__email": "client2@example.com", "__calc__debt": -110, "__calc__paid": 0, "__calc__balance": -110, "notify_about_upcoming_events": true, "notify_alternate_email": null, "notify_alternate_email_only": false, "guest_id": 0, "__calc__guest_email": null, "__calc__guest_user_id": 0, "__calc__guest_notify": false, "attendance_management": "default", "extra_replacements_limit": 0, "payments_managed_by": 0, "iban": null, "swift": null, "invoice_profile": 0, "origin": "widget", "__courses__name": "Kids gymnastics", "__courses__get_extra_fields_from": "all", "__schedules__name": "Tuesday 17:00", "offline_charge_available": false, "__users__first_name": "Anna", "__users__last_name": "Novak", "vat_level": 0, "payment_schedule_id": 0, "__calc__order_summary": "(HTML left out of the example)", "trial_started": "2026-11-20 18:21:34", "trial_ended": null, "trial_lost": null, "trial_won": null, "booking_link_sent": null, "first_followup_sent": null, "second_followup_sent": null, … (689 more lines; the full answer is in the guide at docs.zooza.online) ``` **If the check refused it, the apply is refused too**, with a `400`. Here is a refused change applied anyway: **Applying a refused change: 400 0033** ``` PUT /v3/registrations/168321 ``` ```json { "action": "change_status", "status": "pre_registered" } ``` Answer: 400 ```json { "errors": [ { "0033": "Wrong parameters sent or parameters missing - Invalid status for registration [#1]." } ], "request_valid": false } ``` ### Undoing a cancellation You can change a cancelled registration's status again, but not always back to what it was. For example, after `pre_registered` → `canceled`, the check refuses `pre_registered` and allows `registered` or `waitlist`. Check first: **Checking canceled → registered** ``` PUT /v3/registrations/168321?action=preflight_check ``` ```json { "action": "change_status", "status": "registered" } ``` Answer: 200 ```json { "checks": { "rules_hold": { "name": "rules_hold", "result": "passed", "severity": "error" }, "decision_missing": { "name": "decision_missing", "result": "passed", "severity": "error" }, "money_moves": { "name": "money_moves", "result": "passed", "severity": "notice" }, "transferred_money_stays": { "name": "transferred_money_stays", "result": "passed", "severity": "notice" }, "currency_conversion": { "name": "currency_conversion", "result": "passed", "severity": "notice" }, "status_allowed": { "name": "status_allowed", "result": "passed", "severity": "error" } }, "properties": { "result": { "name": "result", "value": { "booking": { "type": "registration", "id": 168321 }, "root": { "type": "registration", "id": 168321 }, "limits": { "max_depth": 3, "truncated": false }, "members": [ { "type": "registration", "id": 168321, "summary": { "name": "Ballet basics", "client_name": "Anna Novak", "course": { "id": 990, "name": "Kids gymnastics" }, … (38 more lines; the full answer is in the guide at docs.zooza.online) ``` Make-up credits cancelled with the registration don't come back. --- # Set up a term A term is a programme, a class in it, and the class's weekly sessions. This guide creates one with three writes, then reads it back from Zooza to prove that everything exists: 1. [Load the choices](#1-load-the-choices): venues and rooms, billing periods, instructors. 2. [Create the programme](#2-create-the-programme), or use an existing one. 3. [Create the class](#3-create-the-class). 4. [Create the sessions](#4-create-the-sessions), all of them in one request. 5. [Read the term back](#5-read-the-term-back) and count the sessions. 6. [When a write fails](#6-when-a-write-fails), finish without creating anything twice. Every request and answer on this page was recorded from a real call. Names, emails and other personal data are replaced. :::warning There is no delete `/v3` can't delete a programme, a class or a session. Everything you create stays in the company, so check every value before you send it, and never send a write twice by accident. Try this in a test company first. ::: ## Before you start - **A key with `core_read` and `core_write`.** The three writes cost 5 points each, and the reads 1 or 2 points each. See [Access and rate limits](../access-and-rate-limits.md). - **A billing period for the term, created in the Zooza app.** A billing period (term block) groups classes into a term, such as "Autumn 2026". `/v3` can list billing periods but can't create them. - **At least one venue with a room**, and **at least one instructor** in the company. The calls below use the token from [Authentication](../authentication.md). Every request needs `Authorization: Bearer `, and every body is JSON. ## 1. Load the choices A class points at things that must already exist: a venue and one of its rooms, an instructor, and a billing period. Load them before you write anything, and offer only what exists. **`POST /schedules` doesn't check these ids** (see [step 3](#3-create-the-class)), so a typo creates a class that points at nothing. The three reads don't depend on each other, so make them together. If one fails, show that error where its list would be and keep the others. **Venues and rooms:** [`GET /v3/places`](/api/reference#tag/company/GET/places) returns the company's active venues, each with its active rooms. A class and each of its sessions take both `place_id` and `room_id`, so keep the venue's id with the room the user picks. A venue without rooms can't hold a class. **Venues and their rooms** ``` GET /v3/places ``` Answer: 200 ```json { "total": 34, "page": 0, "page_size": 500, "settings": { "status": [ "active" ] }, "data": [ { "id": 4, "company_id": 1, "events": 522, "upcoming": 2, "name": "Hill Studio", "street": "", "region": "", "city": "Example City", "created": "2022-11-17 10:53:05", "modified": "2026-11-20 09:00:04", "status": "active", "subdivision": "SK-ZI", "latitude": 48.1486, "longitude": 17.1077, "__calc__registration_url": "https://booking.example.com/test123/registration?place_id=4_0", "about": null, "instructions": null, "zip": null, "google_review_link_status": "unlinked", "google_location_resource": null, "google_review_url": null, "google_location_title": null, "google_location_address": null, "google_linked_at": null, "subdivisions": [ "SK-ZI", "SK-BL" ], "place": "Hill Studio, Example City", "pid": "4_0", "rooms": [] }, { "id": 8, "company_id": 1, "events": 0, "upcoming": 0, "name": "Park Hall", "street": null, "region": null, "city": "Example City", "created": "2022-11-17 10:53:05", "modified": "2026-11-20 09:00:04", "status": "active", "subdivision": "SK-BL", "latitude": 48.1486, "longitude": 17.1077, "__calc__registration_url": "https://booking.example.com/test123/registration?place_id=8_0", "about": null, … (49 more lines; the full answer is in the guide at docs.zooza.online) ``` **Billing periods:** [`GET /v3/billing_periods`](/api/reference#tag/billing-periods/GET/billing_periods) returns active and inactive periods, sorted by name. Leave out `page_size`, and all of them come in one page. Use `active` to hide the old ones. A period's `period_start` and `period_end` can be `null`, so don't rely on the dates to find "this term's" period; let the user choose. **Term blocks (billing periods)** ``` GET /v3/billing_periods ``` Answer: 200 ```json { "total": 25, "page": 0, "page_size": 1000, "settings": [], "data": [ { "id": 310, "company_id": 1, "name": "2024/2025", "active": true, "period_start": null, "period_end": null, "created": "2024-10-06 19:10:21", "modified": "2026-08-13 09:01:53" }, { "id": 301, "company_id": 1, "name": "Data report 2023", "active": true, "period_start": null, "period_end": null, "created": "2023-09-12 21:49:05", "modified": "2026-08-13 09:01:53" }, { "id": 302, "company_id": 1, "name": "Autumn 2023", "active": true, "period_start": null, "period_end": null, "created": "2023-09-19 21:19:30", "modified": "2026-05-10 18:21:39" } ] } ``` **Instructors:** [`GET /v3/users`](/api/reference#tag/users/GET/users) lists everyone with a role in the company, clients included. Send `roles=owner|main_member|member|external_member|assistant` to get only the people who can teach a class. Don't copy a `trainer_id` from an existing class: that person may have left. **Instructors** ``` GET /v3/users?roles=owner|main_member|member|external_member|assistant ``` Answer: 200 ```json { "total": 36, "page": 0, "page_size": 50, "settings": { "roles": "'owner','main_member','member','external_member','assistant'" }, "data": [ { "id": 11247, "first_name": "", "last_name": "", "email": "client48@example.com", "phone": "", "feedback": true, "created": "2025-06-13 17:18:03", "updated": "2025-06-13 17:18:03", "avatar": null, "email_verified": false, "email_verified_at": null, "phone_verified": false, "phone_verified_at": null, "email_rejected": false, "role": { "id": 12128, "company_id": 1, "user_id": 11247, "role": "owner", "created": "2025-06-13 17:18:03", "updated": "2025-06-13 17:18:03" } }, { "id": 11120, "first_name": "Ida Silva Jonas", "last_name": "", "email": "client36@example.com", "phone": "", "feedback": true, "created": "2023-08-08 01:13:34", "updated": "2023-08-08 01:13:34", "avatar": null, "email_verified": false, "email_verified_at": null, "phone_verified": false, "phone_verified_at": null, "email_rejected": false, "role": { "id": 11945, "company_id": 1, "user_id": 11120, "role": "member", "created": "2023-08-08 01:13:34", "updated": "2023-08-08 01:13:34" } }, { "id": 645, "first_name": "Paul", "last_name": "Costa", … (22 more lines; the full answer is in the guide at docs.zooza.online) ``` ## 2. Create the programme A class lives in a programme, so the programme comes first. If the term belongs to a programme you already have, pick it from [`GET /v3/courses`](/api/reference#tag/programmes/GET/courses) and skip to step 3. [`POST /v3/courses`](/api/reference#tag/programmes/POST/courses) needs five fields: | Field | For a term | Meaning | |---|---|---| | `name` | `"Little movers"` | The programme's name. **Check that it isn't empty yourself**: `""` is accepted. | | `public` | `true` / `false` | Show it in the programme catalogue on your website. | | `online_registration` | `true` / `false` | Allow online booking. `false` means none of its classes can be booked online. | | `registration_type` | `"full2"` | A term: the client books the whole class and is enrolled in every session. | | `course_type` | `"course"` | A programme with instructors and sessions. | `price` is the programme's total price. Payment settings you don't send (`money_collection`, `price_type`, `unit_price`, `registration_fee`) are copied from the company's defaults. If the company collects in instalments, `price` is for reference only, so read `money_collection` in the answer, or send it. **Create the programme** ``` POST /v3/courses ``` ```json { "name": "Little movers (guide)", "price": 90, "public": false, "online_registration": false, "registration_type": "full2", "course_type": "course" } ``` Answer: 200 ```json { "id": 104771, "company_id": 1, "created": "2026-11-21 15:32:30", "name": "Little movers (guide)", "url": "", "price": 90, "registration_fee": 0, "cash": true, "direct_debit": false, "direct_debit_provider": "go_cardless", "online_card": true, "online_transfer": false, "fees_included_in_price": true, "public": false, "archive": false, "online_registration": false, "on_behalf": false, "feedback_during_course": true, "feedback_after_course": true, "get_extra_fields_from": "all", "get_basic_fields_from": "registrant", "registration_type": "full2", "course_type": "course", "registration_slots_min": 1, "registration_slots_max": 5, "registration_open": 0, "show_on_site": 0, "hide_if_full": false, "allow_replacements": false, "allow_custom_replacements": false, "auto_approve_custom_replacements": false, "allow_cancel_until": 0, "allow_replacements_waitlist": false, "waitlist": "", "auto_waitlist_notification": false, "description": null, "use_extra_fields": false, "for_children": false, "replacements_limit": 2, "replacements_settings": [], "theme": null, "custom_email": 0, "custom_email_event_notification": 0, "event_notification": true, "late_registrations": "auto_approve", "allow_registration_after_end": false, "custom_label_note": null, "hide_before": 0, "collect_feedback_start": null, "iban": null, "swift": null, "custom_label_first_name": null, "custom_label_last_name": null, "custom_label_phone": null, "custom_label_email": null, "upcoming_events_notification": false, "__calc__fee_cash": 9, "__calc__fee_online_card": 6.21, "__calc__fee_direct_debit": 0, … (278 more lines; the full answer is in the guide at docs.zooza.online) ``` The answer is the whole programme. Keep its `id` for the next step. ## 3. Create the class The class is the group that meets: venue and room, instructor, number of places, start time and billing period. [`POST /v3/schedules`](/api/reference#tag/classes/POST/schedules) creates it in the programme. Creating a class creates no sessions. Send these fields, and check every one before you send: - **Required:** `course_id`, `name`, `room_id`, `trainer_id`, `capacity`, `all_day`, `online_registration`. - **`place_id`, always.** Without it, Zooza picks one of the company's active venues, which may not be the room's. - **`billing_period_id`, always.** Without it, the class goes into the company's most recently created billing period, which may not be this term's. - **`time`**: the start in **minutes after midnight** (`960` = 16:00). Leave it out and the class starts at 15:00. - **`duration`**: the length in minutes. Leave it out and it is 60. **Create the class** ``` POST /v3/schedules ``` ```json { "course_id": 104771, "name": "Monday 16:00", "place_id": 16, "room_id": 1, "trainer_id": 645, "billing_period_id": 323, "capacity": 10, "all_day": false, "online_registration": false, "time": 960, "duration": 50 } ``` Answer: 200 ```json { "id": 1100404, "course_id": 104771, "time": 0, "duration": 50, "place_id": 16, "room_id": 1, "trainer_id": 645, "registrations_cap": 0, "capacity": 10, "extra_capacity": 0, "total_events": 0, "type": "weekly", "name": "Monday 16:00", "start": "0000-00-00", "end": "0000-00-00", "extra_capacity_usage": "add", "status": "active", "public": true, "online_registration": false, "price": 0, "registration_fee": 0, "note": null, "notify_trainer_on_cancellation": "never", "__calc__total_avg_nps_score": 0, "__calc__total_requests": 0, "__calc__registered": 0, "__calc__waitlist": 0, "__calc__late": 0, "trainer_rate_type_id": 0, "billable_events": 0, "__calc__events__elapsed": 0, "__calc__events__total": 0, "__calc__events__total_custom_replacements": 0, "__calc__events__total_billable": 0, "__calc__events__elapsed_billable": 0, "__calc__events__total_scheduled": 0, "__calc__events__total_unplanned": 0, "__calc__events__total_nonbillable": 0, "__courses__billable_events": 0, "__calc__possible_income": 0, "__calc__booked_income": 0, "__calc__debt_issued": 0, "__calc__debt_paid": 0, "__calc__debt_balance": 0, "__calc__debt_updated": null, "__calc__nps_promoters": 0, "__calc__nps_detractors": 0, "__calc__nps": 0, "unit_price": 0, "__calc__price": 90, "__courses__unit_price": 0, "__courses__price": 90, "__courses__registration_fee": 0, "__courses__price_type": "course_fee", "__courses__registration_type": "full2", "__calc__unit_price": 90, "__calc__registration_fee": 0, "__calc__current_price": 90, "__calc__min_age": 0, … (44 more lines; the full answer is in the guide at docs.zooza.online) ``` **Don't read the answer to check what was stored.** Right after creation the class has no sessions, so the answer says `time: 0` and `start` / `end` `"0000-00-00"`, which come from the sessions. It also says `billing_period_id: null`: the billing period is in `billing_periods_schedules.billing_period_id`. Keep the values you sent for the next step. **An all-day class:** send `all_day: true` and `time: 0`, and leave out `duration`. The class is stored with the default `duration` of 60, which doesn't matter for an all-day class. **An all-day class** ``` POST /v3/schedules ``` ```json { "course_id": 104769, "name": "Thursday all day", "place_id": 16, "room_id": 1, "trainer_id": 645, "billing_period_id": 323, "capacity": 10, "all_day": true, "online_registration": false, "time": 0 } ``` Answer: 200 ```json { "id": 1100405, "course_id": 104769, "time": 0, "duration": 60, "place_id": 16, "room_id": 1, "trainer_id": 645, "registrations_cap": 0, "capacity": 10, "extra_capacity": 0, "total_events": 0, "type": "weekly", "name": "Thursday all day", "start": "0000-00-00", "end": "0000-00-00", "extra_capacity_usage": "add", "status": "active", "public": true, "online_registration": false, "price": 0, "registration_fee": 0, "note": null, "notify_trainer_on_cancellation": "never", "__calc__total_avg_nps_score": 0, "__calc__total_requests": 0, "__calc__registered": 0, "__calc__waitlist": 0, "__calc__late": 0, "trainer_rate_type_id": 0, "billable_events": 0, "__calc__events__elapsed": 0, "__calc__events__total": 0, "__calc__events__total_custom_replacements": 0, "__calc__events__total_billable": 0, "__calc__events__elapsed_billable": 0, "__calc__events__total_scheduled": 0, "__calc__events__total_unplanned": 0, "__calc__events__total_nonbillable": 0, "__courses__billable_events": 0, "__calc__possible_income": 0, "__calc__booked_income": 0, "__calc__debt_issued": 0, "__calc__debt_paid": 0, "__calc__debt_balance": 0, "__calc__debt_updated": null, "__calc__nps_promoters": 0, "__calc__nps_detractors": 0, "__calc__nps": 0, "unit_price": 0, "__calc__price": 120, "__courses__unit_price": 0, "__courses__price": 120, "__courses__registration_fee": 0, "__courses__price_type": "course_fee", "__courses__registration_type": "full2", "__calc__unit_price": 120, "__calc__registration_fee": 0, "__calc__current_price": 120, "__calc__min_age": 0, … (44 more lines; the full answer is in the guide at docs.zooza.online) ``` ## 4. Create the sessions [`POST /v3/events`](/api/reference#tag/sessions/POST/events) creates any number of sessions in one request, so a whole term is one call and 5 points, not one call per week. The body is an object with an `events` list, one item per session. Each item repeats the class's values: | Field | Value | |---|---| | `date_string` | The date, `YYYY-MM-DD`. | | `time_string` | The start in **minutes after midnight**, a number despite its name: the class's `time`. | | `course_id`, `schedule_id` | The programme and the class. | | `trainer_id`, `place_id`, `room_id` | The class's instructor, venue and room. | Leave out `duration` and the session takes the class's length. New sessions are `scheduled`, and no client is notified. **Build the dates in UTC**, or in whole days. Adding 7 × 24 hours to a local midnight shifts by an hour when summer time starts or ends, and can land on the previous day. **Create the weekly sessions in one request** ``` POST /v3/events ``` ```json { "events": [ { "date_string": "2027-01-04", "time_string": 960, "course_id": 104771, "schedule_id": 1100404, "trainer_id": 645, "place_id": 16, "room_id": 1 }, { "date_string": "2027-01-11", "time_string": 960, "course_id": 104771, "schedule_id": 1100404, "trainer_id": 645, "place_id": 16, "room_id": 1 }, { "date_string": "2027-01-18", "time_string": 960, "course_id": 104771, "schedule_id": 1100404, "trainer_id": 645, "place_id": 16, "room_id": 1 }, { "date_string": "2027-01-25", "time_string": 960, "course_id": 104771, "schedule_id": 1100404, "trainer_id": 645, "place_id": 16, "room_id": 1 }, { "date_string": "2027-02-01", "time_string": 960, "course_id": 104771, "schedule_id": 1100404, "trainer_id": 645, "place_id": 16, "room_id": 1 }, { "date_string": "2027-02-08", "time_string": 960, "course_id": 104771, "schedule_id": 1100404, "trainer_id": 645, "place_id": 16, "room_id": 1 } ] } ``` Answer: 200 ```json { "total": 6, "page": 0, "page_size": 1000, "settings": { "ids": [ 9170719, 9170720, 9170721, 9170722, 9170723, 9170724 ] }, "data": [ { "id": 9170719, "company_id": 1, "course_id": 104771, "schedule_id": 1100404, "trainer_id": 645, "place_id": 16, "room_id": 1, "name": null, "is_custom_replacement_event": false, "summary": null, "summary_public": null, "summary_filled_by": 0, "summary_filled_at": null, "summary_public_locked": false, "summary_public_filled_by": 0, "summary_public_unlocked_by": 0, "summary_public_filled_at": null, "status": "scheduled", "date": "2027-01-04 16:00:00", "attendance": 0, "created": "2026-11-21 15:32:31", "updated": "2026-11-21 15:32:31", "trainer_rate_type_id": 0, "trainer_payout_percentage": 1, "__calc__attendance__going": 0, "__calc__attendance__canceled": 0, "__calc__attendance__waitlist": 0, "__calc__attendance__canceled_late": 0, "__calc__attendance__noshow": 0, "__calc__attendance__ignore": 0, "__calc__attendance__deleted": 0, "__calc__attendance__hold": 0, "__calc__attendance__attended": 0, "duration": 0, "__calc__event_number": 1, "__calc__event_trainer": null, "live_stream": 0, "video_expires_in": 0, "video_expiry": "event", "billable": false, "substituted": false, "original_trainer_id": 0, "cancellation_reasoning": null, "cancellation_reasoning_public": null, … (572 more lines; the full answer is in the guide at docs.zooza.online) ``` **A bare list is refused.** Send `{ "events": [ … ] }`, not `[ … ]`: **A bare list instead of { events }** ``` POST /v3/events ``` ```json [ { "time_string": 570, "course_id": 104660, "schedule_id": 1100282, "room_id": 45, "date_string": "2027-01-05", "trainer_id": 11247, "place_id": 3 } ] ``` Answer: 422 ```json { "error": "validation_failed", "message": "The request does not match the endpoint's schema.", "request_id": "00000000-0000-4000-8000-000000000027", "errors": [ { "location": "body", "path": "/", "code": "type_invalid", "message": "Must be of type object.", "expected": { "type": "object" }, "received": { "type": "array" } } ] } ``` **An incomplete item is skipped without an error.** An item missing `date_string`, `time_string`, `course_id`, `schedule_id`, `trainer_id` or `place_id` is dropped. If every item is dropped, the answer is still `200`, with an empty list. Check every item before you send, and count the sessions afterwards (step 5). **Two incomplete items: 200, nothing created** ``` POST /v3/events ``` ```json { "events": [ { "time_string": 570, "course_id": 104660, "schedule_id": 1100282, "room_id": 45, "date_string": "2027-01-12", "place_id": 3 }, { "time_string": 570, "course_id": 104660, "schedule_id": 1100282, "room_id": 45, "date_string": "2027-01-19", "trainer_id": 11247 } ] } ``` Answer: 200 ```json [] ``` ## 5. Read the term back A `200` from `POST /events` doesn't prove the sessions exist. Read the term back from Zooza, not from what you sent. **The class:** [`GET /v3/schedules/{ID}`](/api/reference#tag/classes/GET/schedules/{ID}). Now that it has sessions, `start`, `end` and `time` are real. Only this read (not the class list) also has `trainer`, the instructor as a user, and `billing`, which billing profile and bank account the class invoices with. The billing period is again in `billing_periods_schedules`. **Read the class back** ``` GET /v3/schedules/1100404 ``` Answer: 200 ```json { "id": 1100404, "course_id": 104771, "time": 960, "duration": 50, "place_id": 16, "room_id": 1, "trainer_id": 645, "registrations_cap": 0, "capacity": 10, "extra_capacity": 0, "total_events": 6, "type": "weekly", "name": "Monday 16:00", "start": "2027-01-04", "end": "2027-02-08", "extra_capacity_usage": "add", "status": "active", "public": true, "online_registration": false, "price": 0, "registration_fee": 0, "note": null, "notify_trainer_on_cancellation": "never", "__calc__total_avg_nps_score": 0, "__calc__total_requests": 0, "__calc__registered": 0, "__calc__waitlist": 0, "__calc__late": 0, "trainer_rate_type_id": 0, "billable_events": 0, "__calc__events__elapsed": 0, "__calc__events__total": 6, "__calc__events__total_custom_replacements": 0, "__calc__events__total_billable": 0, "__calc__events__elapsed_billable": 0, "__calc__events__total_scheduled": 6, "__calc__events__total_unplanned": 0, "__calc__events__total_nonbillable": 6, "__courses__billable_events": 0, "__calc__possible_income": 0, "__calc__booked_income": 0, "__calc__debt_issued": 0, "__calc__debt_paid": 0, "__calc__debt_balance": 0, "__calc__debt_updated": null, "__calc__nps_promoters": 0, "__calc__nps_detractors": 0, "__calc__nps": 0, "unit_price": 0, "__calc__price": 90, "__courses__unit_price": 0, "__courses__price": 90, "__courses__registration_fee": 0, "__courses__price_type": "course_fee", "__courses__registration_type": "full2", "__calc__unit_price": 15, "__calc__registration_fee": 0, "__calc__current_price": 90, "__calc__min_age": 0, … (469 more lines; the full answer is in the guide at docs.zooza.online) ``` **The sessions:** [`GET /v3/events`](/api/reference#tag/sessions/GET/events) with `filter=filter&schedule_id=`. Send `filter=filter`: without it, the list ignores `schedule_id`. One page holds up to 1000 sessions, more than one term needs. **Read the class's sessions** ``` GET /v3/events?filter=filter&schedule_id=1100404 ``` Answer: 200 ```json { "total": 6, "page": 0, "page_size": 1000, "settings": { "schedule_id": 1100404 }, "data": [ { "id": 9170719, "company_id": 1, "course_id": 104771, "schedule_id": 1100404, "trainer_id": 645, "place_id": 16, "room_id": 1, "name": null, "is_custom_replacement_event": false, "summary": null, "summary_public": null, "summary_filled_by": 0, "summary_filled_at": null, "summary_public_locked": false, "summary_public_filled_by": 0, "summary_public_unlocked_by": 0, "summary_public_filled_at": null, "status": "scheduled", "date": "2027-01-04 16:00:00", "attendance": 0, "created": "2026-11-21 15:32:31", "updated": "2026-11-21 15:32:31", "trainer_rate_type_id": 0, "trainer_payout_percentage": 1, "__calc__attendance__going": 0, "__calc__attendance__canceled": 0, "__calc__attendance__waitlist": 0, "__calc__attendance__canceled_late": 0, "__calc__attendance__noshow": 0, "__calc__attendance__ignore": 0, "__calc__attendance__deleted": 0, "__calc__attendance__hold": 0, "__calc__attendance__attended": 0, "duration": 0, "__calc__event_number": 1, "__calc__event_trainer": null, "live_stream": 0, "video_expires_in": 0, "video_expiry": "event", "billable": false, "substituted": false, "original_trainer_id": 0, "cancellation_reasoning": null, "cancellation_reasoning_public": null, "canceled_by": 0, "canceled_at": null, "replaced_by": 0, "replacement_for": 0, "__schedule_segments__id": null, "__schedule_segments__name": null, "__calc__event_place": "Riverside Centre - Studio 1, Old Town, Example City", … (1339 more lines; the full answer is in the guide at docs.zooza.online) ``` **Compare the number of sessions with the number you sent.** - **Fewer:** items were skipped (step 4). Show the dates, so the user sees which weeks are missing. - **More:** the sessions were sent twice. `POST /events` doesn't check for duplicates, so the same request sent again creates every session again: **Sent twice: every date has two sessions** ``` GET /v3/events?filter=filter&schedule_id=1100402 ``` Answer: 200 ```json { "total": 20, "page": 0, "page_size": 1000, "settings": { "schedule_id": 1100402 }, "data": [ { "id": 9170695, "company_id": 1, "course_id": 104769, "schedule_id": 1100402, "trainer_id": 11247, "place_id": 16, "room_id": 1, "name": null, "is_custom_replacement_event": false, "summary": null, "summary_public": null, "summary_filled_by": 0, "summary_filled_at": null, "summary_public_locked": false, "summary_public_filled_by": 0, "summary_public_unlocked_by": 0, "summary_public_filled_at": null, "status": "scheduled", "date": "2027-03-02 09:30:00", "attendance": 0, "created": "2026-11-21 14:53:58", "updated": "2026-11-21 14:53:59", "trainer_rate_type_id": 0, "trainer_payout_percentage": 1, "__calc__attendance__going": 0, "__calc__attendance__canceled": 0, "__calc__attendance__waitlist": 0, "__calc__attendance__canceled_late": 0, "__calc__attendance__noshow": 0, "__calc__attendance__ignore": 0, "__calc__attendance__deleted": 0, "__calc__attendance__hold": 0, "__calc__attendance__attended": 0, "duration": 0, "__calc__event_number": 1, "__calc__event_trainer": null, "live_stream": 0, "video_expires_in": 0, "video_expiry": "event", "billable": false, "substituted": false, "original_trainer_id": 0, "cancellation_reasoning": null, "cancellation_reasoning_public": null, "canceled_by": 0, "canceled_at": null, "replaced_by": 0, "replacement_for": 0, "__schedule_segments__id": null, "__schedule_segments__name": null, "__calc__event_place": "Riverside Centre - Studio 1, Old Town, Example City", … (1339 more lines; the full answer is in the guide at docs.zooza.online) ``` To show the programme's name with the class, read it with [`GET /v3/courses/{ID}`](/api/reference#tag/programmes/GET/courses/{ID}). ## 6. When a write fails There is no delete, so a failure half-way mustn't mean starting again. The programme, and maybe the class, already exist. **Keep every id you've made**, and on a retry skip the writes that already have one. Before you send the sessions for a class made earlier, read its sessions (step 5): if it has any, the term is done and you send nothing. That's what prevents duplicates. **Read the status before you retry:** - **`400` or `422`:** Zooza refused the request and created nothing. Fix the value and send again. - **Anything else** (a `5xx`, a timeout, no answer): something may have been created. Check before you send again, or a blind retry can make a second class or a second set of sessions. **The two error shapes.** A `422` means the body doesn't match the operation's schema. The body is the standard [error object](../errors.md), and `errors` lists every problem at once, each with a `path` into your body: **422: two fields of the wrong type** ``` POST /v3/schedules ``` ```json { "course_id": 104660, "name": "Wrong types", "room_id": "45", "place_id": 3, "trainer_id": 11247, "capacity": -1, "all_day": "no", "online_registration": false, "time": 570, "duration": 45, "billing_period_id": 324 } ``` Answer: 422 ```json { "error": "validation_failed", "message": "The request does not match the endpoint's schema.", "request_id": "00000000-0000-4000-8000-000000000034", "errors": [ { "location": "body", "path": "/room_id", "code": "type_invalid", "message": "Must be of type integer.", "expected": { "type": "integer" }, "received": { "type": "string", "value": "45" } }, { "location": "body", "path": "/all_day", "code": "type_invalid", "message": "Must be of type boolean.", "expected": { "type": "boolean" }, "received": { "type": "string", "value": "no" } } ] } ``` A `400` means the body was valid but Zooza refused it, for example an id that doesn't exist. The body is `{ "errors": [{ "": "" }], "request_valid": false }`: - the message is in the company's language, so **branch on the four-digit code**, not the text; - there's no `request_id` in this body, so take it from the `X-Request-Id` header when you report a problem. **400 0065: a programme that doesn't exist** ``` POST /v3/schedules ``` ```json { "course_id": 999999999, "name": "Resume class", "place_id": 16, "room_id": 1, "trainer_id": 11247, "billing_period_id": 310, "capacity": 5, "all_day": false, "online_registration": false, "time": 600, "duration": 60 } ``` Answer: 400 ```json { "errors": [ { "0065": "Resource not found - Course" } ], "request_valid": false } ``` Required fields aren't all checked by the schema. A class without `room_id` gets a `400` `0068` ("insert failed"), which doesn't name the field: **400 0068: no room_id** ``` POST /v3/schedules ``` ```json { "course_id": 104660, "name": "No room", "trainer_id": 11247, "capacity": 10, "all_day": false, "online_registration": false, "time": 570, "duration": 45, "billing_period_id": 324, "place_id": 3 } ``` Answer: 400 ```json { "errors": [ { "0068": "Insert failed" } ], "request_valid": false } ``` ## Things Zooza accepts that you should check yourself These answer `200` and create something you can't delete: - **An empty programme name.** Check `name` before you send. - **A `billing_period_id` or `room_id` that doesn't exist.** The class is stored pointing at nothing. Offer only the ids from step 1. The schema doesn't refuse a negative `capacity` either, so check that it's at least 1. **A billing period that doesn't exist: 200** ``` POST /v3/schedules ``` ```json { "course_id": 104660, "name": "Retry demo", "room_id": 45, "place_id": 3, "trainer_id": 11247, "capacity": 12, "all_day": false, "online_registration": true, "time": 570, "duration": 45, "billing_period_id": 999999 } ``` Answer: 200 ```json { "id": 1100283, "course_id": 104660, "time": 0, "duration": 45, "place_id": 3, "room_id": 45, "trainer_id": 11247, "registrations_cap": 0, "capacity": 12, "extra_capacity": 0, "total_events": 0, "type": "weekly", "name": "Retry demo", "start": "0000-00-00", "end": "0000-00-00", "extra_capacity_usage": "add", "status": "active", "public": true, "online_registration": true, "price": 0, "registration_fee": 0, "note": null, "notify_trainer_on_cancellation": "never", "__calc__total_avg_nps_score": 0, "__calc__total_requests": 0, "__calc__registered": 0, "__calc__waitlist": 0, "__calc__late": 0, "trainer_rate_type_id": 0, "billable_events": 0, "__calc__events__elapsed": 0, "__calc__events__total": 0, "__calc__events__total_custom_replacements": 0, "__calc__events__total_billable": 0, "__calc__events__elapsed_billable": 0, "__calc__events__total_scheduled": 0, "__calc__events__total_unplanned": 0, "__calc__events__total_nonbillable": 0, "__courses__billable_events": 0, "__calc__possible_income": 0, "__calc__booked_income": 0, "__calc__debt_issued": 0, "__calc__debt_paid": 0, "__calc__debt_balance": 0, "__calc__debt_updated": null, "__calc__nps_promoters": 0, "__calc__nps_detractors": 0, "__calc__nps": 0, "unit_price": 0, "__calc__price": 120, "__courses__unit_price": 0, "__courses__price": 120, "__courses__registration_fee": 0, "__courses__price_type": "course_fee", "__courses__registration_type": "full2", "__calc__unit_price": 120, "__calc__registration_fee": 0, "__calc__current_price": 120, "__calc__min_age": 0, … (44 more lines; the full answer is in the guide at docs.zooza.online) ``` **An empty programme name: 200** ``` POST /v3/courses ``` ```json { "name": "", "public": false, "online_registration": false, "registration_type": "full2", "course_type": "course", "price": 120 } ``` Answer: 200 ```json { "id": 104659, "company_id": 1, "created": "2026-11-20 22:05:08", "name": "", "url": "", "price": 120, "registration_fee": 0, "cash": true, "direct_debit": false, "direct_debit_provider": "go_cardless", "online_card": true, "online_transfer": false, "fees_included_in_price": true, "public": false, "archive": false, "online_registration": false, "on_behalf": false, "feedback_during_course": true, "feedback_after_course": true, "get_extra_fields_from": "all", "get_basic_fields_from": "registrant", "registration_type": "full2", "course_type": "course", "registration_slots_min": 1, "registration_slots_max": 5, "registration_open": 0, "show_on_site": 0, "hide_if_full": false, "allow_replacements": false, "allow_custom_replacements": false, "auto_approve_custom_replacements": false, "allow_cancel_until": 0, "allow_replacements_waitlist": false, "waitlist": "", "auto_waitlist_notification": false, "description": null, "use_extra_fields": false, "for_children": false, "replacements_limit": 2, "replacements_settings": [], "theme": null, "custom_email": 0, "custom_email_event_notification": 0, "event_notification": true, "late_registrations": "auto_approve", "allow_registration_after_end": false, "custom_label_note": null, "hide_before": 0, "collect_feedback_start": null, "iban": null, "swift": null, "custom_label_first_name": null, "custom_label_last_name": null, "custom_label_phone": null, "custom_label_email": null, "upcoming_events_notification": false, "__calc__fee_cash": 12, "__calc__fee_online_card": 8.28, "__calc__fee_direct_debit": 0, … (278 more lines; the full answer is in the guide at docs.zooza.online) ``` --- # Introduction to widgets **Zooza widgets are the primary way your customers interact with your services online. Seamless integration ensures a smooth experience for both you and your clients. Widgets can be added easily using a WordPress plugin, a Wix plugin, or by pasting a snippet of JavaScript code into your website.** However, this is just the beginning — Zooza offers unparalleled customization for both the appearance and behavior of each widget, giving your business a unique edge. :::tip See it in practice - [All integration examples](/examples) ::: ## Installation You can integrate Zooza widgets using one of our official plugins for WordPress or Wix for quick and simple setup, or you can embed them manually. But before you install any widget on your website, consider how you want to use it. This mainly concerns the booking process. Other aspects of the integration are typically very straightforward. ### Minimum system requirements - Your content management system needs to either be able to install our plugins (Wix, WordPress), or you need to be able to insert plain unfiltered JavaScript into your pages. Most modern systems allow this, but be sure to consult this with your system of choice. - If you can't use JavaScript, you need to have admin rights to be able to install our plugins. - Other than that, you're good to go as long as your website is served via HTTPS. ### Cookies & LocalStorage Zooza is considered a necessary cookie and as such should be added to exceptions, so that it stays active even if a user declines all cookies within the cookie consent manager. Being unable to read and write cookies will break your website's functionality — people won't be able to access their customer profile or book sessions, so it is crucial to allow Zooza to run at all times. Zooza uses these cookies: - `token` - Customer's unique token - `token-legacy` - Customer's unique token Zooza additionally stores logged-in customer's data in localStorage so that it is available for website developers to display to the customer if required: - `zooza_user` - Contains information about the logged-in user: `id`, `first_name`, `last_name`, `email`, `phone`, `avatar` ### Customer journey scenarios How your customers navigate to a booking: **Via map** — Your main focal point is a map, where customers search for an address first. From there, they select their class and proceed directly to booking. **Via calendar of activities** — You have either one central calendar or more smaller calendars based on location or activity, and from there customers discover your programs and go to bookings. **Via landing pages** — Your website is built around landing pages for each activity or location. You want to provide a booking form directly on these pages, pre-filtered so customers just fill in their information. **Via single central booking form** — You have a centralized booking form that has a listing of all available classes. Customers already know where they want to book, and you just provide them with a single point where they can quickly navigate to a class of their choosing. **All of the above** — Many websites combine these approaches to create multiple pathways to a booking based on customer preferences. ## Types of widgets **[Registration/Booking Widget](registration-widget.md)** — Allows users to register or book services directly from your website. **[Calendar Widget](calendar-widget.md)** — Displays available dates and times for your classes and sessions. **[Map Widget](map-widget.md)** — Shows your venues on a map and lists the classes nearby, ordered by travel time, so customers can find a class close to them. Replaces the [legacy v2 map](./deprecated/map-widget-v2.md). **[Profile Widget](profile-widget.md)** — Lets users view and manage their personal information and bookings. **[Video Widget](video-widget.md)** — Embeds video content related to your services. **[Checkout Widget](checkout-widget.md)** — Sells your products, including entry passes with a payment plan, and takes the buyer through payment. Replaces the [legacy v2 checkout](./deprecated/checkout-widget-v2.md). **[Contact Widget](contact-widget.md)** — Replaces your website's contact form and turns every enquiry into a contact in Zooza. ### Installation options :::warning Important Remember, you can install as many widgets as you want but there is one general rule: **Only one widget per page**. ::: #### WordPress Ideal for quick and hassle-free integration. Just search for keyword Zooza in official plugin directory. Read more about setup and configuration options. #### Wix Wix doesn't allow for embedding custom JavaScript code and generally doesn't work well with embedded widgets. Therefore using this plugin is your only way of integrating Zooza if you're on this platform. Read more. #### Manual embedding This option gives you most flexibility but is definitely targeted for more technically skilled persons although it does not necessarily require any coding. ## Customisation ### Appearance Zooza widgets are embedded directly into your website, making them look and feel like a natural part of your site. You can further customize their appearance by overriding the default CSS directly on your website. This allows you to hide elements you don't need, change the appearance of buttons, or even adjust the order of certain elements. The best way to override Zooza's default styles is to prefix your CSS selectors with anything that precedes Zooza's main `
` tag, which is prefixed with the class `.zooza`. If you wish, you can even disable each widget's default CSS entirely. **Note:** Disabling the default CSS will remove all built-in styles, so you must ensure that you also provide styles for essential utility classes such as `.hidden`. You can turn off the CSS in the Zooza app: `Publish > Widget > [Widget type] > Use CSS`. ### Behaviour Many widgets can have their behaviour configured generally in two ways: - Via app settings - By changing the initialisation parameters before the widget loads Both ways are described in more depth in the individual widget's pages. ## Advanced ### Importance of a URL Each widget's main configuration property is its URL. This is because you need to let Zooza know where on your website the widget is installed. Zooza will often point your customers between individual widgets — for example, from the Map widget to a Registration widget, or from the Profile widget to the Checkout form. Therefore it is crucial for Zooza to be informed where the **main instance** of your widget resides. Main instance is simply the most general location on your website where the registration widget resides. **Good examples:** - A page titled Registration (or Booking) - A page without any title and without any other content on it apart from the form itself - A page where user generally doesn't need to scroll to see the booking form **Not recommended:** - A page for a specific course or program - A page where there is other unrelated content and form does not appear in prominent page - A page where the widget's default display settings are overridden or customised ### Installation on multiple websites Technically speaking, all widget types form a **group** which share **same API key**. You can place as many instances of a widget on a page and those instances can use the same API key over and over again. You may even place the widgets with the same API keys on different domains however this is not recommended as per point made above about the importance of a URL. However, if you have multiple websites or your website is huge and has distinct sections, perhaps even with distinct branding, then it is appropriate to create a new group of widgets in `Publish > Create` and install each set of widgets on a different domain. This way you will be able to keep track of which registration came through which channel (domain), as it will be listed next to every registration. :::info If you are a franchise If you are a Franchise and your website includes a separate page for each individual Franchisee (and they don't have their own websites), then it is **NOT appropriate** to create a new widget group per franchisee. Each individual franchisee will have their own Zooza account thus will have their own separate widget group with a distinct API key. Learn more about how to install Zooza on a franchise managed website ::: --- # Choosing an embed method **Every Zooza widget is embedded with two pieces: a placeholder element marking where the widget renders, and the Zooza loader script. The only choice is where the loader goes.** ## The embed The placeholder names the widget type and carries your API key: ```html
``` The loader is a single script tag. Its URL carries your region host and the widget version: ```html ``` | Widget | `data-zooza-widget` | Loader version | |---|---|---| | Registration | `registration` | `v1` | | Profile | `profile` | `v1` | | Contact | `contact` | `v1` | | Checkout | `checkout` | `v1` | | Calendar | `calendar` | `v2` | | Video | `video` | `v2` | | Map | `map` | `v1` | The widget mounts inside the placeholder. ## Where to put the loader ### Body only Both pieces go in the ``, at the spot where the widget should appear: ```html
``` This is the simplest option — one copy-paste, no template changes. ### Head + body The loader goes in the page ``, the placeholder in the ``: ```html
``` The loader is requested while the browser is still parsing the page, so the widget area fills sooner. ## Which one should I use? | | Body only | Head + body | |---|---|---| | Where it goes | Placeholder and loader together in the body | Loader in ``, placeholder in `` | | Starts loading | When the browser reaches the snippet | During page parse, as early as possible | | Best for | Quickest setup, page builders that only allow body content | Pages where the widget is the main content | If the widget sits below the fold and the page is light, the difference is not worth restructuring your template for. If the widget is the main content of the page, put the loader in the head. ## Legacy script Before the placeholder embed, widgets were embedded with a single inline ` ``` | Widget | Key | |---|---| | Registration | `registration` (also for embeds that load `type=registration_new`) | | Profile | `profile` | | Contact | `contact` | | Checkout | `checkout` | | Map | `map` | Every option a v1 widget page documents, including `translations`, `lang` and `callback`, can be set this way. ### Which setting wins When an option is set in more than one place, the later one in this list wins: 1. the widget's default, or its setting in the Zooza app 2. the flat form, `window.ZOOZA.