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

ParameterTypeRequiredDescription
workflow_idstringYesThe identifier for the Workflow.

Example

{
  "workflow_id": "w_7h1EpxerrZQyLnRC1EQ9Ck",
}

Response

Data

ParameterTypeDescription
can_completebooleanSpecifies whether the Workflow can be completed or not.
missing_requirementsarray of objectsThe missing requirements attribute is defined in the table below.

Missing Requirements Parameters

ParameterTypeDescription
codestringType of the missing requirement. One of WORKFLOW_REQUIREMENTS.
entity_typestringEntity type related to the missing requirement.
entity_idstringIdentifier for the entity with the missing requirement.
messagestringA descriptive message explaining the missing requirement.
related_methodsarrayMethods that can be used to fulfill this requirement.
fieldsarrayWhen 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 CodeHTTP CodePossible Cause
BAD_REQUEST400Required parameters not provided.
ENTITY_NOT_FOUND400The workflow_id provided does not exist.
SYSTEM_RULE_VIOLATION400System 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 TypeSub-codeDescription
WorkflowINVALID_WORKFLOW_TYPEThe method is not supported for the current Workflow type.
WorkflowWORKFLOW_ENDEDThe Workflow is in an ENDED state and cannot be validated.