Track

Capsule Tracks provide a simple way to define a sequence of tasks for things you do in your business. To create a track you first need a track definition which defines the standard set of tasks that can be applied to projects or opportunities.

For a full description of the models see Track definitions and Tracks.

List tracks

List tracks for a specific project or opportunity. The entity parameter inside the URL must be opportunities or kases and defines which tracks to return.

GET
https://api.capsulecrm.com/api/v2/{entity}/{entityId}/tracks

Query Parameters

Name Type Description
embed Array of String

Can be used to request additional data that aren’t included in the response by default. If provided, should be a comma separated list of strings. Supported values for this endpoint are task (tasks on the track). Read more about embed.

page Integer

The page of results to return. Default: 1

perPage Integer

The number of entities to return per page. Value must be between 1 and 100. Default: 50

Response

Returns HTTP status code 200. The body of the response will contain an object with a single property tracks which is an array of Track objects.

HTTP/1.1 200
Link: <https://api.capsulecrm.com/api/v2/kases/4/tracks?page=2>; rel="next"
{
  "tracks" : [ {
    "id" : 23,
    "tasks" : [ {
      "id" : 80,
      "description" : "First review"
    }, {
      "id" : 81,
      "description" : "Escalate to Management Team"
    }, {
      "id" : 82,
      "description" : "Escalate to Regulator"
    } ],
    "description" : "Complaint Process (Important)",
    "direction" : "START_DATE",
    "trackDateOn" : "2016-01-01"
  } ]
}

Headers:

Name Type Description
Link String

Links to the next and previous pages, encoded as defined in RFC 5988.

Show track

Show a specific track.

GET
https://api.capsulecrm.com/api/v2/tracks/{trackId}

Query Parameters

Name Type Description
embed Array of String

Can be used to request additional data that aren’t included in the response by default. If provided, should be a comma separated list of strings. Supported values for this endpoint are task (tasks on the track). Read more about embed.

Response

Returns HTTP status code 200. The body of the response will contain an object with a single property track which will contain a Track object.

HTTP/1.1 200
{
  "track" : {
    "id" : 1,
    "tasks" : [ {
      "id" : 2,
      "description" : "First review"
    }, {
      "id" : 3,
      "description" : "Escalate to Management Team"
    }, {
      "id" : 4,
      "description" : "Escalate to Regulator"
    } ],
    "description" : "Complaint Process",
    "direction" : "START_DATE",
    "trackDateOn" : "2015-07-31"
  }
}

Create track

Applies a Track definition to a project or opportunity to create a track.

POST
https://api.capsulecrm.com/api/v2/tracks
          {
  "track" : {
    "description" : "Complaint Process (Important)",
    "trackDateOn" : "2016-01-01",
    "kase" : 4,
    "definition" : 1
  }
}
        

Query Parameters

Name Type Description
embed Array of String

Can be used to request additional data that aren’t included in the response by default. If provided, should be a comma separated list of strings. Supported values for this endpoint are task (tasks on the track). Read more about embed.

Response

Returns HTTP status code 201. The body of the response will contain the track as it was stored in Capsule. Some of the properties used when applying the track are "write-only" and will not be included in the response.

HTTP/1.1 201
Location: https://api.capsulecrm.com/api/v2/tracks/11587
{
  "track" : {
    "id" : 23,
    "tasks" : [ {
      "id" : 80,
      "description" : "First review"
    }, {
      "id" : 81,
      "description" : "Escalate to Management Team"
    }, {
      "id" : 82,
      "description" : "Escalate to Regulator"
    } ],
    "description" : "Complaint Process (Important)",
    "direction" : "START_DATE",
    "trackDateOn" : "2016-01-01"
  }
}

Headers:

Name Type Description
Location String

The URL that identifies the new track.

Update track

Updates basic details about the track - only description and trackDateOn can be modified by this endpoint.

PUT
https://api.capsulecrm.com/api/v2/tracks/{trackId}
          {
  "track" : {
    "description" : "Complaint Process (Important)",
    "trackDateOn" : "2016-01-01"
  }
}
        

Query Parameters

Name Type Description
embed Array of String

Can be used to request additional data that aren’t included in the response by default. If provided, should be a comma separated list of strings. Supported values for this endpoint are task (tasks on the track). Read more about embed.

Response

Returns HTTP status code 200. All good

HTTP/1.1 200
{
  "track" : {
    "id" : 1,
    "tasks" : [ {
      "id" : 2,
      "description" : "First review"
    }, {
      "id" : 3,
      "description" : "Escalate to Management Team"
    }, {
      "id" : 4,
      "description" : "Escalate to Regulator"
    } ],
    "description" : "Complaint Process (Important)",
    "direction" : "START_DATE",
    "trackDateOn" : "2016-01-01"
  }
}

Delete track

Remove track and related tasks from project or opportunity.

DELETE
https://api.capsulecrm.com/api/v2/tracks/{trackId}

Response

Returns HTTP status code 204. Returns status code 204 with an empty body if the track was successfully deleted.

HTTP/1.1 204