Docs

Quickstart for humans

Discover locales, read activities and hand off to hosted checkout.

Early access. Use the API base, channel key and allowed origins supplied by Buchung before running examples. Interactive API requests are disabled here.

These steps take you from your supplied API base and channel key to a first activity list and a hosted checkout handoff. Browse the API reference, download OpenAPI, or generate a client.

Need credentials?

Request early access through your Buchung contact to receive your API base, channel key and allowed origins. See Before you start.

Use the supplied base URL

The API base is https://api.buchungapp.com/v1. Paths in these guides are relative to that base.

Keep the base path

Never prepend /v1 again. Keep the base path when joining URLs.

Discover locales and list activities

Call site.get (GET /site) to discover the operator's locale, locales (code, isDefault) and defaultLocale. Buchung-Locale is optional on reads and falls back to the operator's default; see locale selection.

# Set these from the values Buchung gave you.
: "${BUCHUNG_API_BASE:?Missing supplied API base}"
: "${BUCHUNG_CHANNEL_KEY:?Missing channel key}"
curl --fail-with-body \
  -H "X-Buchung-Channel-Key: $BUCHUNG_CHANNEL_KEY" \
  "${BUCHUNG_API_BASE%/}/site"
# Read locale/locales above, then set BUCHUNG_LOCALE to a supported code.
: "${BUCHUNG_LOCALE:?Missing supported operator locale}"
curl --fail-with-body \
  -H "X-Buchung-Channel-Key: $BUCHUNG_CHANNEL_KEY" \
  -H "Buchung-Locale: $BUCHUNG_LOCALE" \
  "${BUCHUNG_API_BASE%/}/activities?limit=10"

This JavaScript runs directly in the visitor's browser on an allowed origin. The channel key is publishable, so a server proxy is optional; see authentication.

// suppliedApiBase and channelKey come from Buchung; both may live in browser code.
// Normalize once; relative paths preserve /v1 in the base.
const apiBase = suppliedApiBase.replace(/\/+$/, '') + '/';
const siteResponse = await fetch(new URL('site', apiBase), {
  headers: { 'X-Buchung-Channel-Key': channelKey },
});
const site = await siteResponse.json();
if (!siteResponse.ok) throw new Error(site.error.message);
const supportedLocales = site.locales.map(({ code }) => code);
const supportedLocale = site.locale;
const response = await fetch(new URL('activities?limit=10', apiBase), {
  headers: {
    'X-Buchung-Channel-Key': channelKey,
    'Buchung-Locale': supportedLocale,
  },
});
const payload = await response.json();
if (!response.ok) throw new Error(payload.error.message);
for (const activity of payload.items) console.log(activity.id, activity.handle, activity.title);

Check the response

List pages return items, applied locale, nextCursor, exact totalCount, evaluatedAt, nullable collection and facets:

{
  "items": [],
  "locale": "en",
  "nextCursor": null,
  "totalCount": 0,
  "evaluatedAt": "2026-10-18T12:00:00Z",
  "collection": null,
  "facets": []
}

Filter or send a larger query

Filter with typed leaves such as availability: { startDate: { from, to } } and compose them with all, any or not. GET encodes where and facets as JSON query parameters (full URL strictly below 8 KiB). When a query outgrows a URL, POST the same decoded fields as JSON:

const response = await fetch(new URL('availabilities/query', apiBase), {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Buchung-Channel-Key': channelKey,
    'Buchung-Locale': supportedLocale,
  },
  body: JSON.stringify({
    where: { availability: { startDate: { from: '2027-01-01', to: '2027-12-31' } } },
    limit: 20,
  }),
});
const payload = await response.json();
if (!response.ok) throw new Error(payload.error.message);

The other POST forms are POST /activities/query and POST /activities/{id}/availabilities/query. They share the GET read rate limit and enforce a 16 KiB body cap. See data model and filtering.

For a configured collection, send its UUID as collectionId in either request form. A collection returns the activities it selects without exposing its selection criteria. Read facets from the response before offering filters. If the API returns 404 not_found, check the collection and booking channel. For 400 validation_failed, use the validation details to correct the query.

Choose a booking option

Retain the returned activity UUID. For a link containing a handle, resolve /activities/by-handle/{handle} first and keep its id (handles can change). Use /activities/{id}/availabilities to browse matching availabilities or /activities/{id}/booking-options for the offerable option chooser and headline priceSummary.

Hand off to hosted checkout

Call checkout.createHandoff (POST /checkout/handoff) from the browser with the channel key, a required supported Buchung-Locale, and returned SKUs with quantities:

const response = await fetch(new URL('checkout/handoff', apiBase), {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Buchung-Channel-Key': channelKey,
    'Buchung-Locale': supportedLocale,
  },
  body: JSON.stringify({ lines: [{ sku: returnedSku, quantity: 1 }] }),
});
const handoff = await response.json();
if (!response.ok) throw new Error(handoff.error.message);

Display handoff.warnings and display-only handoff.lines, then navigate unchanged:

window.location.assign(handoff.url);

The response supplies a signed URL on the operator's storefront domain, valid for 15 minutes. It reserves nothing and carries only SKUs and quantities, never prices. Always render listedTotal (never multiply listedUnitPrice to infer a total), send each SKU at most once, and show sold_out_at_handoff or a generic fallback for unknown warning codes. Hosted checkout revalidates price and availability and collects participants, options, extras and payment. See checkout handoff.

Nothing is held

Prices and per-availability capacity are live snapshots, not holds. Test checkout on your sandbox operator first; see sandbox & testing.

Next steps