Update Value Allocation
Operation ID: updateValueAllocation
Group: Value Accounting › Value Allocations
Open in the interactive reference
PATCH /value-accounting/value-allocations/{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 value allocation — its own fields and its existing lines — in one transaction. WRITES; returns an empty body. Corrects existing attribution only: allocations and lines are created by tagging a financial document, so there is no createLines. Only what is sent is written. Fields: documentType, allocationDate, isOffset (true removes every journal line of the allocation from all value-accounting reporting, false re-includes them); none can be cleared, and draftAllocation is not writable. updateLines patches existing lines by their id — valueCenterId / valueObjectId re-attribute the amount, allocationLineType moves it between revenue ('profit'), cost ('cost') and neither ('value', 'metric'), splitParentId re-points the split parent (never the line itself or a line this request deletes — INVALID_SPLIT_PARENT), allocationRule sets {path, id} or clears with null and is refused with RULE_LOCKED while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references the allocation; valueStatus, allocationType and allocationDate are documentation. deleteLines removes lines by their id, refused with IN_USE while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references the allocation or while a line split from one of them exists as STORED — the children are judged on the stored rows, so a child re-pointed to another parent in the same request still blocks its old parent's delete; re-point the child in one request and delete the parent in the next. Both document checks read under the caller's row-level security: a caller whose access covers only some rows of a node type that can reference an allocation is refused with ROW_ACCESS_RESTRICTED instead, since the check cannot be evaluated for them. Line ids are lines[].id of getValueAllocation (GET value-accounting/value-allocations/:id) and must belong to this allocation (LINE_NOT_FOUND, LINE_MISMATCH). Other refusals: NOT_FOUND, PARENT_LINE_NOT_FOUND, VALUE_OBJECT_NOT_FOUND, VALUE_CENTER_NOT_FOUND, ALLOCATION_RULE_NOT_FOUND. Every check runs first, so a rejected call writes nothing. A PATCH that changes nothing — an empty body, or every field sent with its stored value — is not written, so lastModifiedDate does not move; the same holds for each updateLines row, and a line edit never moves the allocation's lastModifiedDate.
Partially updates one value allocation — its own fields and its existing lines — in one transaction, and returns an empty body. It CORRECTS attribution that already exists; it never creates any. Allocations and their lines are created by tagging a financial document, so there is no createLines here.
Only what you send is written: omit a field to leave it unchanged. The allocation's own fields are documentType, allocationDate and isOffset; none can be cleared. ⚠️ isOffset: true removes every journal line of this allocation from all value-accounting reporting while the general ledger keeps the amount; false re-includes them. draftAllocation belongs to the source document and is not writable.
The lines are edited through two verb arrays keyed by the line's own id (lines[].id of getValueAllocation (GET value-accounting/value-allocations/:id)); only this allocation's own lines can be named (LINE_MISMATCH otherwise). updateLines patches a line: valueCenterId / valueObjectId re-attribute its amount; ⚠️ allocationLineType MOVES the amount between revenue ('profit'), cost ('cost') and neither ('value', 'metric') in every report; valueStatus, allocationType and allocationDate are documentation; splitParentId names the line it was split from — never itself or a line this request deletes (INVALID_SPLIT_PARENT); allocationRule sets the rule as {path, id} or clears it with null — both parts always travel together — and is refused with RULE_LOCKED while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references this allocation, because the rule that produced posted allocations must stay readable. deleteLines removes lines, refused with IN_USE while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references this allocation (that would destroy the document's attribution) or while another line was split from one of them and is not removed in the same request. Both document checks read under the caller's row-level security, so a caller whose access covers only some rows of a node type that can reference an allocation is refused with ROW_ACCESS_RESTRICTED naming those node types: the check cannot be evaluated for them.
Every check runs before anything is written. A PATCH that changes nothing — an empty body, or every field sent with its stored value — is not written, so lastModifiedDate does not move; the same holds for each updateLines row. An edit of the lines never moves the allocation's own lastModifiedDate.
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 value allocation to change; bound from the :id path segment. An id that matches no allocation is rejected with NOT_FOUND. Ids are matched case-insensitively. Example: "6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2". |
Request body
Required, application/json: updateValueAllocationInput.
| Field | Type | Required | Description |
|---|---|---|---|
documentType |
string | no | New kind of financial document — one of the 37 kinds the valueAllocations data-set (GET value-accounting/value-allocations) lists. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. A label, not a reference: nothing is checked against a real document, so correct it only to the kind the allocation genuinely belongs to. One of: "VendorBill", "Invoice", "JournalEntry", "Revenue", "Expense", "BankEntry", "OutboundPayment", "Reversal", "Revaluation", "CustomerPayment", "CreditMemo", "DebitMemo", "Payroll", "VendorCredit", "CreditCardEntry", "RevaluationReversal", "Allocation", "Depreciation", "AccruedLiability", "AmortizationSchedule", "RevaluationClose", "NetZeroImpact", "FundTransfer", "SalesOrder", "DeferredRevenueReclass", "UnbilledARAdjustment", "ShortAndLongTermDeferredRevenueReclass", "ManualTaxableDocument", "IntercompanyBill", "InventoryIncrease", "InventoryDecrease", "InventoryRevaluation", "PurchaseRequest", "PurchaseOrder", "FixedAsset", "EmployeeAdvanceRequest", "TimeRecord". |
allocationDate |
date | no | New day the allocation was recorded. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. It cannot move an amount into another fiscal period — reporting buckets by the journal entry line's posting date. |
isOffset |
boolean | no | New offset flag. OMIT TO LEAVE IT UNCHANGED. ⚠️ true removes every journal line of this allocation from all value-accounting reporting (the dashboard, its drill-downs, the AI assistant, every analytics read) while the general ledger keeps the amount; false re-includes them. A stored null counts as false, so sending false then changes nothing. |
updateLines |
array<object> | no | Existing lines to PATCH, each keyed by its line id. Only the fields sent change; a row whose fields all equal the stored ones is not written. A line named in deleteLines as well is removed and its row here is skipped. Omit for no line changes. Example: [{"id":"3c4d5e6f-1a2b-4c3d-8e9f-0a1b2c3d4e5f","valueObjectId":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","allocationLineType":"cost"}]. |
updateLines[].id |
string | yes | Id (a UUID) of the line — lines[].id of getValueAllocation (GET value-accounting/value-allocations/:id). An id that matches no line is LINE_NOT_FOUND; a line of another allocation LINE_MISMATCH. |
updateLines[].valueCenterId |
string | no | Id (a UUID) of the value center to attribute the amount to, from the valueCenters data-set (GET value-accounting/value-centers). OMIT TO LEAVE IT UNCHANGED; it cannot be cleared — a line is never un-attributed here. ⚠️ Re-attributes the amount; a line that already names a value object then names both. The line's record (what searchValueAllocations matches on record and what usage counts read) follows: a value-center line's record becomes the new value center. An id that names no value center is VALUE_CENTER_NOT_FOUND. |
updateLines[].valueObjectId |
string | no | Id (a UUID) of the value object to attribute the amount to, from the valueObjects data-set (GET value-accounting/value-objects). OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. ⚠️ Re-attributes the amount in every value-object report. The line's record (the master-data record it is tagged for) follows: it becomes the record the new value object's CURRENT link names — its mappings open today, else the ones sharing the latest end date (a deactivated value object); an ended row of a link that moved to another record is history and does not count — and a cluster value object (several records in that set), or one with no mappings at all, leaves it with none; unless the line is tagged to its value center, which then stays its record. An id that names no value object is VALUE_OBJECT_NOT_FOUND. |
updateLines[].allocationRule |
object | null | no | The allocation rule that produced the line, as {path, id} — both parts always together. OMIT TO LEAVE IT UNCHANGED; send null to clear it. ⛔ While a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references this allocation the rule is FROZEN: a change or a clear is refused with RULE_LOCKED, because allocations have occurred under it (re-sending the stored rule is not a change). A path that is not one of the two rule kinds, or an id that is no record of that kind, is ALLOCATION_RULE_NOT_FOUND. Automatic allocation rules are not implemented yet; the rule is documentation. |
updateLines[].allocationRule.path |
string | yes | Model URN naming the kind of rule: 'urn:evst:everest:valueaccounting/base:model/node:ValueCenterAssociation' (a value-center rule) or 'urn:evst:everest:valueaccounting/base:model/node:ValueObjectAssociation' (a value-object rule). Matched exactly. |
updateLines[].allocationRule.id |
string | yes | Id (a UUID) of the rule record in the node path names. Matched case-insensitively. |
updateLines[].valueStatus |
string | no | New workflow state: 'assigned', 'allocated' or 'split'. OMIT TO LEAVE IT UNCHANGED. Documentation — moves no money. One of: "assigned", "allocated", "split". |
updateLines[].allocationType |
string | no | New origin: 'primary' or 'secondary'. OMIT TO LEAVE IT UNCHANGED. Documentation — moves no money. One of: "primary", "secondary". |
updateLines[].allocationLineType |
string | no | New reporting role. OMIT TO LEAVE IT UNCHANGED. ⚠️ This is the field that moves money: 'profit' reports the amount as revenue, 'cost' as cost, 'value' removes it from every revenue, cost and margin figure, and 'metric' marks a NON-MONETARY quantity (the hours of a time record), excluded the same way. Change it only to correct a genuinely mis-classified line; the general ledger is untouched either way. One of: "cost", "profit", "value", "metric". |
updateLines[].allocationDate |
date | no | New day recorded on the line. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED. Documentation — it cannot move the amount into another fiscal period. |
updateLines[].splitParentId |
string | no | Id (a UUID) of the line this one was split from — any line, of this allocation or another. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared — un-splitting a line is not offered. The line itself, a line deleteLines removes in the same request, or a line that descends from this one through the split parents (as the request leaves them) is INVALID_SPLIT_PARENT; an id that matches no line PARENT_LINE_NOT_FOUND. |
deleteLines |
array<string> | no | Ids (UUIDs) of lines to REMOVE — lines[].id of getValueAllocation (GET value-accounting/value-allocations/:id). Each must belong to this allocation (LINE_NOT_FOUND, LINE_MISMATCH). Refused with IN_USE while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references this allocation — removing a line would destroy the document's attribution; re-tag the financial document instead — and while a line split from one of them is not removed in the same request (judged on the lines as stored before this request). Removing the last line is allowed; the allocation then attributes nothing. Omit for no removals. |
{}
Response
200 Success
{
"data": {},
"diagnostics": [
{
"code": "<code>",
"message": "<message>",
"severity": "error",
"path": [
"<path>"
],
"details": "<details>"
}
]
}
Response headers
Idempotency-Replayed— Present andtrueonly 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 asfalse.
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
LINE_NOT_FOUND |
400 |
LINE_MISMATCH |
400 |
INVALID_SPLIT_PARENT |
400 |
PARENT_LINE_NOT_FOUND |
400 |
VALUE_OBJECT_NOT_FOUND |
400 |
VALUE_CENTER_NOT_FOUND |
400 |
ALLOCATION_RULE_NOT_FOUND |
400 |
RULE_LOCKED |
400 |
IN_USE |
400 |
ROW_ACCESS_RESTRICTED |
400 |
IDEMPOTENCY_KEY_CONFLICT |
409 |
IDEMPOTENCY_PAYLOAD_MISMATCH |
422 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND, LINE_NOT_FOUND, LINE_MISMATCH, INVALID_SPLIT_PARENT, PARENT_LINE_NOT_FOUND, VALUE_OBJECT_NOT_FOUND, VALUE_CENTER_NOT_FOUND, ALLOCATION_RULE_NOT_FOUND, RULE_LOCKED, IN_USE, ROW_ACCESS_RESTRICTED401— The request carries no valid access token.403— Not authorized404— Not found409— 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 noRetry-Afterheader.500— Internal server error