Docs

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 codeHTTP statusRecommended action
validation_failed400Fix invalid query syntax, cursor, malformed Buchung-Locale, missing handoff locale or invalid body fields; inspect details.
locale_not_supported400Returned by checkout.createHandoff for an unsupported locale. Pick a locale from site.get (listed in details). Reads fall back to the operator default instead.
unauthorized401Check X-Buchung-Channel-Key and whether the key was revoked; do not retry unchanged.
forbidden_origin403The browser page's Origin is not on the booking channel's allowlist. Ask Buchung to add that exact origin (see Before you start).
not_found404Check 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_missing409The operator has no verified storefront domain configured for hosted checkout. Configure one before retrying.
payload_too_large413Keep storefront POST JSON bodies (queries and checkout handoffs) at or below 16 KiB.
validation_failed414The full GET request URL is 8 KiB or longer. Switch to the matching POST /query endpoint.
rate_limited429Honor Retry-After and back off with jitter.
count_timeout503Exact counting exceeded its budget. Retry the read with backoff; never substitute 0 or an estimate.
service_unavailable503Retry reads with backoff; checkout handoff returns Retry-After: 30 when the shared limiter is unavailable.
internal_error500Log 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_failed for malformed input. Read details[].message for the expected shape or value. Structural paths for where and facets start with query. on GET and body. on POST, with dotted array indexes, such as query.facets.0.match or body.where.activity.categories.containsAny.0. An unexpected property can be reported at its enclosing object or array item, such as body.facets.0. Invalid GET JSON points to query.where or query.facets; invalid POST JSON points to body.
  • 400 validation_failed for a rejected fact condition. An unknown fact set or field or a value or operator the field does not accept returns the message Invalid catalogue query with a path rooted at where and bracketed array indexes, such as where.all[2].fact.field.
  • 400 validation_failed for 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, simplify where or remove selections. The API can return this code without structural details.
  • 400 validation_failed for an invalid cursor. Retry from the first page without cursor. See pagination.
  • 404 not_found for 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, send error.request_id to 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.