# Referentie

Elk endpoint van API v1.4.0, gegenereerd uit het OpenAPI-document dat de API serveert. Basis-URL: `https://www.callyndar.com/api/v1`. Authenticatie: `Authorization: Bearer <publishable key>` (behalve openapi.json). Machineleesbaar: [`/api/v1/openapi.json`](https://www.callyndar.com/api/v1/openapi.json).

## GET /venue

**Venue info and booking settings.** Name, contact details, timezone, opening hours, booking rules, privacy/terms links and the Turnstile site key.

**Antwoord 200**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `venue` | object | ja |  |
| `venue.name` | string | ja |  |
| `venue.description` | string \| null | ja |  |
| `venue.business_type` | "restaurant" \| "generic" \| "salon" \| "barber" \| "clinic" \| "carwash" | ja |  |
| `venue.booking_mode` | "party_size" \| "services" | ja | "services": pick services → staff or wash bay → time (salon, barber, clinic, carwash). "party_size": pick guests → time (restaurant). |
| `venue.address` | string \| null | ja |  |
| `venue.city` | string \| null | ja |  |
| `venue.country` | string \| null | ja |  |
| `venue.phone` | string \| null | ja |  |
| `venue.email` | string \| null | ja |  |
| `venue.website` | string \| null | ja |  |
| `venue.logo_url` | string \| null | ja | Absolute URL of the logo (or null). |
| `venue.timezone` | string | ja | IANA zone. All dates/times of the API are venue-local. |
| `venue.currency` | string | ja |  |
| `venue.default_locale` | "nl" \| "en" \| "fr" | ja | Language of the guest e-mails and the manage page. |
| `venue.opening_hours` | object[] | ja |  |
| `venue.opening_hours[].weekday` | integer | ja | 0 = Monday … 6 = Sunday. |
| `venue.opening_hours[].open` | boolean | ja |  |
| `venue.opening_hours[].periods` | object[] | ja |  |
| `venue.opening_hours[].periods[].from` | string | ja | Venue-local time, HH:MM (24h). |
| `venue.opening_hours[].periods[].until` | string | ja | Venue-local time, HH:MM (24h). |
| `venue.booking` | object | ja |  |
| `venue.booking.min_party_size` | integer | ja |  |
| `venue.booking.max_party_size` | integer | ja |  |
| `venue.booking.max_advance_days` | integer | ja |  |
| `venue.booking.holds_enabled` | boolean | ja | true: POST /holds really reserves the time (capacity_reserved). false: it returns a signed confirmation only. |
| `venue.booking.hold_seconds` | integer | ja |  |
| `venue.booking.auto_confirm` | boolean | ja |  |
| `venue.booking.auto_confirm_max_party_size` | integer \| null | ja |  |
| `venue.booking.cancellation_cutoff_hours` | integer \| null | ja |  |
| `venue.booking.allow_service_combos` | boolean | ja |  |
| `venue.booking.service_picker_mode` | "list" \| "guided" | ja |  |
| `venue.booking.phone_required` | "never" \| "always" \| "conditional" | ja |  |
| `venue.booking.phone_required_min_party_size` | integer | ja |  |
| `venue.booking.deposits_enabled` | boolean | ja | The venue can take online deposits (Stripe connected). |
| `venue.privacy_url` | string | ja | Show this link next to the booking button (GDPR notice, mandatory). |
| `venue.terms_url` | string | ja | Show this link next to the booking button (mandatory). |
| `venue.turnstile_site_key` | string \| null | ja | Callyndar Turnstile site key to render on your page when turnstile_required is true. |
| `venue.turnstile_required` | boolean | ja | The key asks for the optional Callyndar Turnstile token on bookings and deposits (off by default). |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl 'https://www.callyndar.com/api/v1/venue' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/venue', {
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 200 (voorbeeld)**

```json
{
  "venue": {
    "name": "Studio Voorbeeld",
    "description": "Hair salon in the centre of Antwerp.",
    "business_type": "salon",
    "booking_mode": "services",
    "address": "Meir 1",
    "city": "Antwerpen",
    "country": "BE",
    "phone": "+32 3 123 45 67",
    "email": "hallo@studio-voorbeeld.be",
    "website": "https://www.studio-voorbeeld.be",
    "logo_url": "https://callyndar.com/media/logos/studio-voorbeeld.png",
    "timezone": "Europe/Brussels",
    "currency": "EUR",
    "default_locale": "nl",
    "opening_hours": [
      {
        "weekday": 0,
        "open": false,
        "periods": []
      },
      {
        "weekday": 1,
        "open": true,
        "periods": [
          {
            "from": "09:00",
            "until": "18:00"
          }
        ]
      },
      {
        "weekday": 2,
        "open": true,
        "periods": [
          {
            "from": "09:00",
            "until": "12:30"
          },
          {
            "from": "13:30",
            "until": "20:00"
          }
        ]
      },
      {
        "weekday": 3,
        "open": true,
        "periods": [
          {
            "from": "09:00",
            "until": "18:00"
          }
        ]
      },
      {
        "weekday": 4,
        "open": true,
        "periods": [
          {
            "from": "09:00",
            "until": "18:00"
          }
        ]
      },
      {
        "weekday": 5,
        "open": true,
        "periods": [
          {
            "from": "09:00",
            "until": "16:00"
          }
        ]
      },
      {
        "weekday": 6,
        "open": false,
        "periods": []
      }
    ],
    "booking": {
      "min_party_size": 1,
      "max_party_size": 1,
      "max_advance_days": 60,
      "holds_enabled": true,
      "hold_seconds": 600,
      "auto_confirm": true,
      "auto_confirm_max_party_size": null,
      "cancellation_cutoff_hours": 24,
      "allow_service_combos": true,
      "service_picker_mode": "list",
      "phone_required": "always",
      "phone_required_min_party_size": 1,
      "deposits_enabled": false
    },
    "privacy_url": "https://callyndar.com/sites/studio-voorbeeld/privacy",
    "terms_url": "https://callyndar.com/sites/studio-voorbeeld/terms",
    "turnstile_site_key": null,
    "turnstile_required": false
  }
}
```

## GET /services

**Services, categories and variants.** Everything the guest can pick, with duration, price and deposit as the venue set them.

**Antwoord 200**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `currency` | string | ja |  |
| `service_picker_mode` | "list" \| "guided" | ja |  |
| `allow_service_combos` | boolean | ja |  |
| `categories` | object[] | ja |  |
| `categories[].id` | string | ja |  |
| `categories[].parent_id` | string \| null | ja |  |
| `categories[].name` | string | ja |  |
| `categories[].sort_order` | integer | ja |  |
| `categories[].image_url` | string \| null | ja |  |
| `services` | object[] | ja |  |
| `services[].id` | string | ja |  |
| `services[].name` | string | ja |  |
| `services[].description` | string \| null | ja |  |
| `services[].category_id` | string \| null | ja |  |
| `services[].duration_minutes` | integer \| null | ja | Base duration of the service. For a service with variants, show duration_min_minutes–duration_max_minutes instead. |
| `services[].price_cents` | integer \| null | ja | null when the venue hides the price. Base price; for a service with variants, show price_from_cents instead. |
| `services[].duration_min_minutes` | integer \| null | ja | Shortest variant duration, or duration_minutes for a service without variants. Show "min–max min", or one value when both are equal. |
| `services[].duration_max_minutes` | integer \| null | ja | Longest variant duration, or duration_minutes for a service without variants. |
| `services[].price_from_cents` | integer \| null | ja | Lowest variant price ("from …"), or price_cents for a service without variants. null when the venue hides the price. |
| `services[].price_note` | string \| null | ja |  |
| `services[].deposit_cents` | integer \| null | ja | Deposit of this service (null without online payments). |
| `services[].variant_mode` | "customer" \| "staff" \| null | ja | "customer": the guest picks a variant. "staff": the venue decides later (send the service id in pending_ids). |
| `services[].variant_question` | string \| null | ja |  |
| `services[].required_providers` | integer | ja | Staff members this service needs at once (1 for most services). A service with 2 or more is a multi-staff treatment: it is booked on its own (never in a combination) and the venue assigns the extra staff. |
| `services[].variants` | object[] | ja |  |
| `services[].variants[].id` | string | ja |  |
| `services[].variants[].name` | string | ja |  |
| `services[].variants[].help_text` | string \| null | ja |  |
| `services[].variants[].duration_minutes` | integer \| null | ja |  |
| `services[].variants[].price_cents` | integer \| null | ja |  |
| `services[].variants[].deposit_cents` | integer \| null | ja |  |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl 'https://www.callyndar.com/api/v1/services' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/services', {
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 200 (voorbeeld)**

```json
{
  "currency": "EUR",
  "service_picker_mode": "list",
  "allow_service_combos": true,
  "categories": [
    {
      "id": "2d7e9f1a-3c5b-4d8e-b6a1-0c2d3e4f5a6b",
      "parent_id": null,
      "name": "Haar",
      "sort_order": 0,
      "image_url": null
    }
  ],
  "services": [
    {
      "id": "5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e",
      "name": "Knippen",
      "description": "Wassen, knippen en drogen.",
      "category_id": "2d7e9f1a-3c5b-4d8e-b6a1-0c2d3e4f5a6b",
      "duration_minutes": 45,
      "price_cents": 4500,
      "duration_min_minutes": 45,
      "duration_max_minutes": 45,
      "price_from_cents": 4500,
      "price_note": null,
      "deposit_cents": null,
      "variant_mode": null,
      "variant_question": null,
      "required_providers": 1,
      "variants": []
    },
    {
      "id": "8e1d4a72-6c3b-4e9f-a2d5-7f0b1c2d3e4f",
      "name": "Kleuren",
      "description": null,
      "category_id": "2d7e9f1a-3c5b-4d8e-b6a1-0c2d3e4f5a6b",
      "duration_minutes": 90,
      "price_cents": 7500,
      "duration_min_minutes": 60,
      "duration_max_minutes": 120,
      "price_from_cents": 6500,
      "price_note": "vanaf",
      "deposit_cents": null,
      "variant_mode": "customer",
      "variant_question": "Hoe lang is je haar?",
      "required_providers": 1,
      "variants": [
        {
          "id": "b3f8d6c1-0a2e-4f5b-9d4c-8e9f0a1b2c3d",
          "name": "Kort haar",
          "help_text": null,
          "duration_minutes": 60,
          "price_cents": 6500,
          "deposit_cents": null
        },
        {
          "id": "c4a9e7d2-1b3f-4a6c-8e5d-9f0a1b2c3d4e",
          "name": "Lang haar",
          "help_text": "Voorbij de schouders",
          "duration_minutes": 120,
          "price_cents": 9500,
          "deposit_cents": null
        }
      ]
    }
  ]
}
```

## GET /providers

**Staff for a selection.** Active staff members (salon, barber, clinic) or wash bays (carwash) that can do all given services. Empty for restaurants.

**Queryparameters**

| Naam | Type | Verplicht | Uitleg |
|---|---|---|---|
| `service_ids` | string | nee | Comma-separated service ids; only staff who can do ALL of them are returned. |

**Antwoord 200**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `providers` | object[] | ja |  |
| `providers[].id` | string | ja |  |
| `providers[].name` | string | ja |  |
| `providers[].specialty` | string \| null | ja |  |
| `providers[].bio` | string \| null | ja |  |
| `providers[].avatar_url` | string \| null | ja |  |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `invalid_input` (422), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl 'https://www.callyndar.com/api/v1/providers?service_ids=5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/providers?service_ids=5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e', {
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 200 (voorbeeld)**

```json
{
  "providers": [
    {
      "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
      "name": "Lisa",
      "specialty": "Kleurspecialist",
      "bio": null,
      "avatar_url": null
    },
    {
      "id": "1f2e3d4c-5b6a-4978-8a6b-5c4d3e2f1a09",
      "name": "Tom",
      "specialty": null,
      "bio": null,
      "avatar_url": null
    }
  ]
}
```

## GET /calendar

**Open and closed days.** Per day open/closed with the reason (weekly closed, holiday, owner day block with message, beyond the booking window) and full days off of staff. Max. 92 days per request.

**Queryparameters**

| Naam | Type | Verplicht | Uitleg |
|---|---|---|---|
| `from` | string | nee | First day (default: today in the venue timezone). |
| `to` | string | nee | Last day, inclusive (default: from + 30 days, max. 92 days span). |
| `provider_id` | string | nee | Salon: also report full days off of this staff member as closed. |

**Antwoord 200**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `from` | string | ja | Venue-local date, YYYY-MM-DD. |
| `to` | string | ja | Venue-local date, YYYY-MM-DD. |
| `timezone` | string | ja |  |
| `days` | object[] | ja |  |
| `days[].date` | string | ja | Venue-local date, YYYY-MM-DD. |
| `days[].open` | boolean | ja |  |
| `days[].reason` | "past" \| "weekly_closed" \| "online_day_disabled" \| "holiday" \| "day_block" \| "beyond_max_advance" \| "provider_leave" \| "provider_not_working" \| null | ja |  |
| `days[].message` | string \| null | ja | Message of the owner for a blocked day (or a holiday label). |
| `provider_leave` | object[] | ja |  |
| `provider_leave[].provider_id` | string | ja |  |
| `provider_leave[].from` | string | ja | Venue-local date, YYYY-MM-DD. |
| `provider_leave[].to` | string | ja | Venue-local date, YYYY-MM-DD. |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `invalid_input` (422), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl 'https://www.callyndar.com/api/v1/calendar?from=2026-12-01&to=2026-12-07' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/calendar?from=2026-12-01&to=2026-12-07', {
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 200 (voorbeeld)**

```json
{
  "from": "2026-12-01",
  "to": "2026-12-07",
  "timezone": "Europe/Brussels",
  "days": [
    {
      "date": "2026-12-01",
      "open": true,
      "reason": null,
      "message": null
    },
    {
      "date": "2026-12-02",
      "open": true,
      "reason": null,
      "message": null
    },
    {
      "date": "2026-12-03",
      "open": false,
      "reason": "day_block",
      "message": "Opleiding — we zijn gesloten."
    },
    {
      "date": "2026-12-04",
      "open": true,
      "reason": null,
      "message": null
    },
    {
      "date": "2026-12-05",
      "open": true,
      "reason": null,
      "message": null
    },
    {
      "date": "2026-12-06",
      "open": false,
      "reason": "weekly_closed",
      "message": null
    },
    {
      "date": "2026-12-07",
      "open": false,
      "reason": "weekly_closed",
      "message": null
    }
  ],
  "provider_leave": [
    {
      "provider_id": "1f2e3d4c-5b6a-4978-8a6b-5c4d3e2f1a09",
      "from": "2026-12-04",
      "to": "2026-12-05"
    }
  ]
}
```

## GET /availability

**Free times on one day.** The same slots as the Callyndar booking widget, for this party size / selection / staff member.

**Queryparameters**

| Naam | Type | Verplicht | Uitleg |
|---|---|---|---|
| `date` | string | ja | Venue-local date, YYYY-MM-DD. |
| `party_size` | integer | nee | Number of guests (restaurants) — 1 for an appointment. (standaard: `1`) |
| `service_ids` | string | nee | Comma-separated service ids (provider sectors: required to size the appointment). |
| `variant_ids` | string | nee | Comma-separated variant ids aligned with service_ids; leave an entry empty ("a,,b") for a service without a variant. |
| `pending_ids` | string | nee | Comma-separated service ids whose variant the venue decides (variant_mode "staff"). |
| `provider_id` | string | nee | A specific staff member; omit for "no preference". |

**Antwoord 200**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `date` | string | ja | Venue-local date, YYYY-MM-DD. |
| `duration_minutes` | integer \| null | ja | Length of the appointment the slots are measured with. |
| `required_providers` | integer | ja | Staff members the chosen treatment needs at once (1 unless it is a multi-staff treatment). |
| `slots` | object[] | ja |  |
| `slots[].time` | string | ja | Venue-local time, HH:MM (24h). |
| `slots[].end_time` | string | ja | Venue-local time, HH:MM (24h). |
| `slots[].next_day` | boolean | ja | true for an after-midnight slot of a late opening window. |
| `slots[].available` | integer | ja | Free places (restaurant) or free staff members (salon) at this time; for a multi-staff treatment, how many such appointments still fit. Always 1 when the venue hides the remaining-seats count. |
| `slots[].provider_ids` | string[] | ja | Salon: staff free at this time (empty for restaurants, and empty when the venue hides the remaining-seats count). |
| `reason` | "past_date" \| "same_day_disabled" \| "same_day_closed" \| "party_size" \| "online_booking_closed_day" \| "online_booking_hours" \| "closed_day" \| "blocked_date" \| "day_block" \| "holiday" \| "beyond_max_advance" \| "not_enough_staff" \| null | ja | Why the day has no slots (null when it has some, or simply is full). |
| `reason_params` | object (map) \| null | ja |  |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `invalid_input` (422), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl 'https://www.callyndar.com/api/v1/availability?date=2026-12-04&service_ids=5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e&provider_id=9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/availability?date=2026-12-04&service_ids=5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e&provider_id=9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d', {
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 200 (voorbeeld)**

```json
{
  "date": "2026-12-04",
  "duration_minutes": 45,
  "required_providers": 1,
  "slots": [
    {
      "time": "09:00",
      "end_time": "09:45",
      "next_day": false,
      "available": 1,
      "provider_ids": [
        "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
      ]
    },
    {
      "time": "09:15",
      "end_time": "10:00",
      "next_day": false,
      "available": 1,
      "provider_ids": [
        "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
      ]
    },
    {
      "time": "14:30",
      "end_time": "15:15",
      "next_day": false,
      "available": 1,
      "provider_ids": [
        "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
      ]
    }
  ],
  "reason": null,
  "reason_params": null
}
```

## GET /deposit-policy

**Is a deposit due?.** Whether this selection needs an online deposit and how much.

**Queryparameters**

| Naam | Type | Verplicht | Uitleg |
|---|---|---|---|
| `party_size` | integer | nee | Number of guests (restaurants) — 1 for an appointment. (standaard: `1`) |
| `service_ids` | string | nee | Comma-separated service ids. |
| `variant_ids` | string | nee | Comma-separated variant ids aligned with service_ids. |
| `pending_ids` | string | nee | Comma-separated pending service ids. |

**Antwoord 200**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `required` | boolean | ja |  |
| `amount_cents` | integer | ja |  |
| `currency` | string | ja |  |
| `refund_window_hours` | integer | ja |  |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `invalid_input` (422), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl 'https://www.callyndar.com/api/v1/deposit-policy?service_ids=5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/deposit-policy?service_ids=5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e', {
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 200 (voorbeeld)**

```json
{
  "required": true,
  "amount_cents": 1500,
  "currency": "EUR",
  "refund_window_hours": 24
}
```

## POST /holds

**Hold a time.** Re-checks the time with every rule and holds it (capacity_reserved: true) or returns a signed confirmation (false) for venues without holds.

**Body (JSON)**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `date` | string | ja | Venue-local date, YYYY-MM-DD. |
| `time` | string | ja | Venue-local time, HH:MM (24h). |
| `party_size` | integer | nee | Number of guests (restaurants) — 1 for an appointment. (standaard: `1`) |
| `service_ids` | string[] | nee | Chosen services, in the order the guest picked them. |
| `variant_ids` | (string \| null)[] | nee | Chosen variant per service_ids entry (same index), null when that service has no variant choice. |
| `pending_ids` | string[] | nee | Services with variant_mode "staff" whose variant the venue decides later. |
| `provider_id` | string \| null | nee | A specific staff member; omit or null for "no preference". |
| `session_id` | string | ja | One random id per visitor/browser tab (e.g. crypto.randomUUID()). A new hold of the same session replaces the previous one. |

**Antwoord 201**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `hold_id` | string | ja | Pass to POST /bookings. A UUID (real hold) or "nh_…" (signed confirmation). |
| `expires_at` | string | ja | ISO timestamp; show a countdown and ask a new hold after it. |
| `capacity_reserved` | boolean | ja | true: the time is really held for you until expires_at. false: it was free when checked but is not held. |
| `date` | string | ja | Venue-local date, YYYY-MM-DD. |
| `time` | string | ja | Venue-local time, HH:MM (24h). |
| `end_time` | string | ja | Venue-local time, HH:MM (24h). |
| `duration_minutes` | integer | ja |  |
| `party_size` | integer | ja |  |
| `provider_id` | string \| null | ja |  |
| `extra_provider_ids` | string[] | ja | Additional staff a multi-staff treatment reserved (empty otherwise). |
| `deposit` | object | ja |  |
| `deposit.required` | boolean | ja |  |
| `deposit.amount_cents` | integer | ja |  |
| `deposit.currency` | string | ja |  |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `slot_unavailable` (409), `invalid_input` (422), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl -X POST 'https://www.callyndar.com/api/v1/holds' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL' \
  -H 'Content-Type: application/json' \
  -d '{
  "date": "2026-12-04",
  "time": "14:30",
  "party_size": 1,
  "service_ids": [
    "5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e"
  ],
  "provider_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "session_id": "c1d7c0f0-4f7e-4c55-8f0a-6f8c2b7d9e01"
}'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/holds', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "date": "2026-12-04",
    "time": "14:30",
    "party_size": 1,
    "service_ids": [
      "5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e"
    ],
    "provider_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "session_id": "c1d7c0f0-4f7e-4c55-8f0a-6f8c2b7d9e01"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 201 (voorbeeld)**

```json
{
  "hold_id": "3f0c2a5e-8b1d-4c7e-9a40-2d6f1e9b7c11",
  "expires_at": "2026-12-01T13:40:00.000Z",
  "capacity_reserved": true,
  "date": "2026-12-04",
  "time": "14:30",
  "end_time": "15:15",
  "duration_minutes": 45,
  "party_size": 1,
  "provider_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "extra_provider_ids": [],
  "deposit": {
    "required": false,
    "amount_cents": 0,
    "currency": "EUR"
  }
}
```

## DELETE /holds/{id}

**Release a hold.** Gives the time back (guest goes back or closes the flow). Idempotent.

**Padparameters**

| Naam | Type | Verplicht | Uitleg |
|---|---|---|---|
| `id` | string | ja | hold_id from POST /holds |

**Antwoord 200**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `released` | boolean | ja |  |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `not_found` (404), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl -X DELETE 'https://www.callyndar.com/api/v1/holds/3f0c2a5e-8b1d-4c7e-9a40-2d6f1e9b7c11' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/holds/3f0c2a5e-8b1d-4c7e-9a40-2d6f1e9b7c11', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 200 (voorbeeld)**

```json
{
  "released": true
}
```

## POST /holds/{id}/deposit

**Start the deposit payment.** Creates the Stripe PaymentIntent on the venue's account for this hold. Mount the Payment Element with client_secret and stripe_account.

Stuur turnstile_token alleen mee als de sleutel de optionele Turnstile van Callyndar aan heeft (GET /venue → turnstile_required, standaard uit).

**Padparameters**

| Naam | Type | Verplicht | Uitleg |
|---|---|---|---|
| `id` | string | ja | hold_id from POST /holds |

**Body (JSON)**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `guest` | object | ja |  |
| `guest.first_name` | string | ja |  |
| `guest.last_name` | string | ja |  |
| `guest.email` | string (email) | ja |  |
| `guest.phone` | string | nee | Required when the venue asks for it (GET /venue → booking.phone_required). |
| `company` | object | nee | Optional: the guest books for a company. Leave out for a private booking. |
| `company.name` | string | ja | Company name the invoice should be made out to. |
| `company.vat_number` | string | nee | EU VAT number with country prefix (spaces and dots allowed). Checked against VIES after the booking; an unreachable VIES never refuses the booking. |
| `company.reference` | string | nee | Purchase order or reference for the invoice. |
| `notes` | string | nee |  |
| `locale` | "nl" \| "en" \| "fr" | nee | Language of the guest e-mails and the manage page. |
| `turnstile_token` | string | nee | Cloudflare Turnstile token — only when the key has the optional Callyndar Turnstile switched on (GET /venue → turnstile_required; off by default). Protecting your form against bots is your own job (your own captcha or Turnstile). |

**Antwoord 201**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `payment_intent_id` | string | ja |  |
| `client_secret` | string | ja | For stripe.elements({ clientSecret }) — never store it. |
| `amount_cents` | integer | ja |  |
| `currency` | string | ja |  |
| `stripe_publishable_key` | string | ja |  |
| `stripe_account` | string | ja | Connected account: Stripe(stripe_publishable_key, { stripeAccount }). |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `turnstile_failed` (403), `not_found` (404), `hold_expired` (409), `slot_unavailable` (409), `invalid_input` (422), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl -X POST 'https://www.callyndar.com/api/v1/holds/3f0c2a5e-8b1d-4c7e-9a40-2d6f1e9b7c11/deposit' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL' \
  -H 'Content-Type: application/json' \
  -d '{
  "guest": {
    "first_name": "Test",
    "last_name": "Gast",
    "email": "test.gast@example.com",
    "phone": "+32 470 12 34 56"
  },
  "locale": "nl"
}'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/holds/3f0c2a5e-8b1d-4c7e-9a40-2d6f1e9b7c11/deposit', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "guest": {
      "first_name": "Test",
      "last_name": "Gast",
      "email": "test.gast@example.com",
      "phone": "+32 470 12 34 56"
    },
    "locale": "nl"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 201 (voorbeeld)**

```json
{
  "payment_intent_id": "pi_3QxTESTa1b2c3d4e5f6g7h8",
  "client_secret": "pi_3QxTESTa1b2c3d4e5f6g7h8_secret_TESTabc123",
  "amount_cents": 1500,
  "currency": "EUR",
  "stripe_publishable_key": "pk_live_TESTexamplekey",
  "stripe_account": "acct_1TESTexample"
}
```

## POST /bookings

**Book.** Turns the hold into a booking with the guest details. Requires an Idempotency-Key per booking attempt.

Stuur turnstile_token alleen mee als de sleutel de optionele Turnstile van Callyndar aan heeft (GET /venue → turnstile_required, standaard uit).

Gebruik per boekpoging een nieuwe Idempotency-Key; dezelfde key + body geeft het eerste antwoord opnieuw.

**Headers**

| Naam | Type | Verplicht | Uitleg |
|---|---|---|---|
| `Idempotency-Key` | string | ja | A new random value per booking attempt (8–128 chars). Retrying with the same key and body returns the first answer. |

**Body (JSON)**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `hold_id` | string | ja | hold_id from POST /holds (a UUID, or an "nh_…" slot confirmation). |
| `guest` | object | ja |  |
| `guest.first_name` | string | ja |  |
| `guest.last_name` | string | ja |  |
| `guest.email` | string (email) | ja |  |
| `guest.phone` | string | nee | Required when the venue asks for it (GET /venue → booking.phone_required). |
| `company` | object | nee | Optional: the guest books for a company. Leave out for a private booking. |
| `company.name` | string | ja | Company name the invoice should be made out to. |
| `company.vat_number` | string | nee | EU VAT number with country prefix (spaces and dots allowed). Checked against VIES after the booking; an unreachable VIES never refuses the booking. |
| `company.reference` | string | nee | Purchase order or reference for the invoice. |
| `notes` | string | nee | Remarks of the guest (allergies, wishes). |
| `locale` | "nl" \| "en" \| "fr" | nee | Language of the guest e-mails and the manage page. |
| `payment_intent_id` | string | nee | The PaymentIntent of a paid deposit (POST /holds/{id}/deposit). |
| `turnstile_token` | string | nee | Cloudflare Turnstile token — only when the key has the optional Callyndar Turnstile switched on (GET /venue → turnstile_required; off by default). Protecting your form against bots is your own job (your own captcha or Turnstile). |

**Antwoord 201**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `booking` | object | ja |  |
| `booking.id` | string | ja |  |
| `booking.status` | "confirmed" \| "pending" \| "waitlisted" | ja | confirmed = booked; pending = the venue confirms it; waitlisted = full, on the waiting list. |
| `booking.date` | string | ja | Venue-local date, YYYY-MM-DD. |
| `booking.time` | string | ja | Venue-local time, HH:MM (24h). |
| `booking.end_time` | string | ja | Venue-local time, HH:MM (24h). |
| `booking.party_size` | integer | ja |  |
| `booking.provider_id` | string \| null | ja |  |
| `booking.extra_provider_ids` | string[] | ja |  |
| `booking.services` | object[] | ja |  |
| `booking.services[].id` | string | ja |  |
| `booking.services[].name` | string | ja |  |
| `booking.services[].variant_id` | string \| null | ja |  |
| `booking.services[].variant_name` | string \| null | ja |  |
| `booking.services[].duration_minutes` | integer \| null | ja |  |
| `booking.services[].price_cents` | integer \| null | ja |  |
| `booking.deposit_paid` | boolean | ja |  |
| `booking.company` | object \| null | ja | The company block sent with the booking, or null. |
| `booking.company.name` | string | ja |  |
| `booking.company.vat_number` | string \| null | ja | Normalised (BE0123456749). |
| `booking.company.reference` | string \| null | ja |  |
| `booking.manage_url` | string | ja | Page where the guest cancels or reschedules (also in the confirmation e-mail). |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `turnstile_failed` (403), `not_found` (404), `hold_expired` (409), `slot_unavailable` (409), `deposit_required` (409), `idempotency_conflict` (409), `payload_too_large` (413), `invalid_input` (422), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl -X POST 'https://www.callyndar.com/api/v1/bookings' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: 6f1c9a52-0d3e-4b8a-9c71-2e5d4f3a1b90' \
  -d '{
  "hold_id": "3f0c2a5e-8b1d-4c7e-9a40-2d6f1e9b7c11",
  "guest": {
    "first_name": "Test",
    "last_name": "Gast",
    "email": "test.gast@example.com",
    "phone": "+32 470 12 34 56"
  },
  "notes": "Graag een stille plek.",
  "locale": "nl",
  "company": {
    "name": "TEST Studio BV",
    "vat_number": "BE 0123.456.749",
    "reference": "PO-2026-118"
  }
}'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/bookings', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    "hold_id": "3f0c2a5e-8b1d-4c7e-9a40-2d6f1e9b7c11",
    "guest": {
      "first_name": "Test",
      "last_name": "Gast",
      "email": "test.gast@example.com",
      "phone": "+32 470 12 34 56"
    },
    "notes": "Graag een stille plek.",
    "locale": "nl",
    "company": {
      "name": "TEST Studio BV",
      "vat_number": "BE 0123.456.749",
      "reference": "PO-2026-118"
    }
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 201 (voorbeeld)**

```json
{
  "booking": {
    "id": "7c1e5a9d-3b2f-4e8a-9d6c-0b1a2c3d4e5f",
    "status": "confirmed",
    "date": "2026-12-04",
    "time": "14:30",
    "end_time": "15:15",
    "party_size": 1,
    "provider_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "extra_provider_ids": [],
    "services": [
      {
        "id": "5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e",
        "name": "Knippen",
        "variant_id": null,
        "variant_name": null,
        "duration_minutes": 45,
        "price_cents": 4500
      }
    ],
    "deposit_paid": false,
    "company": {
      "name": "TEST Studio BV",
      "vat_number": "BE0123456749",
      "reference": "PO-2026-118"
    },
    "manage_url": "https://callyndar.com/r/7c1e5a9d-3b2f-4e8a-9d6c-0b1a2c3d4e5f"
  }
}
```

## POST /bookings/recover

**Finish a booking after a payment redirect.** After iDEAL/Bancontact the guest comes back to your return_url. Call this with the payment_intent from the URL to finish (or fetch) the booking. Only works for payments started with this key.

**Body (JSON)**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `payment_intent_id` | string | ja |  |

**Antwoord 200**

| Veld | Type | Verplicht | Uitleg |
|---|---|---|---|
| `booking` | object | ja |  |
| `booking.id` | string | ja |  |
| `booking.status` | "confirmed" \| "pending" \| "waitlisted" | ja | confirmed = booked; pending = the venue confirms it; waitlisted = full, on the waiting list. |
| `booking.date` | string | ja | Venue-local date, YYYY-MM-DD. |
| `booking.time` | string | ja | Venue-local time, HH:MM (24h). |
| `booking.end_time` | string | ja | Venue-local time, HH:MM (24h). |
| `booking.party_size` | integer | ja |  |
| `booking.provider_id` | string \| null | ja |  |
| `booking.extra_provider_ids` | string[] | ja |  |
| `booking.services` | object[] | ja |  |
| `booking.services[].id` | string | ja |  |
| `booking.services[].name` | string | ja |  |
| `booking.services[].variant_id` | string \| null | ja |  |
| `booking.services[].variant_name` | string \| null | ja |  |
| `booking.services[].duration_minutes` | integer \| null | ja |  |
| `booking.services[].price_cents` | integer \| null | ja |  |
| `booking.deposit_paid` | boolean | ja |  |
| `booking.company` | object \| null | ja | The company block sent with the booking, or null. |
| `booking.company.name` | string | ja |  |
| `booking.company.vat_number` | string \| null | ja | Normalised (BE0123456749). |
| `booking.company.reference` | string \| null | ja |  |
| `booking.manage_url` | string | ja | Page where the guest cancels or reschedules (also in the confirmation e-mail). |

**Fouten:** `unauthorized` (401), `forbidden_origin` (403), `not_enabled` (403), `not_found` (404), `deposit_required` (409), `slot_unavailable` (409), `hold_expired` (409), `invalid_input` (422), `rate_limited` (429), `server_error` (500) — Wat je site bij elke code doet staat in [Fouten en limieten](/developers/fouten-en-limieten).

**Voorbeeld**

```bash
curl -X POST 'https://www.callyndar.com/api/v1/bookings/recover' \
  -H 'Authorization: Bearer cal_pk_live_JOUW_SLEUTEL' \
  -H 'Content-Type: application/json' \
  -d '{
  "payment_intent_id": "pi_3QxTESTa1b2c3d4e5f6g7h8"
}'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/bookings/recover', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer cal_pk_live_JOUW_SLEUTEL',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "payment_intent_id": "pi_3QxTESTa1b2c3d4e5f6g7h8"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

**Antwoord 200 (voorbeeld)**

```json
{
  "booking": {
    "id": "7c1e5a9d-3b2f-4e8a-9d6c-0b1a2c3d4e5f",
    "status": "confirmed",
    "date": "2026-12-04",
    "time": "14:30",
    "end_time": "15:15",
    "party_size": 1,
    "provider_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "extra_provider_ids": [],
    "services": [
      {
        "id": "5b6f0c3e-2a4d-4f1b-9c7e-1d2a3b4c5d6e",
        "name": "Knippen",
        "variant_id": null,
        "variant_name": null,
        "duration_minutes": 45,
        "price_cents": 4500
      }
    ],
    "deposit_paid": false,
    "company": {
      "name": "TEST Studio BV",
      "vat_number": "BE0123456749",
      "reference": "PO-2026-118"
    },
    "manage_url": "https://callyndar.com/r/7c1e5a9d-3b2f-4e8a-9d6c-0b1a2c3d4e5f"
  }
}
```

## GET /openapi.json

**This specification (OpenAPI 3.1).** No key needed.

**Voorbeeld**

```bash
curl 'https://www.callyndar.com/api/v1/openapi.json'
```

```js
const res = await fetch('https://www.callyndar.com/api/v1/openapi.json', {
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```