Capsule API

Task API

Data Reference

Task

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
    <
id>729</id>
    <
description>meet with customer</description> <!-- required -->
    <
category>Meeting</category> <!-- Optional -->
    <
dueDate>2010-02-24T00:00:00Z</dueDate
        <!-- 
Required when no time set on task -->
    <
dueDateTime>2010-02-24T15:00:00Z</dueDateTime
        <!-- 
Required when time is set on task -->
    <
owner>phillip</owner
        <!-- 
optionaldefaults to authenticated user -->
    <
partyId>1</partyId> <!-- read-only -->
    <
partyName>Eric Jones</partyName> <!-- read-only -->
    <
opportunityId>2</opportunityId> <!-- read-only -->
    <
opportunityName>CRM System</opportunityName> <!-- read-only -->
    <
caseId>3</caseId> <!-- read-only -->
    <
caseName>Invoicing</caseName> <!-- read-only -->
</
task

Get Task

GET /api/task/{task-id}

Retrieve a single task by id.

List Tasks

GET /api/tasks[?start={start}][&limit={limit}][&category={category}][&user={user}]

Retrieve a list of tasks. Optionally the results can be limited or paged using the parameters &limit and &start.

  • {user} - filter tasks by assigned user name
  • {category} - filter tasks by assigned category

Complete a Task

POST /api/task/{task-id}/complete

Mark task as complete.

Re-Open a Task

POST /api/task/{task-id}/reopen

Reopen a previously completed task.

List Tasks for Person or Organisations

GET /api/party/{party-id}/tasks

Retrieve tasks for people or organisations.

<?xml version="1.0" encoding="UTF-8"?>
<tasks size="2">
    <
task>
        ...    
    </
task>
    <
task>
        ...    
    </
task>
</
tasks

Add Party Task

POST /api/party/{party-id}/task

Create a new task related to a Person or Organisation.

Example request:

<?xml version="1.0"?>
<task>
    <
description>Call customer</description>
    <
dueDateTime>2010-04-21T15:00:00Z</dueDateTime>
</
task

Example response:

HTTP/1.1 201 Created
Location
https://sample.capsulecrm.com/api/task/59 

List Tasks for Opportinities

GET /api/opportunity/{opportunity-id}/tasks

Retrieve tasks for opportunities.

Add Opportunity Task

POST /api/opportunity/{opportunity-id}/task

Create a new task related to an Opportunity.

Example request:

<?xml version="1.0"?>
<task>
    <
description>Call customer</description>
    <
dueDateTime>2010-04-21T15:00:00Z</dueDateTime>
</
task

Example response:

HTTP/1.1 201 Created
Location
https://sample.capsulecrm.com/api/task/59 

List Tasks for Cases

GET /api/kase/{case-id}/tasks

Retrieve tasks for cases.

Add Cases Task

POST /api/kase/{case-id}/task

Create a new task related to a Case.

Example request:

<?xml version="1.0"?>
<task>
    <
description>Update time sheets</description>
    <
dueDateTime>2010-04-21T15:00:00Z</dueDateTime>
</
task

Example response:

HTTP/1.1 201 Created
Location
https://sample.capsulecrm.com/api/task/59 

Add Task

POST /api/task

Create a new task unrelated to a Party, Organisation or Case.

Example request:

<?xml version="1.0"?>
<task>
    <
description>Update time sheets</description>
    <
dueDateTime>2010-04-21T15:00:00Z</dueDateTime>
</
task

Example response:

HTTP/1.1 201 Created
Location
https://sample.capsulecrm.com/api/task/59 

Update Task

PUT /api/task/{id}

Update the task. Only the elements that are being changed need to be supplied; unset elements will remain unchanged.

Example request:

<?xml version="1.0"?>
<task>
    <
description>Update time sheets</description>
    <
dueDate>2010-04-21T00:00:00Z</dueDate>
</
task

Delete Task

DELETE /api/task/{id}

Capsule is a service of Zestia Ltd which is a company registered in England with company number 06418281. © 2008-2012 Zestia Ltd. All Rights Reserved.