Set Business Drivers Active

Operation ID: setBusinessDriversActive

Group: Value Accounting › Business Drivers › Business Driver Definitions

Open in the interactive reference

POST /value-accounting/business-drivers/set-active

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

Activate or deactivate business drivers in one all-or-nothing call. WRITES; returns an empty body. The non-destructive lifecycle switch: nothing is deleted, no recorded value changes, and it is undone by calling again with the opposite flag. Use it to retire a driver whose history must stay, to bring back a driver that deleteBusinessDriver (DELETE value-accounting/business-drivers/:id) deactivated, or to free the way after NAME_TAKEN_DEACTIVATED. It also switches SYSTEM drivers: activating one starts its metric feed and prepares its recording contexts (one per entity and book with a fiscal calendar); deactivating pauses the feed and discards nothing. A driver already in the requested state stays in it: recording contexts are prepared only on the switch into active. Every id is checked first: an unknown one rejects the whole call with NOT_FOUND and nothing changes; a system driver switched on with dimensions its metric feed cannot supply rejects it with DIMENSION_NOT_FED.

Activates or deactivates business drivers in one all-or-nothing call and returns an empty body. The NON-DESTRUCTIVE lifecycle switch: nothing is deleted, no recorded value changes, and calling it again with the opposite flag undoes it.

It is the way to retire a driver whose history must stay, the way to bring back a driver a delete deactivated, and the fix for a NAME_TAKEN_DEACTIVATED refusal. A deactivated driver keeps its name reserved.

It also switches SYSTEM drivers, and for them it is the whole configuration step: activating one starts its metric feed and prepares its recording contexts — one per entity and book with a fiscal calendar; deactivating pauses the feed and keeps everything it recorded. A driver already in the requested state stays in it: recording contexts are prepared only on the switch into active. A system driver is switched on only when its feed can supply every dimension it declares (DIMENSION_NOT_FED otherwise — for Time Tracking: Employee plus the tag dimensions available on time records).

Every id must exist: an unknown one fails the whole call with NOT_FOUND, and nothing changes.

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

Field Type Required Description
ids array<string> yes Ids (UUIDs) of the drivers to switch, as returned by the businessDrivers data-set (GET value-accounting/business-drivers) (filter[isActive][eq]=false lists the deactivated ones). Every id must exist, or the whole batch is rejected with NOT_FOUND. Duplicates are collapsed. An empty array is a valid no-op. Ids are matched case-insensitively. Example: ["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"].
isActive boolean yes True to activate every listed driver, false to deactivate every one. The same flag applies to the whole batch. Example: false.
{
  "ids": [
    "0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10",
    "6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"
  ],
  "isActive": false
}

Response

200 Success

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

Response headers

Errors

Code Status
NOT_FOUND 400
DIMENSION_NOT_FED 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses