Add a note to a task
You can use the API to add notes to task.
To add a note to a task in the API:
Choose a profile 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.Tip
To get the profile ID, view the profile in the portal and copy the string of letters and numbers after
/onboarding/in the URL.If you haven't created the profile yet, see the steps in Create profiles (API). You can also create a profile using the portal.
Make a call to the following endpoint to get a list of tasks on a profile.
GET https://{api_region}/4.0/profiles/{profile_id}/tasksReplace
{api_region}with the API URL specific to your region. Useapi.us.maxsight.comfor the US region,api.eu.maxsight.comfor the EU region, orapi.ae.maxsight.comfor the UAE region.Each object returned corresponds to one task. In the following sample response, the profile has two 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" } } ]Get the
idfor the task you want to add the note to, for example,3d7a333c-418d-72a1-007b-06854dbb28eb.Find the task you want to update by looking at the
variant.aliasof the task and making sure it matches the alias of the task you want to add the note to.Use the task with
"is_expired": "false"if there is more than one task with the same alias, which happens when a task has more than one version.
To include a file, add it to the profile. The image
idis returned in the response.To create the note, make a request to the following endpoint.
POST https://{api_region}/4.0/profiles/{profile_id}/tasks/{task_id}/notesReplace
{api_region}with the API URL specific to your region. Useapi.us.maxsight.comfor the US region,api.eu.maxsight.comfor the EU region, orapi.ae.maxsight.comfor the UAE region.When you make the
POSTrequest, you can include the following parameters in the body.Body parameters:
Key
Value
Description
attachmentsOptional
array of objects
See the following sample request body for a sample value.
Array of objects where each object corresponds to one image from the profile's
files.attachments.id*Required
string
Sample value:
a7a57663-8d1b-c45b-73e2-19616ce0ebe5The unique identifier for a document image.
textOptional
string
Sample value:
PEP declaration form completed 11/03/2020.The text in the note.
author_nameOptional
string
Sample value:
Morgan RoseThe 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.