API Reference - Tasks

Tasks within Trackops are not required to be connected to a case or a subject.

Listing Tasks

Returns a collection of task records, optionally filtered by the available request parameters.

GET /api/v1/tasks

 

Available Request Parameters:

Name Type Required Description
id integer no ID of the task.
title string no Title/name of the task.
calendar integer no ID of the calendar the event is assigned to.
case integer no ID of the case connected to this task.
subject integer no ID of the subject associated with this task.
user integer no ID of the user assigned to this task.
status string no Choices: "none", "needs_action", "in_progress", "complete"

(see explanation of statuses below)
due_from date no Task is due on or after the date (Alias: From).
due_to date no Task is due on or before the date (Alias: To).
complete_from timestamp no Task was completed on or after the date.
complete_to timestamp no Task was completed on or before the date.
alert_from timestamp no Event alert is scheduled on or after the date.
alert_to timestamp no Event alert is scheduled on or before the date.
alert_sent_from timestamp no Event alert was delivered on or after the date.
alert_sent_to timestamp no Event alert was delivered on or before the date.
created_from timestamp no Created on or after the date, as determined by the system.
created_to timestamp no Created on or before the date, as determined by the system.
updated_from timestamp no Updated on or after the date, as determined by the system.
updated_to timestamp no Updated on or before the date, as determined by the system.

Note: All timestamp parameters are queried and returned in UTC.

Explanation of Statuses

  • none - There is no status defined (this is the default status).
  • needs_action - The task requires action to be taken.
  • in_progress - Work on this task is currently being performed.
  • complete - The task has been completed.

Getting a Task

Returns a single task record, based on the numeric ID.

GET /api/v1/tasks/{task_id}

Creating a Task

Creates a new task based on the given criteria. Upon success, returns a task object. See the example request at the bottom of this section for a better idea of how a fully formed request should look.  

POST /api/v1/tasks

 

Available Parameters

Name Type Required Description
casefile_id integer yes The ID of the case this event is connected to.
calendar_id integer yes The ID of the calendar associated with this event.
subject_id integer no The ID subject that this event is connected to.  Note: The subject must be connected to the same `casefile_id` as the event.
case_service_id integer no The ID of the case service being performed on this event.
due_on
datestamp yes The due date of the task.
title string yes The name of the event.
body string no The description and/or notes for the event.
address
address no

An address object, with the following properties:

  • address_1 - Line 1 of the street address.
  • address_2 - Line 2 of the street address.
  • address_3 - Line 3 of the street address.
  • city - The city of the address.
  • state - The 2 or 3 character state or province code of the address (if applicable)
  • zip - The zip or postal code of the address.
  • country - The 2-character country code of the address.

Note: See below for an address reference.

users_list collection no An array of staff IDs that should be assigned to this event.

 

Address Field Object Reference

Addresses are comprised of an `address` object with a collection of properties.  The two fields to pay close attention to are the `state` and `country` fields.  Both of these may have specific requirements.

State

Country

Example Address Object

 "address": {
"address_1": "2000 Blake Street",
"address_2": "",
"address_3": "",
"city": "Denver",
"state": "CO",
"zip": 80202,
"country": "US"
}

 

Example New Task Request

A new task is created by POSTing a JSON object to the specified end point using the above criteria.  The JSON object must contain the required fields (as shown above) and must be nested under a task object.  See the following example request:

{
"task": {
"casefile_id": 245,
"subject_id": 209,
"case_service_id": 1,
"calendar_id": 1,
"due_on": "2023-02-14",
"alert_at": "2023-02-01",
"title": "Test API Task",
"body": "this is a test task from the API",
"address": {
"address_1": "2000 Blake Street",
"address_2": "",
"address_3": "",
"city": "Denver",
"state": "CO",
"zip": 80202
},
"users_list": [1, 2, 3]
}
}

Note: The above request is for demonstration purposes only, your implementation will require unique data provided by your account.

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request