Docs

Query an activity's availabilities with a JSON body

POST form of availabilities.listForActivity for conditions/selections that outgrow a URL. Same decoded query fields, defaults, activity scope, eligibility, exact counts, locale, response schema and error vocabulary. Send where/facets as JSON values, not strings. Host caps the body at 16 KiB before parsing (413 payload_too_large), shares the GET read limiter bucket and returns Cache-Control: private, no-store. A valid activity outside the requested collection or with no matching AAs returns an empty page with totalCount 0. An unavailable collection returns 404 not_found. On every storefront read, Buchung-Locale is optional: omission or a well-formed but unsupported value applies the operator's default locale; a supported explicit value selects that exact locale, Content-Language always reports the applied locale, and Buchung-Locale-Fallback reports the requested value only when unsupported; malformed values return 400 validation_failed.

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

POST
/v1/activities/{id}/availabilities/query

POST form of availabilities.listForActivity for conditions/selections that outgrow a URL. Same decoded query fields, defaults, activity scope, eligibility, exact counts, locale, response schema and error vocabulary. Send where/facets as JSON values, not strings. Host caps the body at 16 KiB before parsing (413 payload_too_large), shares the GET read limiter bucket and returns Cache-Control: private, no-store. A valid activity outside the requested collection or with no matching AAs returns an empty page with totalCount 0. An unavailable collection returns 404 not_found. On every storefront read, Buchung-Locale is optional: omission or a well-formed but unsupported value applies the operator's default locale; a supported explicit value selects that exact locale, Content-Language always reports the applied locale, and Buchung-Locale-Fallback reports the requested value only when unsupported; malformed values return 400 validation_failed.

Authorization

channelKey
headerX-Buchung-Channel-Key<token>

Required channel key for every storefront operation, including site.get. On every storefront read, Buchung-Locale is optional: omission or a well-formed but unsupported value applies the operator's default locale; a supported explicit value selects that exact locale, Content-Language always reports the applied locale, and Buchung-Locale-Fallback reports the requested value only when unsupported; malformed values return 400 validation_failed. Only checkout.createHandoff requires a supported Buchung-Locale: absence or malformed values return 400 validation_failed, and well-formed unsupported values return 400 locale_not_supported with details naming the requested and supported locales. Start with site.get to discover the operator's locales.

Path Parameters

id*string

Stable resource UUID scoped to the authenticated operator; see Id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
Formatuuid

Header Parameters

Buchung-Locale?string

On every storefront read, Buchung-Locale is optional: omission or a well-formed but unsupported value applies the operator's default locale; a supported explicit value selects that exact locale, Content-Language always reports the applied locale, and Buchung-Locale-Fallback reports the requested value only when unsupported; malformed values return 400 validation_failed. Only checkout.createHandoff requires a supported Buchung-Locale: absence or malformed values return 400 validation_failed, and well-formed unsupported values return 400 locale_not_supported with details naming the requested and supported locales. Start with site.get to discover the operator's locales. See Language for syntax and normalization.

Match^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8}){0,3}$
Lengthlength <= 35

Request Body

application/json
  1. body

