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.

Create milestone

Creates a new opportunity milestone

The body must contain an object with a single property milestone which must be a milestone.

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,
    "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

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 update 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

List milestones

The collection of all the milestones on this Capsule account.

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

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 milestones.

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,
    "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,
    "createdAt" : "2014-10-30T16:12:41Z",
    "updatedAt" : "2014-10-30T16:12:41Z"
  }, {
    "id" : 3,
    "name" : "Won",
    "description" : null,
    "complete" : true,
    "probability" : 100,
    "createdAt" : "2014-10-30T16:12:41Z",
    "updatedAt" : "2015-12-03T09:42:29Z"
  }, {
    "id" : 4,
    "name" : "Lost",
    "description" : null,
    "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

Show 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.

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,
    "createdAt" : "2017-03-30T22:19:15Z",
    "updatedAt" : "2017-03-30T22:19:15Z"
  }
}

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 category.

POST
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,
    "createdAt" : "2017-03-30T22:19:15Z",
    "updatedAt" : "2017-03-30T22:32:33Z"
  }
}