# Update Business Driver

Operation ID: `updateBusinessDriver`

Group: Value Accounting › Business Drivers › Business Driver Definitions

[Open in the interactive reference](https://lensing.ai/api-docs/lensing/v1/endpoints/updateBusinessDriver)

`PATCH /value-accounting/business-drivers/{id}`

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

Partially update one business driver definition. WRITES — this changes an existing row. Only the fields you send are written; every omitted field keeps its current value. Returns an empty body on success — read the stored form back with getBusinessDriver (GET value-accounting/business-drivers/:id). Renaming re-labels the driver everywhere (values reference the id, not the text), but the new name must not be held by another driver, active or deactivated (NAME_TAKEN, NAME_TAKEN_DEACTIVATED; trimmed, case-insensitive). description is cleared with an explicit null. unitId can be replaced but not cleared (UNIT_NOT_CLEARABLE); re-pointing it relabels the recorded values without converting them. dimensions, when sent, REPLACES the whole set. While the driver holds any recorded value its calculationType (CALC_TYPE_LOCKED) and its dimension set (DIMENSIONS_LOCKED — no add, no remove) are frozen; re-sending the stored value is always accepted, and deleting every value unlocks both. A SYSTEM driver's name, calculationType and unit never change (SYSTEM_DRIVER), and it may declare only the dimensions its metric feed supplies, at least one (DIMENSION_NOT_FED — for Time Tracking: Employee plus the tag dimensions available on time records). Other refusals: NOT_FOUND, NAME_REQUIRED, INVALID_CALCULATION_TYPE, INVALID_DIMENSION, CUSTOM_VALUE_DIMENSION_NOT_FOUND, UNIT_NOT_FOUND, VALUE_CENTER_DISABLED (adding Value Center while the tenant setting is off). To activate or deactivate use setBusinessDriversActive (POST value-accounting/business-drivers/set-active). A PATCH that changes nothing is not written, so lastModifiedDate does not move; it still answers 200, and every check still runs first. In every refusal NOTHING is written.

Partially updates one business driver definition and returns an empty body. Only the fields present in the request are written; an omitted field keeps its current value, so this is a patch and never a replace.

`description` follows the value-accounting convention: omit = unchanged, explicit `null` = clear. `unitId` can be replaced but not cleared: `null` fails with `UNIT_NOT_CLEARABLE`, because the recorded values are read in the unit. Re-pointing the unit relabels how the existing values are read WITHOUT converting any number, so only switch between units that mean the same quantity; a system driver's unit cannot be re-pointed.

`dimensions` REPLACES the whole set when sent — include every dimension you want to keep. Two aspects freeze while the driver holds ANY recorded value: the calculation type (`CALC_TYPE_LOCKED`) and the dimension set, which can be neither added to nor reduced (`DIMENSIONS_LOCKED`); sending the stored value is always accepted. Deleting every value of the driver unlocks both again. On a driver without values the set may change freely: combination lines left over from values deleted earlier stay as inert history and are not reshaped. ADDING the Value Center dimension needs the tenant's Value Center dimension setting (`VALUE_CENTER_DISABLED`); a driver that already declares it keeps it.

A SYSTEM driver (`isSystem`) keeps its name, calculation type and unit for good (`SYSTEM_DRIVER`, naming the field; re-sending the stored value passes). Its dimensions are its metric feed's members, so it may declare only what that feed supplies, and at least one (`DIMENSION_NOT_FED`): for Time Tracking that is Employee (the time record's owner) plus the tag dimensions available on time records (a document without any availability row offers every tag dimension). Its description stays editable.

The active state is not a field here: use setBusinessDriversActive (POST value-accounting/business-drivers/set-active), which also prepares a system driver's recording contexts when it is switched on.

A PATCH that changes nothing — an empty body, or only values the driver already holds — is not written, so `lastModifiedDate` does not move. Every check runs before anything is written.

## 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 driver to update; bound from the :id path segment. Obtain it from the businessDrivers data-set (GET value-accounting/business-drivers). An id that matches no driver is rejected with NOT_FOUND. Ids are matched case-insensitively. Example: `"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"`. |

## Request body

