Build Fact Grid
/extensions/roboledger/{graph_id}/operations/build-fact-gridPart of Extensions: RoboLedger.
Queries LadybugDB Fact nodes by element qnames or canonical concepts, with filters for periods, entities, form, and fiscal context. Returns deduplicated facts plus the aspects they span — arranging them into a table is the consumer's job, since collapsing cells safely requires the full aspect signature. Works on both roboledger tenant graphs (post-materialization) and the SEC shared repository.
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 |
Header parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Keyoptional | string | Idempotency-Key |
Request body
Required, application/json.
| Field | Type | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elementsoptional | string[] | Element qnames (e.g., 'us-gaap:Assets'). Can combine with canonical_concepts. | |||||||||||||||||||||||||||||||||
canonical_conceptsoptional | string[] | Canonical concept names (e.g., 'revenue', 'net_income'). Matches all mapped qnames. | |||||||||||||||||||||||||||||||||
periodsoptional | string[] | Period end dates (YYYY-MM-DD format) | |||||||||||||||||||||||||||||||||
entityoptional | string | Filter by entity ticker, CIK, or name | |||||||||||||||||||||||||||||||||
entitiesoptional | string[] | Filter by multiple entity tickers (e.g., ['NVDA', 'AAPL']) | |||||||||||||||||||||||||||||||||
formoptional | string | Filter by SEC filing form type (e.g., '10-K', '10-Q') | |||||||||||||||||||||||||||||||||
fiscal_yearoptional | integer | Filter by fiscal year (e.g., 2024) | |||||||||||||||||||||||||||||||||
fiscal_periodoptional | string | Filter by fiscal period (e.g., 'FY', 'Q1', 'Q2', 'Q3') | |||||||||||||||||||||||||||||||||
period_typeoptional | string | Filter by period type: 'annual', 'quarterly', or 'instant' | |||||||||||||||||||||||||||||||||
include_summaryoptional | boolean | Include summary statistics per element Default: | |||||||||||||||||||||||||||||||||
limitoptional | integer | Maximum facts to return. Applied after deduplication and sorting, so truncation keeps the most recent periods. Check `metadata.truncated` to see whether more facts matched. Default: | |||||||||||||||||||||||||||||||||
view_configoptional | ViewConfig | Aspect scoping configuration ViewConfig fields
|
Example request
curl -X POST "https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/build-fact-grid" \
-H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
-H "Idempotency-Key: <Idempotency-Key>" \
-H "Content-Type: application/json" \
-d '{
"elements": [
"us-gaap:Assets"
],
"entities": [
"NVDA"
],
"form": "10-K",
"period_type": "annual"
}'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 | ViewResponse | Command-specific result payload ViewResponse fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
atrequired | string | ISO-8601 UTC timestamp | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdByoptional | string | User ID that initiated the operation (null for legacy callers) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 |