Record Ownership Change
/extensions/roboledger/{graph_id}/operations/record-ownership-changePart of RoboLedger: Ledger & Events.
Record the parent buying more of a member consolidated in full from its outside owners, or selling some of it to them while keeping control: the share it holds from a month (ownership_pct, staying 50 or more) and the price in cents, with the basis. It sets the member's share from that month and writes a draft in the consolidation entity, dated the month's first day, that its close posts: ASC 810 makes it an equity transaction with no gain or loss. Buying, the price above the book value of the capital bought goes against the investment, the share bought of the member's results since it joined comes out of the outside owners' interest, and the difference is the parent's equity. Selling, the parent's own entry takes the proceeds against the carrying amount of the shares sold and books its gain or loss; the draft reverses that gain, releases the parent's cost above book on those shares, credits the outside owners their larger share of the member's results, and takes the difference to the parent's equity. preview-consolidation-entries then reads the price paid, net of what a sale released, as part of the parent's investment, and the new share from that month. Changes are recorded in order; recording a month again replaces its draft, and a posted one is reversed first. A change across consolidation methods is not supported yet.
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-Keyheader. - Bearer token in the
Authorizationheader.
Path parameters
| Name | Type | Description |
|---|---|---|
graph_idrequired | string | Graph Id Constraints: matches |
Header parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Keyoptional | string | Idempotency-Key |
Request body
Required, application/json.
| Field | Type | Description |
|---|---|---|
entity_idrequired | string | The member, consolidated in full. |
periodrequired | string | The month, as YYYY-MM. Constraints: matches |
ownership_pctrequired | number | The parent's share from Constraints: at most 100; greater than 0 |
considerationrequired | integer | Cents the parent paid the outside owners for the shares, or received from them for shares sold. Its line names them, not the member, which is why it is given here. Constraints: at least 0 |
basisrequired | string | The purchase or sale agreement, or what sets the price. Constraints: at least 1 character |
Example request
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/record-ownership-change" \
-H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
-H "Idempotency-Key: <Idempotency-Key>" \
-H "Content-Type: application/json" \
-d '{
"entity_id": "string",
"period": "string",
"ownership_pct": 0,
"consideration": 0,
"basis": "string"
}'Responses
200 Successful Response
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationrequired | string | Kebab-case operation name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operationIdrequired | string | op_-prefixed ULID for audit and SSE correlation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
statusrequired | string | Operation lifecycle state One of: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resultoptional | OwnershipChangeResponse | Command-specific result payload OwnershipChangeResponse fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
atrequired | string | ISO-8601 UTC timestamp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdByoptional | string | User ID that initiated the operation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
idempotentReplayoptional | boolean | True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions. Default: |
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Authentication required |
| 403 | Access denied |
| 404 | Resource not found |
| 409 | Idempotency-Key conflict — key reused with different body |
| 422 | Validation error |
| 429 | Rate limit exceeded |
| 500 | Internal server error |