Developer Center

Tasks API

Last Updated: Oct 03, 2018 04:15PM CEST

URL

/api/tasks

Description

Allows you to fetch, create or update tasks assigned for users with optional due dates and association to clients.

Methods

GET Tasks

Allows retrieving tasks that can be filtered by user key or client key.

Parameters

username The username of the user to which the task is assigned to
clientId The id of the client to which the task is linked to
groupId The id of the group to which the task is linked to
status The task status: (OPEN, COMPLETED, OVERDUE) - if not provide defaulted to OPEN

Usage examples

//get 100 tasks from the organisation
GET api/tasks&offset=0&limit=100

//get the tasks for the client with id 16 - OPEN tasks fetched if no status is specified
GET api/tasks?clientid=16

//get all completed tasks for the client with id 16
GET api/tasks?clientid=16&status=COMPLETED

//get the tasks paginated for the client with id 16
GET api/tasks?clientid=16&offset=0&limit=2

//get the tasks paginated for the user with the username demo
GET  api/tasks?username=demo

Samples responses

//get 2 tasks from Mambu system
[
   {
      "encodedKey":"8a33ae49441c4fe101441c71580403a5",
      "id":1,
      "creationDate":"2014-02-10T15:36:34+0000",
      "lastModifiedDate":"2014-02-10T15:36:34+0000",
      "dueDate":"2014-02-11T15:36:34+0000",
      "title":"Create a new client",
      "description":"Create a new client named John Smith with home phone (35)325-069 and address 123 Home Street",
      "createdByUserKey":"8a33ae49441c4fe101441c5fe42f0005",
      "status":"OPEN",
      "daysUntilDue":-7,
      "createdByFullName":"Max Power",
      "assignedUserKey":"8a33ae49441c4fe101441c5fe42f0005"
   },
   {
      "encodedKey":"8a33ae49441c4fe101441c71581203a6",
      "id":2,
      "creationDate":"2014-02-10T15:36:34+0000",
      "lastModifiedDate":"2014-02-10T15:36:34+0000",
      "dueDate":"2014-02-12T15:36:34+0000",
      "title":"Disburse your first loan",
      "description":"Disburse a $200 loan for a client.",
      "createdByUserKey":"8a33ae49441c4fe101441c5fe42f0005",
      "status":"OPEN",
      "daysUntilDue":-6,
      "createdByFullName":"Max Power",
      "assignedUserKey":"8a33ae49441c4fe101441c5fe42f0005"
   }
]

POST Tasks using URL-encoding

Create a task with a title and description and assign it to a user, associate with an object and given it an optional due date for completion. The update can be done only by using JSON POST

Parameters for URL-Encoded calls

title Tittle of the task. Required.
username Username of the user to whom the task should be assigned. Required.
clientID ID of the client to associate with this task.
groupID ID of the group to associate with this task.
duedate When the task is due to be completed. Required.
description Full rich text detailed description of the task beyond the title.

URL-Encoded calls usage example

//create a task to review a loan for client id '64' due on 2011-06-16
POST "title=Review Loan&duedate=2011-06-16&username=demo&clientid=64&description=Please check the automatically created loan application for this client." /api/tasks/

Parameters for JSON calls

Create and update tasks. If the encoded key will be provided an update will be executed.
encodedKey EncodedKey of the task to update.
id ID of the task. The parameter cannot be empty if the parameter itself is provided.
creationDate The creation date of the task.
lastModifiedDate The last modified date for the task.
dueDate The due date for the task. Required.
completionDate The completion date of the task.
title The task title. Required.
description The task description.
assignedUserKey The assigned user key. Required
createdByUserKey The key of the user that created the task.
status The task status (possible values: OPEN, COMPLEDED).
taskLinkKey The key of the client/group that is linked to this task. If null, means nobody is linked to this task. he parameter cannot be empty if the parameter itself is provided.
taskLinkType The type of task link(possible values: CLIENT, GROUP)
 

Usage

//POST create a task
{
   "task":{
      "dueDate":"2014-02-11T15:36:34+0000",
      "title":"Create a new client",
      "description":"Create a new client named John Smith with home phone (44)333-8989 and address 123 Main Street",
      "status":"OPEN",
      "assignedUserKey":"8a33ae49441c4fe101441c5fe42f0005"
   }
}
//POST update a task
{
   "task":{
      "encodedKey":"8a33ae49441c4fe101441c71581203a6",
      "dueDate":"2014-02-12T15:36:34+0000",
      "title":"Disburse your first loan",
      "description":"Disburse a $200 loan for a client.",
      "status":"OPEN",
      "assignedUserKey":"8a33ae49441c4fe101441c5fe42f0005"
   }
}

Response

A 201 Response is returned if the task was successfully created/updated.
{
   "task":{
      "encodedKey":"8a33ae49441c4fe101441c71581203a6",
      "id":2,
      "creationDate":"2014-02-10T15:36:34+0000",
      "lastModifiedDate":"2014-02-10T15:36:34+0000",
      "dueDate":"2014-02-12T15:36:34+0000",
      "title":"Disburse your first loan",
      "description":"Disburse a $200 loan for a client.",
      "createdByUserKey":"8a33ae49441c4fe101441c5fe42f0005",
      "status":"OPEN",
      "daysUntilDue":8,
      "assignedUserKey":"8a33ae49441c4fe101441c5fe42f0005"
   }
}

DELETE Tasks

Allows the deletion of tasks based on task id/encodedkey

Usage example

//delete a task based on id
DELETE /api/tasks/2
//delete a task based on encoded key
DELETE /api/tasks/8a33ae49441c4fe101441c71581203a6

Response

A success return code will be returned when the deletion is successful.
{
    "returnCode":0,
    "returnStatus":"SUCCESS"
}
support@mambu.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete