Opero Docs
Opero APIcompanies

Load cost invoice presentation runtime data

POST
/v1/companies/{companyId}/cost-invoices/{id}/presentation/runtime-data

Authorization

api-token
AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
companyId*string

Query Parameters

capability*string

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/cost-invoices/string/presentation/runtime-data?capability=VIEW" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "renderContext": {      "recordId": "string",      "entityId": "string",      "expand": "string"    },    "runtimeContext": {      "variables": {        "workflow": {          "activeInstanceId": "workflow_instance_123",          "stage": {            "key": "review",            "parameters": {              "canEditFinance": false            }          }        },        "actor": {          "userId": "user_123",          "membershipId": "membership_123",          "roleIds": [            "role_finance"          ]        }      }    },    "requirements": [      {        "nodeId": "node_order_lines",        "type": "related_records",        "key": "lines",        "target": {          "moduleKey": "crm",          "objectKey": "case",          "formId": "form_case_edit"        },        "params": {          "nodeId": "node_order_lines"        }      }    ],    "data": {      "node_order_lines": {        "state": "included",        "rows": []      }    },    "unavailableRequirements": [      {        "requirement": {          "nodeId": "node_order_lines",          "type": "related_records",          "key": "lines",          "target": {            "moduleKey": "crm",            "objectKey": "case",            "formId": "form_case_edit"          },          "params": {            "nodeId": "node_order_lines"          }        },        "reason": "requirement_not_in_resolved_layout"      }    ]  }}
{  "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": {}  }}