Read-only search request; no implicit collection. GET where/facets are JSON strings without per-parameter character caps; the only external GET bound is the raw request target strictly below 8 KiB, enforced before routing as 414 validation_failed. POST uses the same decoded fields in a JSON body capped at 16 KiB before parsing (413 payload_too_large). An iterative pre-walk limits depth to 6 and nodes to 64 to protect the recursive decoder and SQL compiler on an anonymous route, independently of transport byte limits. With worst-case 100-ID leaves the GET target binds first; compact leaves may reach 64 nodes first. Lists retain 100 as a client ergonomics ceiling; readers also require total slots <= 1000 and expanded binds <= 50,000 across all facet-count scenarios, including server-owned predicates. For a list repeated R times with B_other binds used by other predicates, the actual allowance is min(100, floor((50000 - B_other) / R)); expanded scenario slots must also fit 1000. Option keys are charged for the actual expansion of their configured predicates. A 1000-fold repetition leaves at most 50 values before other binds. Facet selections cannot exceed the collection's configured facets; static decoding permits up to 1000. Readers reject configured-bound/budget violations with typed invalid_query, mapped to 400 validation_failed. Field schemas bound page size and IDs and supply defaults. Unknown keys/operators and duplicate facet/option IDs return 400 validation_failed. Collection membership is counted once per query. Facets may return fewer options with optionsTruncated so a shown option can be selected with the current filters. Simplify filters or remove selections on budget errors. An unavailable collection, including one without a handle or with unusable saved criteria, returns 404 not_found. This also applies if the booking channel becomes unavailable after authentication. A cursor must match the current collection and its selection. If a cursor returns 400 validation_failed, restart without it. Structural where and facets errors return 400 validation_failed with detail paths such as body.where.activity.categories.containsAny.0 or body.facets.0.match. Unexpected properties can be reported at the enclosing object or array item. Unavailable category, event or variation references are handled like unknown ones. Refresh those values or remove the rejected filter.

where?|||||

Typed catalogue condition: a leaf or an all/any/not tree. Facet option input, GET CatalogueQuery and POST CatalogueQueryBody share maximum depth 6 and 64 condition nodes. Query decoding uses one iterative pre-walk, protecting the recursive decoder and SQL compiler on anonymous routes. The 8 KiB GET request target binds before the 64-node worst-case tree of 100-ID leaves; smaller leaves can hit the node limit first. Measured minified JSON: the largest tree within 64 nodes/depth <= 6 with 100-UUID fact leaves is 346887 bytes (63 leaves, depth 2, maximally escaped 128-character set/field keys); requiring depth exactly 6 gives 324903 bytes (59 leaves). With unescaped ASCII keys these are 266247 and 249383 bytes. These are structural decoder bounds; transport and reader budgets still apply. All occurrence conditions match the same AA. Leaves have exactly one activity, availability or fact key. Platform containers have exactly one field; leaves select exactly one operator (from/to together are one inclusive range). See CatalogueConditionLeaf for operators and bounds. Unknown keys/operators fail with 400 validation_failed. Unknown fact sets/fields or configured type mismatches are reader invalid_query errors, mapped to the same envelope.

facets?array<>

Configured facet/option IDs with explicit any/all matching. The static ceiling of 1000 selections is a generous decoder allocation bound aligned with the reader's 1000-slot cap, not permission to select unconfigured facets. Readers require at most the facets the operator configured for this collection, reject unknown facets/options and enforce the aggregate 1000-slot and 50,000 expanded-bind budgets with typed invalid_query (400 validation_failed). GET and POST reject duplicate IDs and require collection context.

Itemsitems <= 1000
collectionId?string

Optional collection UUID. A collection returns the activities it selects without exposing its selection criteria. Availability queries return eligible dates for those activities. The existing ceiling of 1,000 distinct saved category IDs bounds the references checked per collection read. An unavailable collection, including one above this ceiling, returns 404 not_found. Check the UUID, storefront setup and booking channel before retrying.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
Formatuuid
includePast?boolean
Defaultfalse
limit?integer

Page size 1–100, default 20, for client ergonomics and bounded page hydration.

Range1 <= value <= 100
Default20
cursor?Cursor

Opaque base64url keyset token, at most 4 KiB to bound continuation decoding. The server also validates its operator and filter scope.

Match^[A-Za-z0-9_-]+$
Length1 <= length <= 4096

Response Body

AAs ordered by effective startsAt then UUID; exact total/facet counts count distinct AAs before pagination. Membership, hydration and counts share one request snapshot. Preserve timestamp precision in opaque continuation; each next page re-evaluates current authority and data. Grouping is a client presentation concern, with no group capacity total.

application/json
  1. response

AAs ordered by effective startsAt then UUID; exact total/facet counts count distinct AAs before pagination. Membership, hydration and counts share one request snapshot. Preserve timestamp precision in opaque continuation; each next page re-evaluates current authority and data. Grouping is a client presentation concern, with no group capacity total.

