API Operocompanies
Rozwiąż prezentację formularza dynamicznego
Autoryzacja
api-token AutoryzacjaBearer <token>
Token Opero API. Przekaż go jako Authorization: Bearer ek_...
In: header
Parametry ścieżki
formId*tekst
ID formularza dynamicznego
companyId*tekst
Parametry zapytania
capability*tekst
recordId?tekst
ID rekordu dynamicznego dla VIEW lub EDIT.
expand?tekst
Rozdzielone przecinkami klucze pól Formularza do rozwinięcia.
Treść odpowiedzi
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/companies/string/forms/string/render?capability=CREATE"{ "data": { "form": { "id": "string", "consumerId": "string", "name": "string", "moduleKey": "string", "objectId": "string", "objectKey": "string", "recordId": "string", "capability": "CREATE" }, "contentLocalization": { "enabled": true, "languages": [ "en", "de", "fr" ], "sourceLanguage": "en", "localizableFieldKeys": [ "title", "body" ] }, "actions": [ { "key": "string", "ownerKind": "module", "ownerKey": "string", "label": "string", "description": "string", "icon": "string", "intent": "primary", "group": "lifecycle", "position": 0, "state": "available", "reasons": [ { "code": "string", "message": "string", "path": "string" } ], "payload": {} } ], "consumer": { "consumerId": "string", "consumerKind": "DYNAMIC_FORM", "runtimeScope": "ORGANIZATION", "capability": "CREATE", "renderMode": "CREATE", "catalogProfile": "string", "domainType": "string", "domainTarget": {}, "entityId": "string", "workflow": { "workflowId": "string", "instanceId": "string", "stageId": "string", "transitionIds": [ "string" ] }, "publicMode": true }, "presentation": { "layoutId": "string", "versionId": "string", "version": 3, "schemaVersion": 2, "validation": { "state": "valid", "errors": [ { "code": "string", "message": "string", "path": "string", "nodeId": "string", "mode": "VIEW", "severity": "error", "meta": {} } ], "warnings": [ { "code": "string", "message": "string", "path": "string", "nodeId": "string", "mode": "VIEW", "severity": "error", "meta": {} } ] }, "document": { "schemaVersion": 2, "regions": { "main": [] } }, "data": {}, "policy": {}, "unavailableNodes": [ {} ], "catalogVersion": "view-layout-catalog:v1", "renderContext": { "recordId": "string", "entityId": "string", "expand": "string" }, "dataRequirements": [ { "nodeId": "node_order_lines", "type": "related_records", "key": "lines", "target": { "moduleKey": "crm", "objectKey": "case", "formId": "form_case_edit" }, "params": { "nodeId": "node_order_lines" } } ], "renderData": { "strategy": "included_primary_and_lazy_secondary", "record": { "id": "record_123", "status": "open" }, "entity": null, "form": { "id": "form_case_edit", "type": "EDIT" }, "permissions": { "canEdit": true }, "context": { "moduleKey": "crm", "objectKey": "case", "formId": "form_case_edit" }, "data": { "node_order_lines": { "state": "deferred" } } }, "scripts": [ { "id": "string", "key": "string", "type": "string", "executionMode": "SYNC", "dependencies": { "scripts": [ { "key": "string", "id": "string", "status": "RESOLVED" } ], "queries": [ { "key": "string", "id": "string", "status": "RESOLVED" } ], "actions": [ { "key": "string", "id": "string", "status": "RESOLVED" } ] }, "code": "string", "updatedAt": "2019-08-24T14:15:22Z" } ], "workflow": { "targetType": "SALES_INVOICE", "targetId": "string", "instances": [ { "id": "string", "organizationId": "string", "workflowId": "string", "workflow": { "id": "string", "key": "string", "name": "string", "description": "string" }, "targetType": "SALES_INVOICE", "targetId": "string", "currentStageId": "string", "currentStage": { "id": "string", "key": "string", "name": "string", "taskName": "string", "description": "string", "color": "string", "icon": "string", "position": 0, "isInitial": true, "isTerminal": true, "isReadOnly": true, "parameters": {}, "editAccessConfig": { "mode": "everyone", "overrideEditors": { "membershipIds": [ "string" ], "roleIds": [ "string" ] } }, "transitionAccessConfig": { "mode": "assignee" }, "actionAccessConfig": { "hiddenActions": [ "string" ] }, "isActive": true }, "startedByUserId": "string", "authorUserId": "string", "currentAssigneeMembershipId": "string", "currentAssigneeRoleId": "string", "assignees": [ { "type": "membership", "id": "string" } ], "dueAt": "2019-08-24T14:15:22Z", "metadata": {}, "startedSnapshot": { "label": "string", "summary": {} }, "startedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "cancelledAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "availableTransitions": [ { "id": "string", "key": "string", "name": "string", "description": "string", "fromStageId": "string", "toStageId": "string", "position": 0, "color": "string", "icon": "string", "requiredComment": true, "visibilityConfig": { "logic": "AND", "conditions": [ { "logic": "AND", "conditions": [], "key": "amount_present", "value1": "{{ record.snapshot.summary.status }}", "operator": "EQUALS", "value2": "APPROVED", "reason": "Amount must be present before approving.", "field": "status", "value": {} } ], "key": "amount_present", "value1": "{{ record.snapshot.summary.status }}", "operator": "EQUALS", "value2": "APPROVED", "reason": "Amount must be present before approving.", "field": "status", "value": {} }, "conditionConfig": { "logic": "AND", "conditions": [ { "logic": "AND", "conditions": [], "key": "amount_present", "value1": "{{ record.snapshot.summary.status }}", "operator": "EQUALS", "value2": "APPROVED", "reason": "Amount must be present before approving.", "field": "status", "value": {} } ], "key": "amount_present", "value1": "{{ record.snapshot.summary.status }}", "operator": "EQUALS", "value2": "APPROVED", "reason": "Amount must be present before approving.", "field": "status", "value": {} }, "eventConfig": { "rules": [ { "ruleId": "string", "triggerType": "MANUAL", "data": {} } ], "scripts": [ { "scriptId": "string", "type": "BEFORE_WORKFLOW_TRANSITION", "enabled": true, "priority": 0, "config": {} } ] }, "isActive": true, "toStageKey": "string", "toStageName": "string", "toStage": { "id": "string", "key": "string", "name": "string", "color": "string", "icon": "string", "assignmentMode": "single" }, "assignment": { "mode": "none", "assignee": { "type": "membership", "id": "string" }, "assignees": [ { "type": "membership", "id": "string" } ], "candidates": { "membershipMode": "specific", "membershipIds": [ "string" ], "roleIds": [ "string" ] } }, "availability": { "canExecute": true, "blockedReason": "string", "conditionResult": { "passed": true, "failedConditionKey": "string", "reason": "string", "debug": {} } }, "scripts": [ { "id": "string", "key": "string", "type": "string", "executionMode": "SYNC", "dependencies": { "scripts": [ { "key": "string", "id": "string", "status": "RESOLVED" } ], "queries": [ { "key": "string", "id": "string", "status": "RESOLVED" } ], "actions": [ { "key": "string", "id": "string", "status": "RESOLVED" } ] }, "code": "string", "updatedAt": "2019-08-24T14:15:22Z" } ], "scriptContext": { "workflow": {}, "transition": {}, "record": {}, "event": {}, "user": {} } } ], "permissions": { "canEdit": true, "editBlockedReason": "EDIT_PERMISSION_REQUIRED", "canTransition": true, "transitionBlockedReason": "NOT_ASSIGNEE", "canDelete": true, "deleteBlockedReason": "DELETE_PERMISSION_REQUIRED", "canView": true }, "currentTask": { "id": "string", "status": "OPEN", "title": "string", "assignee": { "type": "membership", "id": "string" }, "assignees": [ { "type": "membership", "id": "string" } ], "reassignmentCandidates": { "membershipMode": "specific", "membershipIds": [ "string" ], "roleIds": [ "string" ] }, "canReassign": true, "dueAt": "2019-08-24T14:15:22Z", "openedAt": "2019-08-24T14:15:22Z" } } ], "startableWorkflows": [ { "id": "string", "organizationId": "string", "key": "string", "name": "string", "description": "string", "targets": [ { "id": "string", "type": "SALES_INVOICE", "config": {}, "targetHash": "string" } ], "status": "DRAFT", "isSystemTemplateCopy": true, "templateSourceId": "string", "currentPublicationId": "string", "publishedAt": "2019-08-24T14:15:22Z", "publishedByUserId": "string", "hasDraft": true, "draftUpdatedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "selectedInstanceId": "string", "activeInstanceId": "string", "hiddenInstanceCount": 0, "warnings": [ { "code": "string", "message": "string" } ], "permissions": { "canEdit": true, "editBlockedReason": "EDIT_PERMISSION_REQUIRED", "canTransition": true, "transitionBlockedReason": "NOT_ASSIGNEE", "canDelete": true, "deleteBlockedReason": "DELETE_PERMISSION_REQUIRED", "canView": true } }, "scriptBindings": [ { "id": "string", "scriptId": "string", "hook": "optionFilter", "target": { "nodeId": "string", "fieldKey": "string", "actionId": "string", "regionKey": "string" }, "enabled": true, "priority": 0, "config": {} } ], "runtimeContext": { "variables": {} } } }}{ "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": {} }}