Errors
Handle every Storefront API error code, validation detail and request correlation ID.
Early access. Use the API base, channel key and allowed origins supplied by Buchung before running examples. Interactive API requests are disabled here.
{
"error": {
"code": "validation_failed",
"message": "validation failed",
"doc_url": "https://api.buchungapp.com/v1/docs#errors/validation_failed",
"request_id": "example-request",
"details": [
{ "path": "query.facets.0.match", "message": "Expected \"any\" | \"all\"" }
]
}
}Error envelope
Every error returns a top-level error object with string fields code, message, doc_url and request_id. details is optional and is normally an array of { path, message } validation items (for Management API conflict detail shapes, see the Management API guide). Error codes are closed per error variant within v1.
Storefront API error codes
| Wire code | HTTP status | Recommended action |
|---|---|---|
validation_failed | 400 | Fix invalid query syntax, cursor, malformed Buchung-Locale, missing handoff locale or invalid body fields; inspect details. |
locale_not_supported | 400 | Returned by checkout.createHandoff for an unsupported locale. Pick a locale from site.get (listed in details). Reads fall back to the operator default instead. |
unauthorized | 401 | Check X-Buchung-Channel-Key and whether the key was revoked; do not retry unchanged. |
forbidden_origin | 403 | The browser page's Origin is not on the booking channel's allowlist. Ask Buchung to add that exact origin (see Before you start). |
not_found | 404 | Check the resource UUID/handle and operator scope. On checkout.createHandoff, any invalid or non-offerable SKU rejects the whole request with lines[index].sku details. |
storefront_domain_missing | 409 | The operator has no verified storefront domain configured for hosted checkout. Configure one before retrying. |
payload_too_large | 413 | Keep storefront POST JSON bodies (queries and checkout handoffs) at or below 16 KiB. |
validation_failed | 414 | The full GET request URL is 8 KiB or longer. Switch to the matching POST /query endpoint. |
rate_limited | 429 | Honor Retry-After and back off with jitter. |
count_timeout | 503 | Exact counting exceeded its budget. Retry the read with backoff; never substitute 0 or an estimate. |
service_unavailable | 503 | Retry reads with backoff; checkout handoff returns Retry-After: 30 when the shared limiter is unavailable. |
internal_error | 500 | Log request_id for support; avoid blind write retries. |
Note that sold-out SKUs on checkout.createHandoff return 200 OK with warnings: [{ sku, code: "sold_out_at_handoff" }] rather than an error; show warnings to the visitor before continuing.
Catalogue query errors
These rules apply to GET lists and POST /query requests for activities, availabilities and one activity's availabilities.
400 validation_failedfor malformed input. Readdetails[].messagefor the expected shape or value. Structural paths forwhereandfacetsstart withquery.on GET andbody.on POST, with dotted array indexes, such asquery.facets.0.matchorbody.where.activity.categories.containsAny.0. An unexpected property can be reported at its enclosing object or array item, such asbody.facets.0. Invalid GET JSON points toquery.whereorquery.facets; invalid POST JSON points tobody.400 validation_failedfor a rejected fact condition. An unknown fact set or field or a value or operator the field does not accept returns the messageInvalid catalogue querywith a path rooted atwhereand bracketed array indexes, such aswhere.all[2].fact.field.400 validation_failedfor unavailable filters or a query over budget. A category, event or variation unavailable to the public query gets the same response as an unknown reference. Refresh your filter values and facet options or remove the rejected filter. If the query exceeds its complexity budget, simplifywhereor remove selections. The API can return this code without structural details.400 validation_failedfor an invalid cursor. Retry from the first page withoutcursor. See pagination.404 not_foundfor an unavailable collection. Check the configured collection UUID and channel key. The collection needs a storefront handle and must be available on that booking channel. An archived collection or one with unusable saved criteria also returns this code. The existing ceiling of 1,000 distinct saved category IDs bounds the references checked per collection read. A collection above that ceiling is unavailable. If the setup looks correct, senderror.request_idto your Buchung contact. The same code applies if the channel becomes unavailable after authentication.
Management API errors
Backend integrations using /management endpoints also handle 403 forbidden, 409 revision_conflict, 409 document_referenced, 413 payload_too_large (64 KiB cap) and 422 validation_failed on document uploads. See Management API error handling.
Logging and retries
Log the operation, HTTP status, error.code and error.request_id (keep request_id when contacting support). Redact channel keys, management tokens, signed upload URLs and customer data from logs. The checkout handoff URL and its seed are not secrets and may appear in browser logs; always navigate to the full URL unchanged.
Correct 4xx input before retrying. On 429 and 503, use exponential backoff with jitter and honor Retry-After.