items*array<>
locale*Language

Matched case-insensitively against the operator's supported locale codes and normalized to the stored code. On every storefront read, Buchung-Locale is optional: omission or a well-formed but unsupported value applies the operator's default locale; a supported explicit value selects that exact locale, Content-Language always reports the applied locale, and Buchung-Locale-Fallback reports the requested value only when unsupported; malformed values return 400 validation_failed. Only checkout.createHandoff requires a supported Buchung-Locale: absence or malformed values return 400 validation_failed, and well-formed unsupported values return 400 locale_not_supported with details naming the requested and supported locales. Start with site.get to discover the operator's locales. Accepted locale codes form a closed set per operator, discovered from Site.locales; syntactically valid codes do not imply support. Management uses explicit locales without fallback; unsupported locales return 400 validation_failed.

Match^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8}){0,3}$
Lengthlength <= 35
nextCursor*|null
totalCount*integer
Range0 <= value <= 9007199254740991
evaluatedAt*Instant

ISO 8601 absolute instant with explicit UTC offset (including Z). Render using the resource's documented display timezone; the serialized offset need not equal that zone.

Match^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
Formatdate-time
collection*|

Public details of the requested collection. A collection returns the activities it selects without exposing its selection criteria. Null when collectionId is omitted.

facets*array<>
Example Request
curl -X POST 'https://api.buchungapp.com/v1/activities/497f6eca-6276-4993-bfeb-53cbbbba6f08/availabilities/query' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "items": [    {      "locale": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "activityId": "bdfd0655-55e6-45e6-8bbc-6ed31d3820b5",      "eventId": "d6703cc8-9e79-415d-ac03-a4dc7f6ab43c",      "variationId": "818c389d-b425-42eb-b751-daa67a093f4f",      "status": "upcoming",      "startsAt": "2019-08-24T14:15:22Z",      "endsAt": "2019-08-24T14:15:22Z",      "timeZone": "string",      "locations": [        {          "role": "venue",          "position": 0,          "location": {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "kind": "office",            "name": "string",            "address": {              "address1": "string",              "address2": "string",              "postalCode": "string",              "city": "string",              "countryCode": "string",              "components": {                "street": "string",                "houseNumber": "string",                "addition": "string"              }            },            "coordinates": {              "latitude": -90,              "longitude": -180            },            "timezone": "string"          }        }      ],      "title": "string",      "description": "string",      "sku": "string",      "bookingUnitNounForms": [        {          "locale": "string",          "forms": {            "zero": "string",            "one": "string",            "two": "string",            "few": "string",            "many": "string",            "other": "string"          }        }      ],      "price": {        "amount": 0,        "currency": "string",        "amountBeforeDiscounts": 0,        "hasPromotion": true      },      "remaining": 0,      "soldOut": true,      "bookableFrom": "2019-08-24T14:15:22Z",      "open": true,      "facts": {        "property1": {          "property1": {            "label": "string",            "kind": "reference",            "value": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "kind": "string"            }          },          "property2": {            "label": "string",            "kind": "reference",            "value": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "kind": "string"            }          }        },        "property2": {          "property1": {            "label": "string",            "kind": "reference",            "value": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "kind": "string"            }          },          "property2": {            "label": "string",            "kind": "reference",            "value": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "kind": "string"            }          }        }      }    }  ],  "locale": "string",  "nextCursor": "string",  "totalCount": 0,  "evaluatedAt": "2019-08-24T14:15:22Z",  "collection": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "handle": "string",    "title": "string",    "description": "string"  },  "facets": [    {      "id": "string",      "title": "string",      "description": "string",      "defaultOpen": true,      "match": "any",      "supportedMatches": [        "any"      ],      "optionsTruncated": true,      "selectedOptionIds": [        "string"      ],      "options": [        {          "id": "string",          "title": "string",          "description": "string",          "count": 0,          "input": {            "activity": {              "id": {                "eq": "b81fe1a7-65b4-4169-b130-13fa2a25664c"              }            }          }        }      ]    }  ]}