Browse the extensions reference

Set Allocation Override

post/extensions/roboledger/{graph_id}/operations/set-allocation-override

Part of RoboLedger: Ledger & Events.

Set the outside owners' share of a member's result for one month in place of the pro-rata share its ownership percentage gives: a preferred return, a waterfall, a special allocation. Give the share as an amount in cents (negative for a share of a loss) or as a percentage of the month's result, with the basis; clear removes it. preview- and propose-consolidation-entries then use it for that month, and their basis says so. Only for a member consolidated in full, and refused in a month the consolidation entity has closed.

Idempotency: supply an Idempotency-Key header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

Authentication

Authenticate in any one of these ways — not all of them:

  • API key in the X-API-Key header.
  • Bearer token in the Authorization header.

Path parameters

NameTypeDescription
graph_idrequiredstringGraph Id

Constraints: matches ^(kg[a-f0-9]{16,}(?:_[a-zA-Z0-9]{1,20})?|sec(?:_[a-zA-Z0-9]{1,20})?|library)$

Header parameters

NameTypeDescription
Idempotency-KeyoptionalstringIdempotency-Key

Request body

Required, application/json.

FieldTypeDescription
entity_idrequiredstring

The member, consolidated in full.

periodrequiredstring

The month, as YYYY-MM.

Constraints: matches ^\d{4}-(0[1-9]|1[0-2])$

amountoptionalinteger

The outside owners' share of the month's result, in cents; negative for a share of a loss.

percentageoptionalnumber

The outside owners' share as a percentage of the month's result.

Constraints: 0–100

basisoptionalstring

Why the share differs from the ownership percentage; required to set one.

clearoptionalboolean

Remove the month's override, back to the pro-rata share.

Default: false

Example request

curl
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/set-allocation-override" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "entity_id": "string",
  "period": "string"
}'

Responses

200 Successful Response

FieldTypeDescription
operationrequiredstring

Kebab-case operation name

operationIdrequiredstring

op_-prefixed ULID for audit and SSE correlation

statusrequiredstring

Operation lifecycle state

One of: completed, pending, failed

resultoptionalAllocationOverrideResponse

Command-specific result payload

AllocationOverrideResponse fields
FieldTypeDescription
entity_idrequiredstring

The member.

periodrequiredstring

The month, as YYYY-MM.

amountoptionalinteger

The share, in cents, when set so.

percentageoptionalnumber

The share as a percentage, when set so.

basisoptionalstring

Why it differs from pro rata.

set_byoptionalstring

Who set it.

clearedoptionalboolean

True when the override was removed.

Default: false

atrequiredstring

ISO-8601 UTC timestamp

createdByoptionalstring

User ID that initiated the operation

idempotentReplayoptionalboolean

True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.

Default: false

StatusMeaning
400Invalid request
401Authentication required
403Access denied
404Resource not found
409Idempotency-Key conflict — key reused with different body
422Validation error
429Rate limit exceeded
500Internal server error