Docs

Replace a custom value

Replace the whole value. Archived activities return not_found. expectedRevision is required; null means expected absent. For json definitions only, JSON null stores a value. Localized definitions require an explicit supported locale; invariant definitions forbid one. Cumulative serialized custom values per activity are capped at 64 KiB at write time; overflow returns 400 validation_failed with a budget detail. A pdf value whose documentId does not name a live document of the operator whose current file is a validated catalogue PDF returns 400 validation_failed; 422 is reserved for the three document upload operations. Requires activities:write. Machine integration bearer credentials only; storefront channel keys never authorize these operations. Buchung-Locale is not used; translations are addressed explicitly. Host enforces a 64 KiB request-body cap before parsing for every method with a body, including DELETE. Per-machine limits: 600 reads/minute, 300 writes/minute; over limit returns 429 rate_limited. Limiter store outage falls back to per-instance memory for reads; writes return 503 service_unavailable with Retry-After: 30.

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

PUT
/v1/management/activities/{id}/custom-values/{definitionId}

Replace the whole value. Archived activities return not_found. expectedRevision is required; null means expected absent. For json definitions only, JSON null stores a value. Localized definitions require an explicit supported locale; invariant definitions forbid one. Cumulative serialized custom values per activity are capped at 64 KiB at write time; overflow returns 400 validation_failed with a budget detail. A pdf value whose documentId does not name a live document of the operator whose current file is a validated catalogue PDF returns 400 validation_failed; 422 is reserved for the three document upload operations. Requires activities:write. Machine integration bearer credentials only; storefront channel keys never authorize these operations. Buchung-Locale is not used; translations are addressed explicitly. Host enforces a 64 KiB request-body cap before parsing for every method with a body, including DELETE. Per-machine limits: 600 reads/minute, 300 writes/minute; over limit returns 429 rate_limited. Limiter store outage falls back to per-instance memory for reads; writes return 503 service_unavailable with Retry-After: 30.

Authorization

integrationBearer
headerAuthorizationBearer <token>

Machine integration credential: Authorization: Bearer bg_it_<32 lowercase hex characters> (^bg_it_[0-9a-f]{32}$). Resolved uncached on each request. Middleware binds the resolved principal once; handlers run under it and never re-derive authority. The request context includes credentialId for per-request logging alongside machineId, operatorId, organizationId and capabilities; the principal is opaque and server-owned. Storefront channel keys never authorize management operations; machine credentials never authorize storefront checkout handoffs. Invalid, expired, revoked, disabled or ungranted credentials return 401 unauthorized.

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
definitionId*string

Custom definition UUID scoped to the integration 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

Query Parameters

locale?string

Explicit stored translation locale; required by localized definitions and forbidden by invariant definitions. No fallback; see Language.

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

Request Body

application/json
  1. body

Whole-value replacement. Required expectedRevision: null means expected absent; an integer must match the stored revision. Host caps request bodies at 64 KiB before parsing.

value*CustomValuePayloadEncoded

Server validates the definition codec: text trimmed plain text, maxLength 1..4000 (default 1000), no control characters except newline/tab; text_list maxItems 1..50 (default 20), each item <= 500 characters, whole-list replacement; boolean strict; number finite with |value| <= 1e15, integer/min/max and precision 0..6, no rounding; choice one declared option key; json <= 16 KiB serialized UTF-8, depth <= 16, <= 5000 nodes, keys <= 128 characters, strings <= 8 KiB, rejects proto/constructor/prototype; pdf { documentId } must name a live document of the same operator whose current file is a validated catalogue PDF, never an upload candidate's mediaId; public projection additionally requires the document to be published, so a reference to an unpublished document is stored but stays absent from the storefront. For json definitions only, explicit JSON null is a stored value distinct from deletion. Cumulative serialized custom values per activity are capped at 64 KiB at write time; exceeding the budget returns 400 validation_failed with a budget detail. Retired definitions block new value writes and public projection but allow deleting stored values. Host caps management request bodies at 64 KiB before parsing.

expectedRevision*|null

Response Body

CustomValueSaved

application/json
  1. response
status*"saved"

Closed acknowledgement: saved means the write completed.

Value in"saved"
revision*Revision

Monotonic integer optimistic-concurrency revision assigned from a database sequence, starting at 1. Not dense: gaps are normal. Clients compare equality only. A value slot never reuses a revision across delete/recreate, so a stale expectedRevision always conflicts.

Range1 <= value <= 9007199254740991
Example Request
curl -X PUT 'https://api.buchungapp.com/v1/management/activities/497f6eca-6276-4993-bfeb-53cbbbba6f08/custom-values/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "value": null,  "expectedRevision": 1}'
Example Response
{  "status": "saved",  "revision": 1}