Required, `application/json`: updateBusinessDriverInput.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no | New display name. OMIT TO LEAVE THE NAME UNCHANGED — it cannot be cleared. When sent it must not be empty or whitespace only (NAME_REQUIRED) and must not be held by another driver, active or deactivated, compared trimmed and case-insensitively (NAME_TAKEN, NAME_TAKEN_DEACTIVATED); re-sending the name the driver already holds is a no-op. Refused with SYSTEM_DRIVER when it differs on a system driver. Stored trimmed. |
| `description` | string \| null | no | New free-text explanation of what the driver measures. OMIT TO LEAVE IT UNCHANGED; send an explicit null to clear it back to unset. Example: `"Hours a production machine ran, from the shop-floor log."`. |
| `calculationType` | string | no | New calculation type, exactly 'asOf' or 'cumulative' (else INVALID_CALCULATION_TYPE). OMIT TO LEAVE IT UNCHANGED. A different value is refused with SYSTEM_DRIVER on a system driver and with CALC_TYPE_LOCKED while the driver holds any recorded value; the stored value is always accepted. |
| `unitId` | string \| null | no | Id (a UUID) of the new driver unit, from the driverUnits data-set (GET value-accounting/driver-units); an id naming no unit is UNIT_NOT_FOUND. OMIT TO LEAVE IT UNCHANGED. NOT CLEARABLE: an explicit null is refused with UNIT_NOT_CLEARABLE, because the recorded values are read in this unit. Re-pointing relabels how the existing values are read WITHOUT converting any number, so only switch between units that mean the same quantity. A SYSTEM driver's unit cannot be re-pointed (SYSTEM_DRIVER, lockedField 'unitId'); re-sending its stored unit passes. |
| `dimensions` | array<object> | no | The COMPLETE replacement dimension set — a replacement, not a merge, so include every dimension you want to keep; an empty array is refused for a driver recorded per entity (every driver this route manages), which must keep at least one dimension. OMIT TO LEAVE IT UNCHANGED. Each entry is checked as on create (INVALID_DIMENSION, CUSTOM_VALUE_DIMENSION_NOT_FOUND). Refused with DIMENSIONS_LOCKED if it differs from the stored set at all while the driver holds any recorded value. ADDING Value Center needs the tenant setting (VALUE_CENTER_DISABLED); a driver that already declares it may keep it. On a SYSTEM driver the set must be one its metric feed supplies, and must not be empty (DIMENSION_NOT_FED). Send the entries GET returns to keep the set as it is. Example: `[{"dimensionUrn":"urn:evst:everest:hr/base:model/node:Department"},{"dimensionUrn":"urn:evst:everest:valueaccounting/base:model/node:CustomValueObject","customValueDimensionId":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}]`. |
| `dimensions[].dimensionUrn` | string | yes | Model URN of the dimension — see createBusinessDriver (POST value-accounting/business-drivers) for the accepted list. Every custom dimension shares the CustomValueObject URN and needs its customValueDimensionId. |
| `dimensions[].customValueDimensionId` | string | no | Id (a UUID) of the custom value dimension, from the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). Required on a CustomValueObject entry and refused on a system one. Matched case-insensitively. |

```json
{}
```

## Response

`200` Success

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

## Response headers

- `Idempotency-Replayed` — Present and `true` only 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 as `false`.

## Errors

| Code | Status |
| --- | --- |
| `NOT_FOUND` | 400 |
| `SYSTEM_DRIVER` | 400 |
| `DIMENSION_NOT_FED` | 400 |
| `NAME_REQUIRED` | 400 |
| `NAME_TAKEN` | 400 |
| `NAME_TAKEN_DEACTIVATED` | 400 |
| `INVALID_CALCULATION_TYPE` | 400 |
| `INVALID_DIMENSION` | 400 |
| `CUSTOM_VALUE_DIMENSION_NOT_FOUND` | 400 |
| `UNIT_NOT_CLEARABLE` | 400 |
| `UNIT_NOT_FOUND` | 400 |
| `VALUE_CENTER_DISABLED` | 400 |
| `CALC_TYPE_LOCKED` | 400 |
| `DIMENSIONS_LOCKED` | 400 |
| `IDEMPOTENCY_KEY_CONFLICT` | 409 |
| `IDEMPOTENCY_PAYLOAD_MISMATCH` | 422 |

## Statuses

- `400` — Invalid request or business failure. Codes: NOT_FOUND, SYSTEM_DRIVER, DIMENSION_NOT_FED, NAME_REQUIRED, NAME_TAKEN, NAME_TAKEN_DEACTIVATED, INVALID_CALCULATION_TYPE, INVALID_DIMENSION, CUSTOM_VALUE_DIMENSION_NOT_FOUND, UNIT_NOT_CLEARABLE, UNIT_NOT_FOUND, VALUE_CENTER_DISABLED, CALC_TYPE_LOCKED, DIMENSIONS_LOCKED
- `401` — The request carries no valid access token.
- `403` — Not authorized
- `404` — Not found
- `409` — 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 no `Retry-After` header.
- `500` — Internal server error
