Record Driver Value

Operation ID: recordDriverValue

Group: Value Accounting › Business Drivers › Driver Values

Open in the interactive reference

POST /value-accounting/driver-values

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

Record or correct ONE business driver value for one accounting period and one full member combination; returns the value's id. WRITES. A composite flow: it finds or creates the recording context of the driver, entity and book, creates the value object a member other than a value center did not have yet, writes the value with audit history and, for an As-of driver, carries it forward to today as system-carried rows. Deleting the value does not delete that value object: it stays in use while a combination of a driver names the member, and once the driver's values and the driver are deleted, deleteValueObject (DELETE value-accounting/value-objects/:id) hard-deletes it. members names one master-data record per declared dimension, all of them, as {dimensionCode, id}; names and numbers come from the master data. Recording the same combination and period again overwrites that period's value. editValueId corrects one value row in place (EDIT_VALUE_MISMATCH if it belongs to another driver, entity, book or period) and, with other members, moves it to that combination (COMBO_EXISTS if that one already holds a recorded value in the period). Correcting a past As-of period whose later carried rows would change, without propagate, writes NOTHING and answers needsPropagationDecision true: re-send with propagate true (carry it forward) or false (this period only). The period must be open and not in the future (PERIOD_LOCKED) and of the entity and book's fiscal calendar (PERIOD_CALENDAR_MISMATCH). A system driver is refused (SYSTEM_DRIVER). Every refusal is checked before anything is written.

Records ONE business driver value for one accounting period and one full combination of dimension members, or corrects an existing value, and returns its id.

It is a composite flow, not a row insert: it finds or creates the driver's recording context for the entity and book, resolves each member to its value tag — creating the value object a member other than a value center did not have yet — writes the value, stamps the audit history, and for an As-of driver carries the value forward as system-carried rows up to today.

members names one master-data record per dimension the driver declares, ALL of them, as {dimensionCode, id}; the record's name and number are read from the master data, so you never send them. A second call for the same combination and period overwrites that period's value (a correction, with history).

editValueId corrects one specific value row in place — it must be a value of this driver, entity, book AND period (EDIT_VALUE_MISMATCH otherwise). Sent with other members than the row holds, it moves the value to that combination (COMBO_EXISTS when that combination already has a recorded value in the period).

THE PROPAGATION DECISION: correcting a past period of an As-of driver would change the carried rows after it. Leave propagate out and, if that would happen, nothing is written and the answer is needsPropagationDecision: true with no id; send the identical request again with propagate: true (carry the correction forward) or false (this period only). Cumulative drivers never ask.

The period must be open for the entity and book and not in the future (PERIOD_LOCKED), and belong to their fiscal calendar (PERIOD_CALENDAR_MISMATCH). A system driver's values are refused (SYSTEM_DRIVER). Every refusal is checked 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.

Request body

Required, application/json: recordDriverValueInput.

Field Type Required Description
driverId string yes Id (a UUID) of the business driver, as returned by the businessDrivers data-set (GET value-accounting/business-drivers). It must be active and not a system driver. Matched case-insensitively. Example: "0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10".
entityId string yes Id (a UUID) of the legal entity the value belongs to, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns it in entityId. With bookId it selects the recording context: a driver holds a separate value set per entity and book. Matched case-insensitively. Example: "6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2".
bookId string yes Id (a UUID) of the accounting book, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns it in bookId. The book must carry a fiscal calendar for the entity (BOOK_HAS_NO_CALENDAR otherwise). Matched case-insensitively. Example: "c3a91e07-52d4-4f6b-8e1a-9b0d2c7f4a63".
accountingPeriodId string yes Id (a UUID) of the accounting period the value is recorded in, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns it in accountingPeriodId. It must belong to the fiscal calendar of the entity and book and be open, and not in the future. Matched case-insensitively. Example: "95dd0047-0f93-429b-af80-982416f97748".
value decimal yes The measured quantity in the driver's unit, as a decimal number (42 or '12.5'); zero and negatives are accepted. Anything that is not a number is INVALID_VALUE. For an As-of driver it is the level from this period on; for a cumulative driver the amount of this period alone. Stored with at most 12 decimal places: further digits are rounded on the write. Example: "42".
members array<object> yes The full dimension combination: exactly one master-data record per dimension the driver declares, all of them (MEMBERS_INCOMPLETE, MEMBER_DIMENSION_MISMATCH, MEMBER_DUPLICATE_DIMENSION otherwise). Read the driver's dimensions with getBusinessDriver (GET value-accounting/business-drivers/:id). Example: [{"dimensionCode":"department","id":"7b4e2d19-8c3f-4a5e-b6d7-1e0f9a2c3b84"}].
members[].dimensionCode string yes Dimension of the record: one of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object of the driver's custom dimension). An unknown code raises UNSUPPORTED_DIMENSION_CODE.
members[].id string yes Id (a UUID) of the master-data record — the value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id naming no record of that dimension raises MEMBER_NOT_FOUND. Matched case-insensitively.
editValueId string no Id (a UUID) of an existing value to correct in place — the id of a row searchDriverValues (POST value-accounting/driver-values/search) returned. It must be a value of this driver, entity, book and accountingPeriodId. With other members than the row holds, the value moves to that combination and the one it left is repaired. Omit for a normal write, which overwrites the slot's value anyway. Matched case-insensitively.
propagate boolean no The As-of propagation decision, deliberately three-valued. Omitted: when the correction would change the carried rows after this period, nothing is written and needsPropagationDecision comes back true. True: the correction is carried through those rows (derived data, so this crosses locked periods and writes no history). False: only this period changes. Ignored by cumulative drivers and by a new combination, which has no later rows.
{
  "driverId": "0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10",
  "entityId": "6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2",
  "bookId": "c3a91e07-52d4-4f6b-8e1a-9b0d2c7f4a63",
  "accountingPeriodId": "95dd0047-0f93-429b-af80-982416f97748",
  "value": "42",
  "members": [
    {
      "dimensionCode": "department",
      "id": "7b4e2d19-8c3f-4a5e-b6d7-1e0f9a2c3b84"
    }
  ]
}

Response

200 Success

Under data (recordDriverValueOutput):

Field Type Required Description
id string no Id (a UUID) of the value row written. Absent exactly when needsPropagationDecision is true — then nothing was written.
needsPropagationDecision boolean no True when the write was WITHHELD: correcting this period of an As-of driver would change the carried rows after it and propagate was omitted. Nothing was written. Re-send the identical request with propagate true or false. Absent on a write.
{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "needsPropagationDecision": true
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Response headers

Errors

Code Status
DRIVER_NOT_FOUND 400
ENTITY_NOT_FOUND 400
BOOK_NOT_FOUND 400
PERIOD_NOT_FOUND 400
UNSUPPORTED_DIMENSION_CODE 400
MEMBER_NOT_FOUND 400
MEMBER_NAME_REQUIRED 400
VALUE_NOT_FOUND 400
EDIT_VALUE_MISMATCH 400
COMBO_EXISTS 400
SYSTEM_DRIVER 400
INVALID_VALUE 400
PERIOD_CALENDAR_MISMATCH 400
DRIVER_INACTIVE 400
MEMBER_REQUIRED 400
MEMBERS_INCOMPLETE 400
MEMBER_DIMENSION_MISMATCH 400
MEMBER_DUPLICATE_DIMENSION 400
VALUE_CENTER_DISABLED 400
PERIOD_LOCKED 400
BOOK_HAS_NO_CALENDAR 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses