Bulk Delete Driver Values

Operation ID: bulkDeleteDriverValues

Group: Value Accounting › Business Drivers › Driver Values

Open in the interactive reference

POST /value-accounting/driver-values/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 recorded business driver values; returns an empty body. WRITES and is DESTRUCTIVE. Each value goes through the flow of deleteDriverValue (DELETE value-accounting/driver-values/:id) (an As-of delete usually reverts the period to the carried value). The values are processed NEWEST PERIOD FIRST whatever order the ids are sent in, so one call can delete a whole As-of combination — a first value is never blocked by a later value of the same batch. All-or-nothing: every id must exist (NOT_FOUND names the missing ones) and none may belong to a system driver (SYSTEM_DRIVER), both checked before anything is deleted; a value refused partway through — a carried row, a first value whose later value is not in the batch, a locked period — answers with its code and the whole request is rolled back, the values processed before it included, so a refusal means nothing changed.

Deletes several recorded business driver values and returns an empty body. Each value goes through the same flow as deleteDriverValue (DELETE value-accounting/driver-values/:id) — an As-of delete usually REVERTS the period to the carried value — so read that endpoint first.

NEWEST PERIOD FIRST: the values are processed from the latest period backwards, whatever order you send the ids in. That is what lets one call delete a whole As-of combination: each later value is gone before the first value's turn comes, so the first-value rule never blocks a value whose later values are in the same batch.

ALL-OR-NOTHING. Every id must exist (NOT_FOUND names the ones that do not) and none may belong to a system driver (SYSTEM_DRIVER) — both checked before anything is deleted. A value refused partway through (a carried row, a first value whose later value is NOT in the batch, a locked period) answers with its code and the WHOLE request is rolled back: the values processed before it are restored too, so nothing changed. Drop or add the ids the code points at and re-send; filter carried rows out (isCarried) beforehand.

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: bulkDeleteDriverValuesInput.

Field Type Required Description
ids array<string> yes Ids (UUIDs) of the values to delete, from searchDriverValues (POST value-accounting/driver-values/search). Leave carried rows (isCarried true) out — one refuses the call. Duplicates are collapsed; an empty array is a valid no-op. Matched case-insensitively. Example: ["3c1d9e4f-7a2b-4c6d-8e0f-1a2b3c4d5e6f","9f8e7d6c-5b4a-4392-8170-6f5e4d3c2b1a"].
{
  "ids": [
    "3c1d9e4f-7a2b-4c6d-8e0f-1a2b3c4d5e6f",
    "9f8e7d6c-5b4a-4392-8170-6f5e4d3c2b1a"
  ]
}

Response

200 Success

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

Response headers

Errors

Code Status
NOT_FOUND 400
SYSTEM_DRIVER 400
DELETE_CARRIED_BLOCKED 400
DELETE_FIRST_VALUE_BLOCKED 400
END_COMBO_EXPLICIT_AFTER 400
LINE_NOT_FOUND 400
DRIVER_NOT_FOUND 400
PERIOD_LOCKED 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses