> Full index: https://docs.buchungapp.com/llms.txt
> Early access. Use the API base, channel key and allowed origins supplied by Buchung before running examples.

# Storefront API

The Buchung Storefront API is available in **early access**. Request access through your Buchung contact to receive your API base URL, a publishable channel key and your allowed browser origins (see [Before you start](#before-you-start)).

## Which surface do I need? [#which-surface-do-i-need]

- [Storefront API](/docs/developers/quickstart-humans): Twelve HTTP operations for activities, availabilities, booking options, site config and checkout handoff. Uses a publishable channel key directly from the browser.
- [Storefront MCP server](/docs/developers/mcp): Guest-facing, read-only MCP endpoint at `https://<storefront-host>/mcp` so Claude or ChatGPT can query live availability and link to booking pages.
- [Management API (Advanced)](/docs/developers/management-api): Twenty-two server-side operations for reading event schedules and syncing custom definitions, values, translations and PDF documents from a backend or PIM.

## Where do I start? [#where-do-i-start]

- [How Buchung works](/docs/developers/mental-model): The mental model: engine vs. presentation, core resources, invariants and v1 scope.
- [Human quickstart](/docs/developers/quickstart-humans): Discover the operator's locales, list activities and hand off to hosted checkout.
- [Agent runbook](/docs/developers/quickstart-agents): The integration rules as plain Markdown for a coding agent.
- [Build a storefront & SDK](/docs/developers/build-storefront): Generate a TypeScript client from OpenAPI and connect your UI to hosted checkout.
- [Use cases & blueprints](/docs/developers/use-cases): Concrete patterns for expeditions, seasonal camps, rentals and scheduled drops.
- [Booking UX & component craft](/docs/developers/booking-ux): Evidence-backed UX rules and polished React/Tailwind component patterns.
- [Agent skills & prompts](/docs/developers/agent-playbooks): Fetchable Markdown playbooks and starter prompts for Lovable, Claude Code and Cursor.
- [Data model and filtering](/docs/developers/data-model): Activities and availabilities as primary resources, typed filters, facets and exact counts.
- [API reference](/docs/developers/reference): Schemas and parameters for every operation.
- [Download OpenAPI](/openapi.json): The complete OpenAPI 3.1 document.

## Before you start [#before-you-start]

Early access is provisioned per operator. Ask your Buchung contact for access.

You receive from Buchung:

- **API base address:** `https://api.buchungapp.com/v1`
- **Storefront channel key:** `bg_st_` followed by 32 lowercase hexadecimal characters. It is a publishable key that may live in browser code.
- **Allowed origins:** the browser origins configured on that booking channel (for example `https://www.example.com`, `https://*.preview.example.com` or `http://localhost:5173`).
- **Sandbox operator:** a test operator whose payments run in test mode. See [sandbox & testing](/docs/developers/sandbox).

Rules for allowed origins:

- Origins belong to the booking channel, not to a single key (at most 50 per channel).
- Specify exact origins as browsers send them in the `Origin` header: scheme, host and port, without a path.
- A wildcard is accepted only as the leftmost label (`https://*.example.com`, with at least two labels after it). It matches subdomains at any depth on the same scheme and port, not `example.com` itself (list the apex separately).
- Requests from any other browser origin return `403 forbidden_origin`. See [authentication](/docs/developers/authentication).

## Key rules for every integration [#key-rules-for-every-integration]

- Send `X-Buchung-Channel-Key` on every storefront request.
- Call `site.get` first to discover the operator's locales, currency and timezone. `Buchung-Locale` is optional on reads (omitted or unsupported values fall back to the operator default) and required on `checkout.createHandoff`. See [locales, dates & pagination](/docs/developers/pagination).
- Retain UUIDs for durable references (handles can change), keep cursors opaque, and read exact counts in their named resource unit.
- Grouping availabilities into departure or week cards is presentation only; each availability keeps its own `sku`, price and remaining capacity. Never sum `remaining` across options.
- Advertised prices and capacity are live snapshots, not holds. Hosted checkout owns final validation, capacity checks and payment confirmation.

