Search Value Centers

Operation ID: searchValueCenters

Group: Value Accounting › Value Centers

Open in the interactive reference

POST /value-accounting/value-centers/search

Read-only: A read that takes its filters in the body. Changes nothing, and ignores Idempotency-Key.

Search value centers by name fragment (case-insensitive), exact center code, status, category, parent, and the master-data record they are mapped to — 'which value center stands for department X' is filters.record: {dimensionCode: 'department', id: <the department's id>}. Read-only, cursor-paginated, and every row carries its mappings and its parent. This is where a value center is looked up by name, code or record: the valueCenters data-set (GET value-accounting/value-centers) returns names and codes but cannot filter on them. Omitting filters entirely returns every value center, paged. A filter matching nothing returns an empty items array with HTTP 200 — except filters.record, which is the subject of the question: an unknown record is RECORD_NOT_FOUND, an unknown dimension code UNSUPPORTED_DIMENSION_CODE. Rows carry the same fields as getValueCenter (GET value-accounting/value-centers/:id), without the children. POST rather than GET because a name fragment and a record pair do not belong in a URL.

Finds value centers by name fragment (case-insensitive), by exact center code, by status, by category, by parent, and by the master-data record they are mapped to — the question 'which value center stands for department X'.

This is the lookup the routed list cannot do: the valueCenters data-set (GET value-accounting/value-centers) returns names and codes but does not filter on them, and carries no mappings. filters.record takes the same {dimensionCode, id} pair the associations resource speaks and matches every value center with a mapping to that record, ended history rows included — its 1:1 value center, any cluster it is part of, and a value center its link moved away from; each row's mappings[] dates and the other records they name tell them apart (the stored inCluster flag describes only the day of the last write). filters.parentId keeps the value centers hanging DIRECTLY under one value center; the whole subtree is getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy).

An empty filters is a valid request for every value center, paged. A filter that matches nothing — including a category or parent id that names nothing — returns an empty items array with HTTP 200. A filters.record is the subject of the question, so a record that does not exist is RECORD_NOT_FOUND and an unknown dimension code UNSUPPORTED_DIMENSION_CODE, never an empty page that would read as 'no value center yet'.

Rows carry the same fields as getValueCenter (GET value-accounting/value-centers/:id), mappings included, children excepted.

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.

Request body

Required, application/json: searchValueCentersInput.

Field Type Required Description
filters object no How to narrow the search. A value center must match every member you send. Omit it — or send it with no members — to page through every value center. Example: {"record":{"dimensionCode":"department","id":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}}.
filters.nameContains string no Fragment the name must contain, matched case-insensitively anywhere in the name — the lookup for a type-ahead. A substring match, not a pattern language: the fragment is taken as literal text apart from the SQL wildcards % and _, which are not escaped and therefore still act as wildcards. A fragment matching nothing yields an empty page, not an error.
filters.centerCode string no Exact center code, matched on the stored text (case-sensitive) — at most one value center, since codes are unique among the value centers that have one. A code matching nothing yields an empty page, not an error.
filters.status string no Lifecycle state to keep: 'active', 'planned', 'inactive' or 'canceled' — the same derived status every read publishes. Omit for all four. One of: "active", "inactive", "planned", "canceled".
filters.categoryId string no Id (a UUID) of a category, from the categories data-set (GET value-accounting/categories): only value centers filed under it match. An id that names no category matches nothing — an empty page, not an error. Matched case-insensitively.
filters.parentId string no Id (a UUID) of a value center: only the value centers hanging DIRECTLY under it match — one level of the tree. An id that names no value center, or a leaf, matches nothing — an empty page, not an error. For every level below, use getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy?direction=descendants). Matched case-insensitively.
filters.record object no A master-data record: only value centers with a mapping to it match, ended history rows included — its 1:1 value center, every cluster it belongs to, and a value center its link moved away from (the mappings' dates and the other records they name tell them apart; the stored inCluster flag describes only the day of the last write). The same pair ensureRelationship (POST value-accounting/associations) takes. A record that does not exist is RECORD_NOT_FOUND and an unknown dimension code UNSUPPORTED_DIMENSION_CODE; a record that exists but has no value center yields an empty page.
filters.record.dimensionCode string yes Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object). The system itself maps departments and teams. An unknown code raises UNSUPPORTED_DIMENSION_CODE.
filters.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. Matched case-insensitively.
page object no Cursor and page size. Omit for the first page at the default size. Example: {"size":50}.
page.cursor string no Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one this endpoint did not issue (a cursor from another list, or one altered by hand) raises INVALID_CURSOR rather than silently restarting at the first page, which would make a paging loop repeat forever. Keep filters identical across the pages of one walk; changing it mid-walk re-interprets the cursor against a different result set. It encodes the LAST ROW of the page you received, not a position, so the walk resumes AT THAT ROW rather than at a count: a row created or removed before your position cannot make a later page repeat a row you already saw or skip one you have not.
page.size number no Maximum number of value centers to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more.
{}

