workflow.canComplete
Check Workflow data against account configured required information.
POST http://api.kompliant.com/workflow.canComplete (OpenAPI specification)
Usage Info
Validate that a workflow has all required information to be completed, including control prong owners, primary bank accounts, calculated pricing, and complete entity data.
This method is only supported for Workflows of type BUSINESS_APPLICATION.
Request
Authentication: KSig1-HMAC-SHA256
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Yes | The identifier for the Workflow. |
Example
{
"workflow_id": "w_7h1EpxerrZQyLnRC1EQ9Ck",
}
Response
Data
| Parameter | Type | Description |
|---|---|---|
| can_complete | boolean | Specifies whether the Workflow can be completed or not. |
| missing_requirements | array of objects | The missing requirements attribute is defined in the table below. |
Missing Requirements Parameters
| Parameter | Type | Description |
|---|---|---|
| code | string | Type of the missing requirement. One of WORKFLOW_REQUIREMENTS. |
| entity_type | string | Entity type related to the missing requirement. |
| entity_id | string | Identifier for the entity with the missing requirement. |
| message | string | A descriptive message explaining the missing requirement. |
| related_methods | array | Methods that can be used to fulfill this requirement. |
| fields | array | When the missing requirement is of type FIELDS_REQUIRED, this represent the list of fields missing from the specified entity. |
Example without missing requirements
{
"meta": {
"status": "SUCCESS",
"trace_id": "trc_6zNzQZHSf26V83BO3uW6dS",
"version": "2025-03-24"
},
"data": {
"can_complete": true
}
}
Example with missing requirements
{
"meta": {
"status": "SUCCESS",
"trace_id": "trc_6zNzQZHSf26V83BO3uW6dS",
"version": "2025-03-24"
},
"data": {
"can_complete": false,
"missing_requirements": [
{
"code": "STARTED_WORKFLOW_REQUIRED",
"entity_type": "Workflow",
"message": "Workflow with `STARTED` state is required.",
"related_methods": [
"workflow.start"
]
},
{
"code": "CONTROL_PRONG_REQUIRED",
"entity_type": "BusinessOwner",
"message": "Business owner with `CONTROL_PRONG` ownership type is required.",
"related_methods": [
"person.create",
"business.addOwner"
]
},
{
"code": "FIELDS_REQUIRED",
"entity_type": "BusinessOwner",
"entity_id": "bo_6GO8a3o0K5TuzyPCgaXTIn",
"message": "Business owner `bo_6GO8a3o0K5TuzyPCgaXTIn` is missing fields",
"related_methods": [
"businessOwner.update"
],
"fields": [
"email",
"first_name",
"middle_name",
"last_name",
"date_of_birth",
"ssn",
"ownership_percentage",
"ownership_length",
"title",
"citizenship",
"phone_number",
"address.line1",
"address.line2",
"address.city",
"address.state",
"address.postal_code",
"address.country"
]
},
{
"code": "PRIMARY_BANK_ACCOUNT_REQUIRED",
"entity_type": "BusinessBankAccount",
"message": "Business bank account with `PRIMARY` purpose is required.",
"related_methods": [
"bankAccount.create",
"business.addBankAccount"
]
},
{
"code": "FIELDS_REQUIRED",
"entity": "BankAccount",
"entity_id": "ba_1TDoIGVG390ZOEWfNN0z5x",
"message": "Bank account `ba_1TDoIGVG390ZOEWfNN0z5x` is missing fields",
"related_endpoints": [
"bankAccount.update"
],
"fields": [
"bank_routing_number",
"bank_account_type"
]
},
{
"code": "FIELDS_REQUIRED",
"entity": "BusinessBankAccount",
"entity_id": "bba_2I1ISsWEQia02V9tfolNJB",
"message": "Business bank account `bba_2I1ISsWEQia02V9tfolNJB` is missing fields",
"related_endpoints": [
"business.updateBankAccount"
],
"fields": [
"bank_account_purposes"
]
},
{
"code": "CALCULATED_PRICING_REQUIRED",
"entity": "Workflow",
"entity_id": "w_yEIOPSFalooab1S9se7kj",
"message": "Pricing for workflow `w_yEIOPSFalooab1S9se7kj` has not been calculated.",
"related_endpoints": [
"workflow.pricing.calculate"
]
}
]
}
}
Errors
| Error Code | HTTP Code | Possible Cause |
|---|---|---|
| BAD_REQUEST | 400 | Required parameters not provided. |
| ENTITY_NOT_FOUND | 400 | The workflow_id provided does not exist. |
| SYSTEM_RULE_VIOLATION | 400 | System rule violations are described below |
System Rule Violations
When a SYSTEM_RULE_VIOLATION error occurs, the response will include additional entity_type and sub_code fields to provide more specific information:
| Entity Type | Sub-code | Description |
|---|---|---|
| Workflow | INVALID_WORKFLOW_TYPE | The method is not supported for the current Workflow type. |
| Workflow | WORKFLOW_ENDED | The Workflow is in an ENDED state and cannot be validated. |
Updated 4 months ago