Opero Docs
Opero APIcompanies

Query Dynamic Form relation-table rows

POST
/v1/companies/{companyId}/forms/{formId}/records/{recordId}/relation-tables/{relationFieldKey}/query

Authorization

api-token
AuthorizationBearer <token>

Opero API token. Send it as Authorization: Bearer ek_...

In: header

Path Parameters

formId*string

Dynamic Form ID

recordId*string
relationFieldKey*string
companyId*string

Query Parameters

capability*string
expand?string

Comma-separated Form field keys to expand.

targetCapability?string

Target row capability. Defaults to VIEW.

targetFormId?string

Explicit target Dynamic Form ID. When omitted, the target object configured default is used.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/companies/string/forms/string/records/string/relation-tables/string/query?capability=CREATE" \  -H "Content-Type: application/json" \  -d '{    "columns": [      "name",      "quantity",      "product.name",      "product.sku"    ]  }'
{  "data": {    "layout": {      "id": "layout_123",      "versionId": "version_123",      "catalogProfile": "DYNAMIC_OBJECT",      "mode": "VIEW",      "moduleKey": "crm",      "objectKey": "invoice_line",      "formId": "line-view-form"    },    "fields": [      {        "nodeId": "block_line_name",        "fieldId": "field_name_id",        "fieldKey": "name",        "label": "Name",        "type": "LINES",        "options": {},        "resolvedOptions": {          "state": "ready",          "source": "sql_query",          "queryId": "query_123",          "data": [            {              "value": "prod_1",              "label": "Product A"            }          ],          "meta": {            "hasMore": false          }        },        "config": {},        "editable": false,        "isRequired": false      }    ],    "columns": [      {        "path": "product.name",        "label": "Product / Name",        "type": "LINES",        "source": "row",        "editable": true,        "nodeId": "block_line_name",        "fieldKey": "name",        "fieldId": "field_name_id"      }    ],    "records": [      {        "id": "rec_1",        "values": {}      }    ],    "meta": {      "page": 1,      "limit": 20,      "total": 100,      "hasMore": true    }  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}