## Using Passfort

This developer guide takes you through the steps to add a task note in the Passfort API 4.0.

Notes provide a place to save text and files that aren't related to a check.

For example, you can:

• Record conversations or actions that took place outside of Passfort.

• Upload files like a PEP declaration form.

### Select a profile

First, choose any profile to add the application to, and get the profile's ID number, for example, a2c4393a-e219-67a4-5ab4-2186952e9038. You'll need it to make the request in the next step.

If you haven't created the profile yet, see the steps in Create profiles (API).

You can also create a profile via the portal. To get the profile ID, view the profile in the portal and copy the string of letters and numbers after /onboarding/ in the URL.

Next, to get a list of all tasks on a profile, make a request to this 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.

### To include a file, add it to the profile

The image id is returned in the response. You'll need it for the next step.

### Create the note

Lastly, to create the note, make a request to this endpoint:

Request endpoint:

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

Body parameters:

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

 Key Value Description attachmentsOptionalArray of objects See the sample request body below for a sample value. Array of objects where each object corresponds to one image from the profile's files. attachments.idRequiredString Sample value: a7a57663-8d1b-c45b-73e2-19616ce0ebe5 The unique identifier for a document image. textOptionalString Sample value: PEP declaration form completed 11/03/2020. The text in the note. author_nameOptionalString Sample value: Morgan Rose The name of the author of the note.If you include this parameter, "custom name" is displayed next to the author's name in the portal.If you do not include this parameter, the API key name is displayed as the author's name in the portal.

In this example, we'll create a note that includes text plus the example file from the previous step. We'll specify that the note was added by a user name Morgan Rose.

Sample request body:

{
"author_name": "Morgan Rose",
"text": "PEP declaration form completed 11/03/2020.",
"attachments": [
{
"id": "a7a57663-8d1b-c45b-73e2-19616ce0ebe5"
}
]
}

Sample response:

{
"attachments": [
{
"id": "a7a57663-8d1b-c45b-73e2-19616ce0ebe5"
}
],
"author_name": "Morgan Rose",
"author_name_customised": true,
"created_on": "2020-03-11 12:20:36",
"id": "22db2182-63d2-11ea-ac4a-f2b994e5d9cc",
"text": "PEP declaration form completed 11/03/2020."
}

To learn how to see or delete task notes, see the developer resources.