Milestone

A milestone is a recognizable point in the completion of an opportunity. Using milestones, users can keep track of how their new business is moving through the sales pipeline. These endpoints allow you to retrieve, create and update milestones for this user's account. For a full description of the model see the Milestone model definition.

List milestones

The collection of all the milestones on the oldest active pipeline. This endpoint remains for backwards compatibility purposes. To list milestones on a specific pipeline, use the list milestones by pipeline endpoint.

GET
https://api.capsulecrm.com/api/v2/milestones

Query Parameters

Name Type Description
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 milestones which is an array of Milestone objects.

HTTP/1.1 200
Link: <https://api.capsulecrm.com/api/v2/milestones?page=2>; rel="next"
{
  "milestones" : [ {
    "id" : 1,
    "name" : "New",
    "description" : "You have a potential buyer for your offering",
    "complete" : false,
    "probability" : 10,
    "daysUntilStale" : 12,
    "createdAt" : "2014-10-30T16:12:41Z",
    "updatedAt" : "2015-12-03T09:38:54Z"
  }, {
    "id" : 2,
    "name" : "Bid",
    "description" : "You have put forward a bid for your offering",
    "complete" : false,
    "probability" : 50,
    "daysUntilStale" : 12,
    "createdAt" : "2014-10-30T16:12:41Z",
    "updatedAt" : "2014-10-30T16:12:41Z"
  }, {
    "id" : 3,
    "name" : "Won",
    "complete" : true,
    "probability" : 100,
    "createdAt" : "2014-10-30T16:12:41Z",
    "updatedAt" : "2015-12-03T09:42:29Z"
  }, {
    "id" : 4,
    "name" : "Lost",
    "complete" : true,
    "probability" : 0,
    "createdAt" : "2014-10-30T16:12:41Z",
    "updatedAt" : "2016-04-07T14:20:44Z"
  } ]
}

Headers:

Name Type Description
Link String

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

List milestones by pipeline

List milestones associated with a pipeline.

GET
https://api.capsulecrm.com/api/v2/pipelines/{pipelineId}/milestones

Query Parameters

Name Type Description
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 milestones which is an array of Milestone objects.

HTTP/1.1 200
Link: <https://api.capsulecrm.com/api/v2/pipelines/10/milestones?page=2&perPage=2>; rel="next"
{
  "milestones" : [ {
    "id" : 1,
    "name" : "Prospect",
    "description" : "The potential buyer has shared a goal or a problem with you",
    "complete" : false,
    "probability" : 5,
    "pipeline" : {
      "name" : "SMB clients",
      "id" : 10
    },
    "daysUntilStale" : 10,
    "createdAt" : "2021-09-16T14:52:44Z",
    "updatedAt" : "2021-09-16T14:52:44Z"
  }, {
    "id" : 2,
    "name" : "Bid",
    "complete" : false,
    "probability" : 10,
    "pipeline" : {
      "name" : "SMB clients",
      "id" : 10
    },
    "daysUntilStale" : 12,
    "createdAt" : "2021-09-16T09:21:37Z",
    "updatedAt" : "2021-09-16T09:21:37Z"
  } ]
}

Headers:

Name Type Description
Link String

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

Show milestone

Show a specific milestone.

GET
https://api.capsulecrm.com/api/v2/milestones/{milestoneId}

Response

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

HTTP/1.1 200
{
  "milestone" : {
    "id" : 17,
    "name" : "Prospect",
    "description" : "The potential buyer has shared a goal or a problem with you",
    "complete" : false,
    "probability" : 10,
    "daysUntilStale" : 12,
    "createdAt" : "2017-03-30T22:19:15Z",
    "updatedAt" : "2017-03-30T22:19:15Z"
  }
}

Create milestone

Creates a new opportunity milestone. The body must contain an object with a single property milestone which must be a Milestone object.

POST
https://api.capsulecrm.com/api/v2/milestones
          {
  "milestone" : {
    "name" : "Prospect",
    "description" : "The potential buyer has shared a goal or a problem with you",
    "probability" : 10
  }
}
        

Response

Returns HTTP status code 201. The body of the response will contain the milestone as it was stored in Capsule.

HTTP/1.1 201
Location: https://api.capsulecrm.com/api/v2/milestones/17
{
  "milestone" : {
    "id" : 17,
    "name" : "Prospect",
    "description" : "The potential buyer has shared a goal or a problem with you",
    "complete" : false,
    "probability" : 10,
    "daysUntilStale" : 12,
    "createdAt" : "2017-03-30T22:19:15Z",
    "updatedAt" : "2017-03-30T22:19:15Z"
  }
}

Headers:

Name Type Description
Location String

The URL that identifies the new milestone.

Update milestone

Update the name, description or probability of a milestone. The body must contain an object with a single property milestone which must be a Milestone object.

PUT
https://api.capsulecrm.com/api/v2/milestones/{milestoneId}
          {
  "milestone" : {
    "description" : "The potential buyer is interested in buying your product",
    "probability" : 25
  }
}
        

Response

Returns HTTP status code 200. The body of the response will contain the milestone as it was stored in Capsule.

HTTP/1.1 200
{
  "milestone" : {
    "id" : 17,
    "name" : "Prospect",
    "description" : "The potential buyer is interested in buying your product",
    "complete" : false,
    "probability" : 25,
    "daysUntilStale" : 12,
    "createdAt" : "2017-03-30T22:19:15Z",
    "updatedAt" : "2017-03-30T22:32:33Z"
  }
}

Delete milestone

Removes a milestone from the Capsule account. You cannot delete a milestone while it is still being used on an opportunity. First you need to change or remove the milestone on all such opportunities.

DELETE
https://api.capsulecrm.com/api/v2/milestones/{milestoneId}

Response

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

HTTP/1.1 204