Bulk Delete Custom Value Objects
Operation ID: bulkDeleteCustomValueObjects
Group: Value Accounting › Custom Value Objects
Open in the interactive reference
POST /value-accounting/custom-value-objects/bulk-delete
Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.
Delete several custom value objects in one call, DEACTIVATING each one that is still in use instead, and report each outcome. WRITES. Every id must exist: if any does not, the whole call is rejected with NOT_FOUND listing exactly those ids and NOTHING is written. Then each value is handled on its own: an unused value is hard-deleted together with its shadow value object and 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) with its shadow and mapping, leaving 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. A kept value is a success, not a failure of the batch: deletedIds and deactivated together name every distinct id sent. Re-open kept values with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate). POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.
Deletes several custom value objects in one call, DEACTIVATING each one that is still in use instead of deleting it, and reports each outcome.
Every id is checked to exist first: if any does not, the whole call is rejected with NOT_FOUND listing exactly the ids that matched nothing, and nothing is written. Once every id resolves, each value is handled on its own merits — an unused value is hard-deleted with its shadow value object and mapping (no undo); a value in use is kept and end-dated together with its shadow and mapping, and one 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: deletedIds and deactivated together name every distinct id you sent, and deactivated[].reason says why each kept value was kept.
A kept value is NOT a failure of the batch: one value with history does not stop the free ones from being deleted. That is the difference from the custom value dimension bulk delete, which refuses a whole batch for one dimension in use — a dimension has no deactivated state to fall back to.
POST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.
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. |
Request body
Required, application/json: bulkDeleteCustomValueObjectsInput.
| Field | Type | Required | Description |
|---|---|---|---|
ids |
array<string> | yes | Ids (UUIDs) of the custom value objects to delete, as returned by the customValueObjects data-set (GET value-accounting/custom-value-objects). Every id must exist, or the whole batch is rejected with NOT_FOUND. Duplicates are collapsed. An empty array is a valid no-op that deletes nothing and returns two empty lists. Ids are matched case-insensitively and returned in canonical lowercase. Example: ["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2","0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]. |
{
"ids": [
"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2",
"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"
]
}
Response
200 Success
Under data (bulkDeleteCustomValueObjectsOutput):
| Field | Type | Required | Description |
|---|---|---|---|
deletedIds |
array<string> | yes | Ids (UUIDs) of the values that were hard-deleted, with their shadow value objects and mappings, in the order they were first sent. These ids no longer resolve. |
deactivated |
array<object> | yes | The values that were in use and therefore kept and end-dated instead of deleted, in the order they were first sent. Their ids still resolve. 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 listed here again; its legs still open end on that same day. |
deactivated[].id |
string | yes | Id (a UUID) of the value that was kept. |
deactivated[].reason |
string | yes | Why it was kept, 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). |
deactivated[].retiredClusterValueObjectIds |
array<string> | no | Present only when this value's retire cut a CLUSTER back to fewer than two records (one, or none): ids (UUIDs) of the cluster value objects retired with 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, so its remaining open mappings and the value object itself end on the value's day. reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate) brings a cluster back when its members are re-opened together. |
deactivated[].deletedMappingIds |
array<string> | no | Present only when this value's retire DELETED mapping rows: ids (UUIDs) of its own planned links and of a collapsing cluster's rows of other records that would only have started after the value's end day — never in effect, so deleted rather than left canceled. These ids no longer resolve. The reason sentence only counts them (it names no id); this field is the contract. |
retiredClusterValueObjectIds |
array<string> | no | Present only when a HARD delete of this call cut a CLUSTER back to fewer than two records (one, or none) and that cluster was in use: ids (UUIDs) of those cluster value objects, retired today instead of deleted — each would otherwise stand for its last record alone beside that record's own one-to-one value object (or for nothing). The same usage rule as deleteValueObject (DELETE value-accounting/value-objects/:id) decides retired versus deleted. |
deletedClusterValueObjectIds |
array<string> | no | Present only when a HARD delete of this call 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 retiring a cluster that a HARD delete of this call cut back DELETED mapping rows: ids (UUIDs) of the cluster's rows of other records that would only have started after the cluster's end day — never in effect, so deleted rather than left canceled. These ids no longer resolve. |
{
"data": {
"deletedIds": [
"<deletedIds>"
],
"deactivated": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "<reason>",
"retiredClusterValueObjectIds": [
"<retiredClusterValueObjectIds>"
],
"deletedMappingIds": [
"<deletedMappingIds>"
]
}
],
"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