Skip to content

Workflows ​

Workflows are how most checks are started.

We have big plans for workflows in the future including them being customizable and event driven. But for now we only have basic workflows available that run single checks.

Available workflows ​

Workflow nameChecks started
kycKYC
fin-vulFinancial vulnerability
amlAML
bavBAV
tamper-detectionTamper detection on a document
tamper-liteTamper Lite on a document
content-validationContent validation on a document
anomaly-detectionAnomaly detection on a document
document-comparisonDocument comparison across the case's documents

The last five are document workflows.

Execute workflow ​

Executes a workflow on the desired case.

Endpoint/api/workflows/execute
MethodPOST
Content typeapplication/json

Fields ​

PropertyRequiredMax LengthNotes
caseId✅integer (int64)Unique CaseId to run checks for
workflowName✅The workflow to run, from Available workflows
workflowOptionsObject of key-value string pairs, workflow options listed below
externalReferenceIdempotency key, as described for AML checks

WorkflowOptions ​

PropertyValueNotes
enableOngoingMonitoringtrue or falseCurrently only available on AML. Sets whether the person should be checked recurringly.
bankAccountIdstring (the id, e.g. "789")Currently only available for BAV. ID of the bank account to verify. Get the ID via Bank Account Management.
documentIdstring (the id, e.g. "789")Required by tamper-detection, tamper-lite, content-validation and anomaly-detection. ID of the document to check. Get the ID from successDocumentIds when you upload documents, or from Get case documents.

A workflow ignores options it doesn't use.

Request ​

A request requires a case ID and a workflow name. Options depend on the workflow — for example bankAccountId for BAV:

json
{
    "caseId":"123",
    "workflowName":"bav", 
    "workflowOptions": {
        "bankAccountId": "456"
    }
}

KYC example:

json
{
    "caseId":"123",
    "workflowName":"kyc", 
    "workflowOptions": { // optional
        "enableOngoingMonitoring": "false" // optional — AML only
    },
    "externalReference": "abc123" // optional
}

Tamper Lite example, on one document:

json
{
    "caseId":"123",
    "workflowName":"tamper-lite",
    "workflowOptions": {
        "documentId": "789"
    }
}

Document comparison example, across the case's documents:

json
{
    "caseId":"123",
    "workflowName":"document-comparison"
}

Response ​

Response 200 OK

The check has been started (or, for synchronous checks like AML, completed). See Checks for the response shape of each check type. Most checks run asynchronously — poll the check endpoint or listen for the check's webhooks: completed and error.

