Create Value Center

Operation ID: createValueCenter

Group: Value Accounting › Value Centers

Open in the interactive reference

POST /value-accounting/value-centers

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

Create a value center — a root, or under an existing parent — optionally with master-data mappings, in ONE transaction. WRITES. The new value center is part of the tree at once (a root when no parentId is sent). mappings is optional and may be empty — a value center need not stand for any record; each entry names its record as {dimensionCode, id}, the same record twice with the same dates counts once (with different dates it is DUPLICATE_MAPPING_ROW), and several records make it a cluster. ONE record that already has its own value center: that id is RETURNED — re-opened first if it is retired (end date before today; a later end date is a scheduled end and is kept) — up to the record's end date when that is today or later, not at all when the record has ended — kept active (its end date cleared; screened PARENT_INACTIVE / MAPPING_EXISTS / ONE_TO_ONE_EXISTS) when it ends TODAY — and name, description, centerCode, categoryId, parentId and all dates are not WRITTEN, so the call is safe to repeat for one record and never duplicates or renames — yet the request is still judged as sent: NAME_REQUIRED, DUPLICATE_MAPPING_ROW and INVALID_DATE_RANGE (an end inherited from the request's endDate included) refuse a malformed request even when it would resolve, while CENTER_CODE_TAKEN, PARENT_INACTIVE for a new value center and MAPPING_OUTLIVES_END are skipped there; a value center the record's link moved away from, now standing for another record, is not its own and is left untouched. No mapping, or several records: a new value center is always created, so calling twice creates two, and names are not unique. The value centers the system maintains for departments and teams are created by that automation, never here — one created here is hand-made and fully editable. Returns only the id; read the stored form with getValueCenter (GET value-accounting/value-centers/:id). Refusals, all before the first write: NAME_REQUIRED (blank name, judged on the resolve path too), CENTER_CODE_TAKEN (only for a new value center), PARENT_NOT_FOUND, CATEGORY_NOT_FOUND, UNSUPPORTED_DIMENSION_CODE / RECORD_NOT_FOUND (a mapping whose record does not resolve), PARENT_INACTIVE (a new live value center that would outlive its parent — an ended one, or one whose end date is earlier than the new value center's), MAPPING_OUTLIVES_END (a new value center with an endDate and a mapping sent with it that has a later endDate — a mapping ending on the value center's last day passes, and one sent without an endDate ends with the value center), and — only when the call re-opens the record's retired value center — REFERENCE_NOT_FOUND / PARENT_INACTIVE, the reactivate route's own refusals.

Creates a value center — a root, or under an existing parent — with the master-data mappings sent, or resolves the one that already exists, and returns only its id.

The new value center is part of the tree at once: under parentId when one is sent, a root otherwise. mappings is OPTIONAL and may be empty: a value center need not stand for any master-data record. Each mapping names its record as the pair {dimensionCode, id} the associations resource speaks; the same record sent twice with the same dates counts once — sent twice with different dates it is refused with DUPLICATE_MAPPING_ROW (one entry per record; a second link period is a later PATCH) — and several records make the value center a cluster on every day more than one of them is open (judged from the mappings; the stored inCluster flag is settled from the mappings open today and is informational only).

RESOLVE-OR-CREATE for ONE record — one record, one value center of its own. When the record already has its own (non-cluster) value center, that value center's id is RETURNED and nothing is created — re-opened first when it is retired (an end date before today) or its mapping has ended — up to the record's own end date when the record ends today or later (it never outlives the record), with no end date when the record has none; when the record itself has ENDED (its end date is before today) it is NOT re-opened: its id is returned with the value center as it stands, nothing written. A value center whose end date is still AHEAD is in effect: its scheduled end is kept. One whose end date is TODAY (still active) is KEPT ACTIVE: its end date is cleared — or moved to the record's own end date when the record ends later, and left as it is when the record ends today too — the mappings ending with it following — screened as the clear on PATCH value-accounting/value-centers/:id is: PARENT_INACTIVE under a parent ended for an open-ended child, MAPPING_EXISTS / ONE_TO_ONE_EXISTS when a mapping the clear carries would duplicate a link, nothing written. Re-opening a retired one is screened exactly like reactivateValueCenters (POST value-accounting/value-centers/reactivate): it is refused with PARENT_INACTIVE under a parent that is ended for it (inactive, canceled, or ending before the end the re-open gives — none, or the record's end date), and with REFERENCE_NOT_FOUND when a mapping it would re-open names master data that no longer exists, so a create is never a way around a refused reactivate. The name, description, centerCode, categoryId, parentId, dates and mapping dates of the request are then not WRITTEN: this call never renames, moves or re-files an existing value center (updateValueCenter (PATCH value-accounting/value-centers/:id) does), and a new link row it adds for the record ends with that value center. The request is still JUDGED AS SENT, before the resolution: NAME_REQUIRED, DUPLICATE_MAPPING_ROW and INVALID_DATE_RANGE (a mapping that would start after its own end — the end sent, or the request's endDate a mapping sent without one inherits) refuse a malformed request even when it would resolve, so the same request gets the same answer whether it creates or resolves; only the checks of what a NEW value center would write — CENTER_CODE_TAKEN, PARENT_INACTIVE for a new value center, MAPPING_OUTLIVES_END — are skipped on a resolve. This is what makes the call safe to repeat for one record. A value center the record's link moved away from, which now stands for another record, is not its own: a new value center is created and that one is left untouched. With NO mapping, or with SEVERAL records, a new value center is always created, so calling twice creates two, and names are not unique.

The value centers the system maintains for departments and teams — which departments or teams get one is the tenant's VALUE_CENTER_MAPPING_REFERENCE setting — are created by that automation, not here; a value center created here is hand-made and stays fully editable. centerNumber is assigned automatically.

A mapping never outlives its value center: a mapping sent without an endDate ends with the value center — it inherits the value center's endDate, and is open-ended only when the value center has none — and a value center created WITH an endDate is refused with MAPPING_OUTLIVES_END when a mapping sent with it has a later endDate; a mapping ending on the value center's last day passes, and a value center with an endDate and no mappings (history, e.g. a migration) is fine. A mapping that would start after the end it inherits — no dates on a value center whose endDate is already past starts today — is refused with INVALID_DATE_RANGE: send its real startDate to record history.

Every check runs before the first write; the value center, its place in the tree and its mappings are written in one transaction.

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

Field Type Required Description
name string yes Display name of the value center, e.g. 'Development Value Center'. Required and must not be empty or whitespace only (NAME_REQUIRED), judged even when an existing value center is returned and the name is then ignored. Stored exactly as sent, untrimmed. Names are NOT unique. Example: "Platform Engineering".
startDate date yes First day the value center is valid, inclusive. Format YYYY-MM-DD. Required. A date in the future makes it read status 'planned' until then. Example: "2026-01-01".
endDate date no Last day the value center is valid, inclusive. Format YYYY-MM-DD. Omit for an open-ended value center, the usual case. Must be on or after startDate (END_BEFORE_START otherwise, nothing written); the same day is a valid one-day value center.
description string no Longer free-text explanation of what the value center is for. Omit to leave it unset.
centerCode string no Tenant-assigned code identifying the value center, e.g. 'DEV-01'. Must be unused by any other value center (CENTER_CODE_TAKEN). Omit it, or send an empty string, for no code — a blank code is stored as 'no code', so any number of value centers may have none.
categoryId string no Id (a UUID) of the category to file the value center under, as listed by the categories data-set (GET value-accounting/categories). Omit to leave it uncategorised. An id that names no category is rejected with CATEGORY_NOT_FOUND and nothing is written. Matched case-insensitively.
parentId string no Id (a UUID) of the value center to hang this one under, from the valueCenters data-set (GET value-accounting/value-centers). Omit to create a ROOT. An id that names no value center is rejected with PARENT_NOT_FOUND and nothing is written. Matched case-insensitively. Example: "6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2".
mappings array<object> no The master-data records the value center stands for — a plain array of full mappings (the update edits them with createMappings / updateMappings / deleteMappings). OPTIONAL, and an empty array is valid: a value center need not stand for any record. Entries naming the same record with the same dates are collapsed, the first kept; the same record with different dates is refused with DUPLICATE_MAPPING_ROW. One distinct record makes a 1:1 mapping — and when that record already has its own value center, that one is returned instead of a new one — more than one a cluster. Example: [{"record":{"dimensionCode":"team","id":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}}].
mappings[].record object yes The master-data record, as the pair ensureRelationship (POST value-accounting/associations) takes. Both halves are required, because a UUID is unique within its dimension but not across dimensions.
mappings[].record.dimensionCode string yes Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'. The value centers the system maintains stand for departments and teams, and those are what the product's own screens map; the tenant's VALUE_CENTER_MAPPING_REFERENCE setting decides which of the two the automation creates value centers for and does not limit what is mapped here. An unknown code raises UNSUPPORTED_DIMENSION_CODE.
mappings[].record.id string yes Id (a UUID) of the master-data record — the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND; a record is never created implicitly. Inactive records resolve. Matched case-insensitively.
mappings[].startDate date no First day the mapping is valid, inclusive. Format YYYY-MM-DD. Defaults to TODAY, or to the value center's startDate when that is later; send the day the relationship really began when it began earlier — never before the value center's startDate (MAPPING_STARTS_BEFORE_OWNER).
mappings[].endDate date no Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Omit and the mapping ends with the value center: it inherits the value center's endDate, and is open-ended only when the value center has none — a mapping never outlives its value center. A date later than the value center's endDate is refused with MAPPING_OUTLIVES_END.
{
  "name": "Platform Engineering",
  "startDate": "2026-01-01"
}

Response

200 Success

Under data (createValueCenterOutput):

Field Type Required Description
id string yes Id (a UUID) of the new value center, or of the record's existing one when the 1:1 resolve applied. This is the whole of the response; it is what getValueCenter, updateValueCenter and deleteValueCenter (GET, PATCH and DELETE value-accounting/value-centers/:id) are keyed by, and what another value center's parentId names.
{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Response headers

Errors

Code Status
NAME_REQUIRED 400
CENTER_CODE_TAKEN 400
PARENT_NOT_FOUND 400
CATEGORY_NOT_FOUND 400
UNSUPPORTED_DIMENSION_CODE 400
RECORD_NOT_FOUND 400
DUPLICATE_MAPPING_ROW 400
END_BEFORE_START 400
INVALID_DATE_RANGE 400
REFERENCE_NOT_FOUND 400
PARENT_INACTIVE 400
MAPPING_OUTLIVES_END 400
MAPPING_STARTS_BEFORE_OWNER 400
MAPPING_EXISTS 400
ONE_TO_ONE_EXISTS 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses