Delete Category

Operation ID: deleteCategory

Group: Value Accounting › Categories

Open in the interactive reference

DELETE /value-accounting/categories/{id}

Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.

Delete one value accounting category. WRITES and is DESTRUCTIVE — the row is hard-deleted, not deactivated, and there is no undo. Returns an empty body on success. GUARDED, and it REFUSES rather than cascading: a category that value objects, value centers or custom value objects are still filed under is rejected with IN_USE and NOTHING is deleted. Deleting it would leave those records pointing at a categoryId that no longer resolves and nothing cleans that up, while re-filing or deleting them for you would change master data the caller never named — so re-file them (PATCH the record with another categoryId, or null to clear it) or delete them first; the referencing ids are listed in the diagnostic's details. A category is never deactivated instead: it has no lifecycle dates to retire into. An unknown id is rejected with NOT_FOUND and nothing is written. To delete several categories in one all-or-nothing transaction, use bulkDeleteCategories (POST value-accounting/categories/bulk-delete) instead.

Deletes one value accounting category and returns an empty body. DESTRUCTIVE: the row is hard-deleted, not deactivated, and there is no undo.

GUARDED, and it REFUSES rather than cascading: a category that value objects, value centers or custom value objects are still filed under fails with IN_USE and nothing is deleted. Deleting it would leave those records pointing at a categoryId that no longer resolves and nothing cleans that up, while re-filing or deleting them for you would change master data the caller never named — so re-file them (PATCH the record with another categoryId, or null to clear it) or delete them first; the referencing ids are listed in the diagnostic's details. A category is never deactivated instead: it has no lifecycle dates to retire into.

An unknown id fails with NOT_FOUND and nothing is written. To remove several categories in one transaction, use bulkDeleteCategories (POST value-accounting/categories/bulk-delete).

Parameters

Name In Type Required Description
Api-Version header string · v1 yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.
id path string yes Id (a UUID) of the category to delete; bound from the :id path segment. Obtain it from the categories data-set (GET value-accounting/categories). An id that matches no category is rejected with NOT_FOUND rather than treated as an already-completed delete, and a category still referenced by master data is rejected with IN_USE. Ids are matched case-insensitively and returned in canonical lowercase.

Response

200 Success

{
  "data": {},
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Response headers

Errors

Code Status
NOT_FOUND 400
IN_USE 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses