Delete Custom Value Object
Operation ID: deleteCustomValueObject
Group: Value Accounting › Custom Value Objects
Open in the interactive reference
DELETE /value-accounting/custom-value-objects/{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 custom value object, or DEACTIVATE it when it is still in use, and report which happened. WRITES. An unused value is hard-deleted together with its shadow value object and their mapping — DESTRUCTIVE, no undo. A value in use — tagged on allocations or business driver combinations, carrying postings on its shadow, related to other master data, or still represented by a hand-made value object — is kept and end-dated to today (or to its startDate, if that is later) instead, value, shadow and mapping together: it leaves the tagging pick-lists once that day has passed, while its history stays intact. A value that already ended keeps its own end date and is reported 'deactivated' again; its legs still open — shadow, mapping and its other mapping rows — end on that same day, so reactivating re-opens them with it. Both are a success with HTTP 200: read outcome ('deleted' or 'deactivated') and, for a kept value, reason. Re-open a deactivated value with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate). It cannot be re-opened while another value object holds an open one-to-one link to the value (ONE_TO_ONE_EXISTS): end that link first. A value kept only by relationships becomes deletable once they are removed with removeRelationship (POST value-accounting/associations/remove); then send this DELETE again. An unknown id is rejected with NOT_FOUND and nothing is written. For several values in one call use bulkDeleteCustomValueObjects (POST value-accounting/custom-value-objects/bulk-delete).
Deletes one custom value object — or, when it is still in use, DEACTIVATES it instead — and reports which of the two happened.
A value that is not in use is hard-deleted together with its shadow value object and their mapping; there is no undo. A value that IS in use is kept: the value, its shadow and the mapping are end-dated to today (or to its startDate, if that is later) together, which withdraws it from tagging pick-lists once that day has passed, while every posting made against it keeps resolving. A value that already ended keeps its own end date and is reported deactivated again; its legs still open — shadow, mapping and its other mapping rows — end on that same day, so reactivating re-opens them with it. In use means any of: tagged on an allocation line or a business driver combination, its shadow carrying postings, related to other master data through the associations resource, or a hand-made value object (one that is not its shadow) still standing for it one-to-one — a duplicate from before the one-open-one-to-one rule, which refuses it at creation since; this reason is its safety net. Both outcomes are a success (HTTP 200); read outcome to learn which one you got, and reason for why a value was kept.
A deactivated value can be re-opened with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate). It cannot be re-opened while another value object holds an open one-to-one link to the value (ONE_TO_ONE_EXISTS): end that link first. A value kept only by its relationships becomes deletable once they are removed with removeRelationship (POST value-accounting/associations/remove) — send the same DELETE again and the retired value is hard-deleted.
An unknown id fails with NOT_FOUND and nothing is written. To handle several values in one call, use bulkDeleteCustomValueObjects (POST value-accounting/custom-value-objects/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 custom value object to delete; bound from the :id path segment. An id that matches no value is rejected with NOT_FOUND rather than treated as an already-completed delete. Ids are matched case-insensitively and returned in canonical lowercase. |
Response
200 Success
Under data (deleteCustomValueObjectOutput):
| Field | Type | Required | Description |
|---|---|---|---|
outcome |
string | yes | What happened to the value: 'deleted' — it was not in use and is gone, together with its shadow value object and mapping, so its id no longer resolves; 'deactivated' — it is in use, so it was kept and end-dated (value, shadow and mapping together) and its id still resolves. Because the end date is inclusive, the value stays active — and offered for tagging — for the rest of that day, and reads isActive false from the next day on. A value that already ended keeps its own end date and is reported 'deactivated' again; its legs still open — shadow, mapping and its other mapping rows — end on that same day, so reactivating re-opens them with it. One of: "deleted", "deactivated". |
reason |
string | no | Why the value was kept rather than deleted, as a sentence — the first that applies: its shadow carries postings, it is tagged somewhere, it is part of master-data relationships (clear them with removeRelationship (POST value-accounting/associations/remove), then delete again; the sentence names the application-API action for the same removal), or a HAND-MADE value object still stands for it one-to-one — a duplicate from before the one-open-one-to-one rule, which refuses it at creation since; this reason is its safety net (the sentence names it by its quoted name with its object number in brackets, never by an id; remove that value object's mapping to the value, or delete that value object, then delete again). Present exactly when outcome is 'deactivated'. |
retiredClusterValueObjectIds |
array<string> | no | Present only when the delete cut a CLUSTER back to fewer than two records (one, or none): ids (UUIDs) of the cluster value objects retired because of it — the id of getValueObject (GET value-accounting/value-objects/:id). Each would otherwise stand for its last record alone beside that record's own one-to-one value object (or for nothing). On 'deactivated' its remaining open mappings and the value object itself end on the value's day, and reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate) brings a cluster back when its members are re-opened together. On 'deleted' the cluster was in use, so it was retired today instead of deleted (the same usage rule as deleteValueObject (DELETE value-accounting/value-objects/:id)). |
deletedClusterValueObjectIds |
array<string> | no | Present only on 'deleted' when the delete cut a CLUSTER back to fewer than two records and that cluster was unused: ids (UUIDs) of those cluster value objects, hard-deleted with their mappings. These ids no longer resolve. |
deletedMappingIds |
array<string> | no | Present only when the call DELETED mapping rows that would only have started after the day their owner ends on (never in effect, so deleted rather than left canceled): ids (UUIDs) of the mappings. On 'deactivated', the value's own planned links and a collapsing cluster's rows of other records; on 'deleted', the rows of other records on a cluster this delete retired. These ids no longer resolve. The reason sentence only counts them (it names no id); this field is the contract. |
{
"data": {
"outcome": "deleted",
"reason": "<reason>",
"retiredClusterValueObjectIds": [
"<retiredClusterValueObjectIds>"
],
"deletedClusterValueObjectIds": [
"<deletedClusterValueObjectIds>"
],
"deletedMappingIds": [
"<deletedMappingIds>"
]
},
"diagnostics": [
{
"code": "<code>",
"message": "<message>",
"severity": "error",
"path": [
"<path>"
],
"details": "<details>"
}
]
}
Response headers
Idempotency-Replayed— Present andtrueonly when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent asfalse.
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
IDEMPOTENCY_KEY_CONFLICT |
409 |
IDEMPOTENCY_PAYLOAD_MISMATCH |
422 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND401— The request carries no valid access token.403— Not authorized404— Not found409— The Idempotency-Key is still being processed by another request.422— The Idempotency-Key was already used with a different request payload.429— Too many requests from this client address. The response has no body and noRetry-Afterheader.500— Internal server error