Set Reserves
Sets the expected total for one (event, reserved category) scope — the
reserves.set action, an ABSOLUTE “set expected total to X” (never a
delta): the reserve position becomes X − paid-to-date. The previous
total and the delta are recorded server-side under the scope’s lock —
clients never author them.
expectedTotalCents is user display cents — the magnitude a user would
type; the category’s expectedDirection orients it. Read the scope’s
current total with
entity balances.
X itself is unconstrained. The only law a reserve scope’s amounts
obey is the identity Reserves + Paid = Expected Total, and the identity
holds at every sign. A set below the scope’s paid-to-date is a legal,
meaningful state (200): the remaining reserve reads NEGATIVE — the
books’ honest statement that more has moved than the estimate says the
scope is worth, and the difference is expected to come back (or the
estimate to be corrected later). The server never blocks it.
No If-Match. Reserve writes serialize on the scope’s lock instead
of an invoice watermark.
Signature preconditions (422). The category must be configured,
reserved, and live (UNKNOWN_ID / NOT_RESERVED_CATEGORY /
DEPRECATED_CONFIG — deprecation blocks new sets, never resets); the
reserve date must not be in the future (FUTURE_DATE).
Idempotency. actionId is a client-minted uuid — an identical retry
replays the original outcome; reuse with a different payload is
409 ACTION_ID_REUSED. Setting the same total again with a FRESH
actionId is a defined zero-row no-op (journaled, delta 0).
Required permission: company.payment:update
Authorizations
API key authentication. Send your raw API key as the Authorization header value with NO scheme prefix — Authorization: YOUR-API-KEY. Do NOT prefix it with Bearer or ApiKey, and do not use an X-API-Key header; those are not accepted.
Path Parameters
Company identifier
Event identifier — an unknown event is 404
A configured RESERVED transaction category — discover ids with GET /api/v1/companies/{companyId}/financials/config/categories
Body
Client-minted idempotency key — becomes the action's journal id. An identical retry replays the original outcome; reuse with a different payload is 409 ACTION_ID_REUSED
The scope's new ABSOLUTE expected total, in user display cents (never a delta). Unconstrained — a value below the scope's paid-to-date is legal and leaves the remaining reserve negative
The reserve date (ISO YYYY-MM-DD); must not be in the future
Optional display label for the source system's author (e.g. the integrator-side user). Stamped as the journal record's display attribution; the acting principal stays the External API service user, so a label can never impersonate an in-app user. Ignored on idempotent replays
1 - 255Free-text memo
Response
The scope's refreshed expected total
The response of a reserve write: the emitted journal id(s) plus the scope's NEW expected total — the number a reserves.set to the same value would be a no-op against.
Every journal id the action emitted — the actionId you supplied first, then any companion batch it composed
1The scope's event, echoed
The scope's reserved category, echoed
The scope's expected total AFTER the write, in user display cents (the magnitude a user would type; the category's expectedDirection orients it)
