Docs

Update a custom definition

Update explicit labels, option labels or widen constraints with expectedRevision. Type and localized are immutable. 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.

PATCH
/v1/management/custom-definitions/{id}

Update explicit labels, option labels or widen constraints with expectedRevision. Type and localized are immutable. 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

Request Body

application/json
  1. body

Update labels or widen constraints; optionLabels are allowed only for choice definitions, and the server checks against the existing type. Host caps request bodies at 64 KiB before parsing.

expectedRevision*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
labels?

Explicit locale-to-label translations, at most 120 characters per label. Locale keys match case-insensitively; the server rejects unsupported locales and keys colliding after normalization.

optionLabels?

Choice option key to explicit locale-to-label translations.

constraints?||||

Closed per-type constraints: text maxLength 1..4000 (default 1000); text_list maxItems 1..50 (default 20); number integer/min/max/precision 0..6 with finite min/max and |value| <= 1e15; choice at most 100 option keys; boolean/json/pdf empty. The server permits only widening updates for the existing immutable type.

Response Body

Management definition, including unexposed and retired entries. type is a closed discriminator (text, text_list, boolean, number, choice, json, pdf); localized is a closed boolean constrained by that type. Stored text maxLength and text_list maxItems are required, including server defaults. Translations are explicit; no Buchung-Locale header or fallback projection.

application/json
  1. response

Management definition, including unexposed and retired entries. type is a closed discriminator (text, text_list, boolean, number, choice, json, pdf); localized is a closed boolean constrained by that type. Stored text maxLength and text_list maxItems are required, including server defaults. Translations are explicit; no Buchung-Locale header or fallback projection.

key*CustomDefinitionKey

Stable operator-scoped key, 2..64 characters matching ^[a-z][a-z0-9-]{1,63}$; never reused after retirement.

Match^[a-z][a-z0-9-]{1,63}$
labels*

Explicit locale-to-label translations, at most 120 characters per label. Locale keys match case-insensitively; the server rejects unsupported locales and keys colliding after normalization.

id*Id

Stable UUID of a public resource.

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
exposed*boolean
valueCount*integer

Number of stored values across activities.

Range0 <= value <= 9007199254740991
retiredAt*|null
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
createdAt*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
updatedAt*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
type*"text"
Value in"text"
localized*boolean
constraints*
Example Request
curl -X PATCH 'https://api.buchungapp.com/v1/management/custom-definitions/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "expectedRevision": 1}'
Example Response
{  "key": "string",  "labels": {    "property1": "string",    "property2": "string"  },  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "exposed": true,  "valueCount": 0,  "retiredAt": "2019-08-24T14:15:22Z",  "revision": 1,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "type": "text",  "localized": true,  "constraints": {    "maxLength": 1  }}