If data the check needs is missing, the request returns a 422 (see When a check can't start) rather than a webhook being sent later.

Response 400 Bad Request

Returned if the workflow isn't enabled for your client at all (the process is switched off in your EyeDP configuration), or the request itself is malformed.

json
{
    "errors": [
        "kyc workflow not enabled for case 123"
    ]
}

A document workflow also returns 400 without a documentId, or with one that isn't a number, such as "abc":

json
{
    "errors": [
        "workflowOptions.documentId must be the id of a document on this case."
    ]
}

Send the id as a string, such as "789". A JSON number, such as 789, is rejected before the workflow runs, also with a 400, under workflowOptions.documentId (see Bad requests).

Response 409 Conflict

Returned by a document workflow when the check can't start yet, but will be able to without you changing anything: the document (or, for document-comparison, a document on the case) is still being extracted, the case is still being filled in from its uploaded documents, or the same check is already running. Nothing is started. Try again later. See When a check can't start for every reason.

json
{
    "errors": [
        "This document is still being extracted."
    ]
}

Response 422 Unprocessable Entity

Returned when the workflow is enabled, but the case doesn't currently hold enough valid information to run it — for example, no date of birth for KYC, or an invalid sort code for BAV. This is different from a 400 because while the request is well-formed, the underlying data isn't valid for the check being attempted. Add or correct the data and re-run the workflow.

Each entry in errors covers one issue. Where an issue is about a specific field, the message is prefixed with that field's name; issues about the case as a whole (no case details recorded yet, no person record, etc.) aren't prefixed.

json
{
    "errors": [
        "sort_code: Sort code must be at least 6 characters."
    ]
}

A request with multiple issues returns one entry per issue:

json
{
    "errors": [
        "GivenNames: Given name(s) are required for eKYC.",
        "DateOfBirth: Date of birth is required for eKYC."
    ]
}

Or, when the case is missing something more fundamental than a single field:

json
{
    "errors": [
        "This case has no snapshot yet."
    ]
}

What's required varies by check — see the case requirements tables on KYC, Financial vulnerability and AML, and the sort code / account number format rules on Create a bank account for BAV.

A document workflow returns 422 when the case or document needs something first, such as a document that isn't on the case:

json
{
    "errors": [
        "Document not found on this case."
    ]
}

See When a check can't start for every reason.

Document workflows ​

tamper-detection, tamper-lite, content-validation and anomaly-detection run on one document, which you name with the documentId workflow option. document-comparison runs across the case: it compares every extracted document on the case with the others and, on a person case, its Income rule reads each bank statement and payslip on its own, so it takes no documentId.

  • Each request starts only the check it names. A Tamper Lite run you start never starts or skips Tamper detection, whatever your When Tamper Lite Raises a Risk setting, so request both if you want both.
  • Your automatic check settings never stop you starting a check this way.
  • Tamper detection and Tamper Lite check each file of the document on its own, so a document with several files gets one check, and one webhook, per file.
  • externalReference is ignored.

Getting the results ​

A 200 OK means the check has started, and its body is empty. The check runs asynchronously. To get its result:

  • Listen for its completed webhook, such as tamper-lite/completed. The webhook has the checkId, the documentIds the check covers and, for the tamper checks, the file in documentAssetIds. See Document and asset ids. To hear if it ends in an error instead, also listen for its error webhook, such as tamper-lite/error.
  • Or poll Get case checks, where each check lists the documentIds it covers, then get the check by its id.
  • Or poll Get case progress, which shows each document's checks and their runs.

When a check can't start ​

Nothing is started, and errors says why.

ReasonStatusMessage
No documentId, or one that isn't a number, such as "abc". A JSON number, such as 789, gets the request validation's own 400 messages instead400workflowOptions.documentId must be the id of a document on this case.
The check isn't enabled for your client400tamper-lite workflow not enabled for case 123
The document is still being extracted (content-validation, anomaly-detection)409This document is still being extracted.
A document on the case is still being extracted (document-comparison)409Documents on this case are still being extracted.
The check is already running on the document, or on any of its files for the tamper checks, or on the case for document-comparison409This check is already in progress.
The case is being created from uploaded documents and is still being filled in from them (content-validation, document-comparison)409This case is still being filled in from its documents. Start this check once extraction has finished.
The document isn't on the case422Document not found on this case.
The document has no files (tamper-detection, tamper-lite)422No assets found on this document.
Every file on the document is a WebP (tamper-detection). A document with other files too runs Tamper detection on those and leaves the WebP files out422Tamper detection doesn't support WebP files.
Every file on the document was deleted under your file retention period (tamper-detection, tamper-lite). A document with other files too runs the check on those422This document's files were deleted under your account's file retention period, so this check can't read them.
The document was never extracted, for example because document extraction isn't enabled for your client (content-validation, anomaly-detection)422This document was never extracted, so this check has nothing to read.
The document's extraction failed (content-validation, anomaly-detection)422This document's extraction failed.
Fewer than two documents on a person case have been extracted, and none of them is a bank statement or payslip, other than one uploaded as proof of address only (document-comparison)422Document comparison needs at least two extracted documents, or one extracted bank statement or payslip that wasn't uploaded as proof of address only.
Fewer than two documents on an entity case have been extracted (document-comparison)422Document comparison needs at least two extracted documents.
The case type isn't confirmed yet (content-validation, document-comparison). Confirm it first422Confirm the case type before running this check.
The case was created from uploaded documents, but its details couldn't be filled in from them (content-validation, document-comparison). Fill them in from the Portal first422Fill in this case's details before running this check.