Browse the API reference

Link Entity to Taxonomy

post/extensions/roboledger/{graph_id}/operations/link-entity-taxonomy

Part of Extensions: RoboLedger.

Link the graph's entity to a taxonomy. Idempotent — returns existing linkage if it already exists. CoA blocks auto-link at create time; use this only to switch the primary CoA or link a reporting extension / custom ontology explicitly.

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

Header parameters

NameTypeDescription
Idempotency-KeyoptionalstringIdempotency-Key

Request body

Required, application/json.

FieldTypeDescription
taxonomy_idrequiredstring

The taxonomy to link to.

basisoptionalstring

Linkage role: `chart_of_accounts` (the entity's CoA), `reporting` (reporting standard like us-gaap), `mapping` (CoA→reporting rollup), `schedule` (schedule structure).

One of: reporting, chart_of_accounts, mapping, schedule

Default: chart_of_accounts

is_primaryoptionalboolean

Mark this as the primary linkage for the basis. False allows secondary attachments (e.g. parallel reporting standards).

Default: true

adoption_contextoptionalstring

Why the entity is reporting under this taxonomy (e.g. 'voluntary', 'regulatory', 'lender_requirement').

Default: voluntary

Example request

curl
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/link-entity-taxonomy" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
  "basis": "chart_of_accounts",
  "taxonomy_id": "tax_acme_coa"
}'

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

resultoptionalEntityTaxonomyResponse

Command-specific result payload

EntityTaxonomyResponse fields
FieldTypeDescription
entity_idrequiredstring

The entity that was linked.

taxonomy_idrequiredstring

The taxonomy that was linked.

basisrequiredstring

Linkage role (see request).

is_primaryrequiredboolean

Whether this is the primary linkage.

adoption_contextoptionalstring

Adoption context recorded at link time.

atrequiredstring

ISO-8601 UTC timestamp

createdByoptionalstring

User ID that initiated the operation (null for legacy callers)

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