Task ListAdd and remove tasks, customise your front-end task list and remove completed items.
The task list functionality allows you to create customised action items for your users to complete and sync their out of platform actions.
The Task Object Array
The custom task list has the following attributes
Task Array
Copy //an array of task objects
{
"tasks" : [{
"name" : "Super Details" , // Name of the task
"instruction" : "Upload Super Details" , //Instruction to user
"id" : "super-details" , // custom id of task
"type" : "Template" , // type of data
"icon" : "money" // icon for task (only available on higher plans)
} ,
tasks Array
An array of objects, each of which represents a task to be completed by the user.
Create Custom Task List
Creating a custom task list for your users to complete is a great way to increase engagement and match user actions to your business objectives.
When you submit a custom task list, it replaces the default one.
Code Example
Node.js Python cURL
Copy import axios from 'axios'
axios .patch ( 'YOUR_API_URL/v1/company/tasklist' ,
headers: {
'Authorization' : 'Bearer API_KEY'
} , {
"tasks" : [{
"name" : "Super Details" ,
"instruction" : "Upload Super Details" ,
"id" : "super-details" ,
"type" : "Template" ,
"icon" : "money"
} , {
"name" : "Insurance Details" ,
"instruction" : "Upload Insurance Details" ,
"id" : "insurance-details" ,
"type" : "Template" ,
"icon" : "hospital"
}]
} .then (res => {
console .log (res);
}) .catch (err => {
console .log (err);
});
Copy import requests
url = 'YOUR_API_URL/v1/company/tasklist'
headers = { 'Authorization' : 'Bearer API_KEY' }
data = {
"tasks" : [ {
"name" : "Super Details" ,
"instruction" : "Upload Super Details" ,
"id" : "super-details" ,
"type" : "Template" ,
"icon" : "money"
}, {
"name" : "Insurance Details" ,
"instruction" : "Upload Insurance Details" ,
"id" : "insurance-details" ,
"type" : "Template" ,
"icon" : "hospital"
} ]
}
response = requests . patch (url, headers = headers, json = data)
if response . status_code == 200 :
print (response. json ())
else :
print ( f 'Error: { response.status_code } ' )
Copy curl -X PATCH -H "Authorization: Bearer API_KEY" -H "Content-Type: application/json" -d '{
"tasks": [{
"name": "Super Details",
"instruction": "Upload Super Details",
"id": "super-details",
"type": "Template",
"icon": "money"
}, {
"name": "Insurance Details",
"instruction": "Upload Insurance Details",
"id": "insurance-details",
"type": "Template",
"icon": "hospital"
}]
}' "YOUR_API_URL/v1/company/tasklist"
Request Details
Creates a custom task list for your company.
PATCH
YOUR_API_URL/v1/company/tasklist
If you would like to update an individual task you will need to send the full list with the updated task.
Request Body
200: OK Should return new custom task list
Copy {
"tasks" : [
{
"name" : "Super Details" ,
"instruction" : "Upload Super Details" ,
"id" : "super-details" ,
"type" : "Template" ,
"icon" : "money"
} ,
{
"name" : "Credit Card" ,
"instruction" : "Enter Credit Card Info" ,
"id" : "credit-card" ,
"type" : "Document" ,
"icon" : "credit-card"
}
]
}
Retrieve Custom Task List
Retrieve the custom task list for your company.
Code Example
Node.js Python cURL
Copy import axios from 'axios'
axios .get ( 'YOUR_API_URL/v1/company/tasklist' ,
headers: {
'Authorization' : 'Bearer API_KEY'
}) .then (res => {
console .log (res);
}) .catch (err => {
console .log (err);
});
Copy import requests
url = 'YOUR_API_URL/v1/company/tasklist'
headers = { 'Authorization' : 'Bearer API_KEY' }
response = requests . get (url, headers = headers)
if response . status_code == 200 :
print (response. json ())
else :
print ( f 'Error: { response.status_code } ' )
Copy curl -H "Authorization: Bearer API_KEY" "YOUR_API_URL/v1/company/tasklist"
Request Details
Retrieve the custom task list for your company.
GET
YOUR_API_URL/v1/company/tasklist
200: OK Returns custom task list for company in JSON
Copy {
"tasks" : [
{
"name" : "Super Details" ,
"instruction" : "Upload Super Details" ,
"id" : "super-details" ,
"type" : "Template" ,
"icon" : "money"
} ,
{
"name" : "Credit Card" ,
"instruction" : "Enter Credit Card Info" ,
"id" : "credit-card" ,
"type" : "Document" ,
"icon" : "credit-card"
}
]
}
Get Completed/Incomplete Tasks of User
See which of the internal application tasks the user has completed or not completed.
Code Example
Node.js Python cURL
Copy import axios from 'axios'
axios .get ( 'YOUR_API_URL/clients/:clientId/tasks?status=complete' ,
headers: {
'Authorization' : 'Bearer API_KEY'
}) .then (res => {
console .log (res);
}) .catch (err => {
console .log (err);
});
Copy import requests
url = 'YOUR_API_URL/clients/:clientId/tasks?status=complete'
headers = { 'Authorization' : 'Bearer API_KEY' }
response = requests . get (url, headers = headers)
if response . status_code == 200 :
print (response. json ())
else :
print ( f 'Error: { response.status_code } ' )
Copy curl -H "Authorization: Bearer API_KEY" "YOUR_API_URL/clients/:clientId/tasks?status=complete"
Request Details
Returns a list of completed/incomplete tasks for a client.
GET
YOUR_API_URL/clients/:clientId/tasks?status={taskStatus}
Path Parameters
ID associated with the client record.
Query Parameters
Either “complete” or “incomplete”. Defaults to complete.
200: OK Returns a list of Tasks in the tasks property.
Copy {
"tasks" : [
{
"name" : "Super Details" ,
"instruction" : "Upload Super Details" ,
"id" : "super-details" ,
"type" : "Template" ,
"icon" : "money"
} ,
{
"name" : "Credit Card" ,
"instruction" : "Enter Credit Card Info" ,
"id" : "credit-card" ,
"type" : "Document" ,
"icon" : "credit-card"
}
] ,
"query" : "complete" // returns the taskStatus in the query param
}