Rerun due diligence checks when collected data changes

If the profile's collected_data is updated, you may wish to take one of the following actions, depending on the nature of the updates:

  1. If the updated data is not used in any checks: No further action is required.
  2. If the updates are minor (e.g. correcting a typo): You may wish to manually run the relevant due diligence checks again on the current task version. This keeps all the check results visible to portal users at once.
  3. If the updates are major (e.g. a name change): You may wish to create a new version of the task and run the checks there. This enables portal users to clearly see the new check results are based on new data sets and the old check results are no longer valid.

Run checks on the current task version

The first step is to get the task ID so you have it to run the check.

1. Get the task ID

You can get a list of all tasks on a profile by making a request to the endpoint below.

Request endpoint:

GET https://api.passfort.com/4.0/profiles/{profile_id}/tasks

Sample response:

[
{
"check_ids": [ ],
"creation_date": "2020-03-09 12:18:40",
"form_instance_ids": [ ],
"id": "3d7a333c-418d-72a1-007b-06854dbb28eb",
"is_complete": false,
"is_expired": false,
"is_skipped": false,
"state": "INCOMPLETE",
"type": "COMPANY_MANUAL_TASK",
"variant": {
"id": "ddc72ea7-6e45-cc3b-dc52-30a94b9ec8c2",
"alias": "pep_declaration_form",
"name": "PEP declaration form",
"task_type": "COMPANY_MANUAL_TASK"
}
},
{
"check_ids": [ ],
"creation_date": "2020-03-09 12:18:40",
"form_instance_ids": [ ],
"id": "72aadb55-8b02-8495-d6b0-e1627ec23612",
"is_complete": true,
"is_expired": false,
"is_skipped": false,
"state": "COMPLETED_PASS",
"type": "COMPANY_IDENTIFY_OFFICERS",
"variant": {
"id": "5562c4e4-4d12-b16a-a151-7c9eed6816e9",
"alias": "identify_officers",
"name": "Identify officers",
"task_type": "COMPANY_IDENTIFY_OFFICERS"
}
}
]

Each object returned corresponds to one task. In the sample response above, the profile has two tasks.

Find the task you want to update by looking at the variant.alias of the task and making sure it matches the alias of the task you want to add the note to. If there is more than one task with the same alias (which happens when a task has more than one version), use the task with "is_expired": "false".

Get the id for the task you want to add the note to (e.g. 3d7a333c-418d-72a1-007b-06854dbb28eb).

2. Run the check

The steps to run the check manually depend on the check type.

To learn more about the endpoint to run a check, see Run a check in the Developer Resources.

To get step-by-step instructions for each check type, see the Developer Guides.

Run checks on a new task version

1. Get the task ID or alias

You'll need the task ID or alias to create a new version of the task.

To get this information, make a call to the endpoint described above: Get the task ID.

It's better to get the alias because it will stay the same even when you switch between your demo environment and your live environment. If there is more than one task with the same alias (which happens when a task has more than one version), use the task with "is_expired": "false".

2. Create the new task version

To create a new task version, make a request to the endpoint below.

If a task is configured with an expiry date for its versions, the date will be reset when you create the new version.

Request endpoint:

POST https://api.passfort.com/4.0/profiles/{profile_id}/tasks

Body parameters:

When you make the POST request, include the following parameters in the body.

Key

Value

Description

type

Required

String

Sample value:

INDIVIDUAL_VERIFY_IDENTITY

For a full list of task types, see Add a task to a profile in the Developer Resources.

The task type for the new version.

variant

Required

Object

Note that if you do not want to create a new task version, this key is optional.

For a sample value, see the sample request below.

Object that indicates the task variant for the new version.

variant.alias

Required

String

This key is optional if variant.id is provided, but we recommend sending the alias whenever possible.

Sample value:

forexo_verify_identity

The task alias.

If there is more than one task with the same alias (which happens when a task has more than one version), use the task where is_expired is false.

variant.id

Required

String

This key is optional if variant.alias is provided.

Sample value:

6cceb65e-d86b-11e9-b8b6-7a5deda3a0a3

The unique identifier for the task.

Sample request

In this example, we'll create a new version of the Verify identity task.

Sample request body:

{
"type": "INDIVIDUAL_VERIFY_IDENTITY",
"variant": {
"alias": "forexo_verify_identity"
}
} Sample cURL command:
curl --location --request POST 'https://api.passfort.com/4.0/profiles/a2c4393a-e219-67a4-5ab4-2186952e9038/tasks' \
--header 'apikey: adc5788e3b7fecc161d2a36916750ee10480a8c75841bd' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "INDIVIDUAL_VERIFY_IDENTITY",
"variant": {
"alias": "forexo_verify_identity"
}
}'
When copying the samples below, replace the alias and (if using the cURL command) the API key and profile ID with your own data.
Sample response

We can see in the response that the new version has been created.

Sample response:

{
"check_ids": [ ],
"creation_date": "2020-08-04 14:04:08",
"form_instance_ids": [ ],
"id": "ea565b55-47d9-1858-4588-3a22a3838707",
"is_complete": false,
"is_expired": false,
"is_skipped": false,
"state": "INCOMPLETE",
"type": "INDIVIDUAL_VERIFY_IDENTITY",
"variant": {
"alias": "forexo_verify_identity",
"id": "ddc72ea7-6e45-cc3b-dc52-30a94b9ec8c2",
"name": "Verify identity",
"task_type": "INDIVIDUAL_VERIFY_IDENTITY"
}
}

3. Run the check (if required)

It's now possible to run checks on the new version.

If you have the check configured as an automatic check, it is run automatically now and you do not need to instruct it manually.

To instruct a check manually, see the Developer Guides to get step-by-step instructions for each check type or see Run a check in the Developer Resources to learn more about the endpoint.

It is not possible to run checks on the old task version.


How did we do?


Powered by HelpDocs (opens in a new tab)