Response

200 Success

Under data (searchValueCentersOutput):

Field Type Required Description
items array<object> yes The value centers on this page, one row per value center with its mappings, in the same shape getValueCenter (GET value-accounting/value-centers/:id) returns without the children. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by id ascending — a unique, immutable key, so a rename never moves a row across a page boundary. The cursor is a KEYSET cursor over that order, so a value center created after your cursor position appears on a later page, one created before it does not, and no row is ever repeated or skipped, whatever else is written while you walk.
items[].id string yes Id (a UUID) of the value center — the id getValueCenter, updateValueCenter and deleteValueCenter (GET, PATCH and DELETE value-accounting/value-centers/:id) are keyed by.
items[].name string yes Display name of the value center. Names are not unique.
items[].centerNumber string no System-assigned business number, e.g. 'VC-461358' — unique and never caller-supplied.
items[].description string no Longer free-text explanation. Absent — not null — when unset.
items[].centerCode string no Tenant-assigned code, unique among the value centers that have one. Absent — not null — when it has none.
items[].startDate date yes First day the value center is valid, inclusive. Format YYYY-MM-DD.
items[].endDate date no Last day the value center is valid, inclusive. Format YYYY-MM-DD. Absent — not null — when it is open-ended.
items[].status string yes Lifecycle state, derived from the dates: 'active', 'planned' (startDate after today), 'inactive' (endDate before today, UTC — the end date is inclusive) or 'canceled' (endDate before startDate).
items[].categoryId string no Id (a UUID) of the category the value center is filed under. Absent — not null — when it is uncategorised.
items[].parentId string no Id (a UUID) of the value center's direct parent. Absent — not null — for a root.
items[].isSystemManaged boolean yes True when the system maintains this value center as the mirror of a department or team: its name, centerCode, startDate, categoryId and mappings are then refused on PATCH with SYSTEM_MANAGED; its parentId stays editable (no Department/Team hook places it in the tree). Derived, never an input.
items[].mappingCount number yes How many mappings the value center carries — the length of mappings; 0 is valid.
items[].lastModifiedDate date-time yes Instant the value center's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the keyed read publish.
items[].mappings array<object> yes The master-data records the value center stands for, one entry per mapping, oldest first — the same entries getValueCenter (GET value-accounting/value-centers/:id) returns.
items[].mappings[].id string yes Id (a UUID) of the mapping itself — what updateMappings and deleteMappings on updateValueCenter (PATCH value-accounting/value-centers/:id) are keyed by. Not the record's id.
items[].mappings[].record object no The master-data record this mapping names, as the pair ensureRelationship (POST value-accounting/associations) uses. Absent when the record no longer resolves, so the row can still be removed by its id.
items[].mappings[].record.dimensionCode string yes Dimension the record belongs to: one of the ten codes filters.record accepts.
items[].mappings[].record.id string yes Id (a UUID) of the master-data record, in canonical lowercase.
items[].mappings[].inCluster boolean yes Stored cluster flag: true when the value center's mappings open on the day of the last write to them named more than one distinct record; false for a 1:1 mapping. It describes that day only — nothing re-settles it when a mapping starts or ends later — so it is informational: which value center a record resolves to, and every other one-to-one decision, is judged from the mappings open on the day asked, never from this flag.
items[].mappings[].startDate date no First day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent on rows written without one.
items[].mappings[].endDate date no Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent when open-ended.
pagination object yes Pagination cursor for this page.
pagination.nextCursor string no Opaque cursor to pass as page.cursor for the next page; absent on the last page.
pagination.hasMore boolean yes True when more value centers remain beyond this page.
{
  "data": {
    "items": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "<name>",
        "centerNumber": "<centerNumber>",
        "description": "<description>",
        "centerCode": "<centerCode>",
        "startDate": "2026-01-15",
        "endDate": "2026-01-15",
        "status": "<status>",
        "categoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "parentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "isSystemManaged": true,
        "mappingCount": 0,
        "lastModifiedDate": "2026-01-15T09:30:00.000Z",
        "mappings": [
          {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "record": {
              "dimensionCode": null,
              "id": null
            },
            "inCluster": true,
            "startDate": "2026-01-15",
            "endDate": "2026-01-15"
          }
        ]
      }
    ],
    "pagination": {
      "nextCursor": "<nextCursor>",
      "hasMore": true
    }
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Errors

Code Status
INVALID_CURSOR 400
UNSUPPORTED_DIMENSION_CODE 400
RECORD_NOT_FOUND 400

Statuses