Delete a document
Delete the document and its current file with expectedRevision in the body. Refused with 409 document_referenced, whose details carry referenceCount and references [{ activityId, handle, archived, definitionId, key, locale, revision }] (individual value slots), while any custom fact value or event attachment references it, including on archived activities. A 409 body is a diagnostic, not a listing API. referenceCount is the total number of references that block deletion: custom fact values plus event attachments. references lists only custom fact value slots (first 50, ordered by activity id, key then locale (null last)), because those are deletable through the management API. Event attachments are counted but not listed and are detached in the dashboard. When references is empty and referenceCount is still above zero, the remaining blockers are event attachments. Use each reference's revision as expectedRevision when deleting its value, including on archived activities; locale is null for invariant values and must be omitted from their DELETE query. Repeat document deletion until no references remain; unpublish is the way to hide a document now, delete is housekeeping. A stale expectedRevision returns 409 revision_conflict with the document's currentRevision in the required details. Requires media: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.
Delete the document and its current file with expectedRevision in the body. Refused with 409 document_referenced, whose details carry referenceCount and references [{ activityId, handle, archived, definitionId, key, locale, revision }] (individual value slots), while any custom fact value or event attachment references it, including on archived activities. A 409 body is a diagnostic, not a listing API. referenceCount is the total number of references that block deletion: custom fact values plus event attachments. references lists only custom fact value slots (first 50, ordered by activity id, key then locale (null last)), because those are deletable through the management API. Event attachments are counted but not listed and are detached in the dashboard. When references is empty and referenceCount is still above zero, the remaining blockers are event attachments. Use each reference's revision as expectedRevision when deleting its value, including on archived activities; locale is null for invariant values and must be omitted from their DELETE query. Repeat document deletion until no references remain; unpublish is the way to hide a document now, delete is housekeeping. A stale expectedRevision returns 409 revision_conflict with the document's currentRevision in the required details. Requires media: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.
integrationBearerAuthorizationBearer <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.
documentId*stringDocument UUID scoped to the integration operator; see Id.
^([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})$uuidapplication/json- body
expectedRevision*RevisionMonotonic 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.
1 <= value <= 9007199254740991curl -X DELETE 'https://api.buchungapp.com/v1/management/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "expectedRevision": 1}'