Show Task

Retrieve the details of a specified task.

GET /api/task/:task-id

Response

  • partyId and partyName - included on tasks created for a party
  • opportunityId and opportunityName - included on tasks created for a opportunity
  • caseId and caseName - included on tasks created for a case
  • dueDate included where the task has no due time during the day
  • dueDateTime included where the task is due at a specific time
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
  <id>100</id>
  <dueDate>2012-02-24T00:00:00Z</dueDate>
  <category>Meeting</category>
  <partyName>Eric Jones</partyName>
  <description>Meet with customer</description>
  <owner>a.user</owner>
  <detail>Meeting at Coffee shop</detail>
  <partyId>1</partyId>
</task>{
  "task": {
    "id": "100",
    "dueDate": "2012-02-24T00:00:00Z",
    "category": "Meeting",
    "partyName": "Eric Jones",
    "description": "Meet with customer",
    "owner": "a.user",
    "detail": "Meeting at Coffee shop",
    "partyId": "1"
  }
}

Show as JSONShow as XML

List Open Tasks

The collection of opens tasks.

GET /api/tasks

The collection of opportunities can be filtered using one of the following filters on the URL.

  • ?category= retrieve only tasks in selected category - URL encoded
  • ?user= retrieve only tasks assigned to selected selected username - URL encoded

The results can also be paginated using the following options

  • &start= first record to be returned. The results start with an index of 0.
  • &limit= the maximum number of matching records to be returned

Response

HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tasks>
  <task>...</task>
  <task>...</task>
</tasks>{
  "tasks": {
    "task": [
      "...",
      "..."
    ]
  }
}

Show as JSONShow as XML

Add a Task

Add a task.

POST /api/task

Or to add the task to a party, opportunity or case.

POST /api/party/:party-id/task
POST /api/opportunity/:opportunity-id/task
POST /api/kase/:case-id/task

Request

  • description - task description
  • category optional task category
  • dueDate or dueDateTime required date or date time the tasks is due
  • owner optional, if not supplied the authenticated user will be used; see users for available options
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
  <dueDateTime>2012-04-21T15:00:00Z</dueDateTime>
  <description>Call customer</description>
</task>{
  "task": {
    "dueDateTime": "2012-04-21T15:00:00Z",
    "description": "Call customer"
  }
}

Show as JSONShow as XML

Response

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

Update a Task

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

PUT /api/task/:task-id

Request

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
  <dueDateTime>2012-04-21T15:00:00Z</dueDateTime>
  <description>Update time sheets</description>
</task>{
  "task": {
    "dueDateTime": "2012-04-21T15:00:00Z",
    "description": "Update time sheets"
  }
}

Show as JSONShow as XML

Response

HTTP/1.1 200 OK

Delete Task

Delete a specific task.

DELETE /api/task/:task-id

Response

HTTP/1.1 200 OK

Mark task as complete.

POST /api/task/:task-id/complete

Response

HTTP/1.1 200 OK

Re-Open a Task

Reopen a previously completed task.

POST /api/task/:task-id/reopen"

Response

HTTP/1.1 200 OK

List of Task Categories

List of Task Categories configured for the account.

GET /api/task/categories

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<taskCategories>
  <taskCategory>Call</taskCategory>
  <taskCategory>Email</taskCategory>
  <taskCategory>Follow-up</taskCategory>
  <taskCategory>Meeting</taskCategory>
  <taskCategory>Milestone</taskCategory>
  <taskCategory>Send</taskCategory>
</taskCategories>{
  "taskCategories": {
    "taskCategory": [
      "Call",
      "Email",
      "Follow-up",
      "Meeting",
      "Milestone",
      "Send"
    ]
  }
}

Show as JSONShow as XML