## 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:

• If the updated data is not used in any checks: No further action is required.

• 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.

• 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.

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

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",
"variant": {
"id": "ddc72ea7-6e45-cc3b-dc52-30a94b9ec8c2",
"alias": "pep_declaration_form",
"name": "PEP declaration form",
}
},
{
"check_ids": [ ],
"creation_date": "2020-03-09 12:18:40",
"form_instance_ids": [ ],
"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",
}
}
]

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, for example, 3d7a333c-418d-72a1-007b-06854dbb28eb.

#### 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

#### Get the task ID or alias

First, 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 in Get the task ID.

### Tip

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".

#### Create the new task version

Next, create a new task version and make a request to the following endpoint.

### Important

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 typeRequiredString Sample value:INDIVIDUAL_VERIFY_IDENTITYFor a full list of task types, see Add a task to a profile in the developer resources. The task type for the new version. variantRequiredObject See the following sample request body for a sample value. Object that indicates the task variant for the new version. variant.aliasRequiredStringThis 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.idRequiredStringThis 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' \
--data-raw '{
"type": "INDIVIDUAL_VERIFY_IDENTITY",
"variant": {
"alias": "forexo_verify_identity"
}
}'

When copying the following samples, 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",
}
}

#### 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.

### Note

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