🗒️Task List

Add 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
//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

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);
    });

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.

Headers

NameTypeDescription

Authorization*

String

Bearer <API_KEY>

Request Body

NameTypeDescription

tasks*

Array

An array of task objects

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

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);
});

Request Details

Retrieve the custom task list for your company.

GET YOUR_API_URL/v1/company/tasklist

Headers

NameTypeDescription

Authorization*

String

Bearer <API_KEY>

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

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);
});

Request Details

Returns a list of completed/incomplete tasks for a client.

GET YOUR_API_URL/clients/:clientId/tasks?status={taskStatus}

Path Parameters

NameTypeDescription

clientId*

String

ID associated with the client record.

Query Parameters

NameTypeDescription

taskStatus

String

Either “complete” or “incomplete”. Defaults to complete.

Headers

NameTypeDescription

Authorization*

String

Bearer <API_KEY>

{
	"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
}

Last updated