Lost Reason

Lost reasons allow users to record the reason an opportunity is lost and report on them. These endpoints allow you to retrieve, create and update lost reasons for this user's account. For a full description of the model see the Milestone model definition.

List lost reasons

The collection of all the lost reasons on this Capsule account.

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

Response

Returns HTTP status code 200. The body of the response will contain an object with a single property lostReasons which is an array of lost reasons.

HTTP/1.1 200
{
  "lostReasons" : [ {
    "id" : 99,
    "name" : "Abandoned",
    "includedForConversion" : false,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }, {
    "id" : 100,
    "name" : "Poor Qualification",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }, {
    "id" : 101,
    "name" : "Wrong time",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }, {
    "id" : 102,
    "name" : "No Authority",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }, {
    "id" : 103,
    "name" : "Price too high",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }, {
    "id" : 104,
    "name" : "Became Stale",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }, {
    "id" : 105,
    "name" : "Competition",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  } ]
}

Show lost reason

Show a specified lost reason.

GET
https://api.capsulecrm.com/api/v2/lostreasons/{lostReasonId}

Response

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

HTTP/1.1 200
{
  "lostReason" : {
    "id" : 100,
    "name" : "Poor Qualification",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }
}

Create lost reason

Creates a new opportunity milestone

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

POST
https://api.capsulecrm.com/api/v2/lostreaons
          {
  "lostReason" : {
    "name" : "Poor Qualification",
    "includedForConversion" : true
  }
}
        

Response

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

HTTP/1.1 201
Location: https://api.capsulecrm.com/api/v2/lostreason/100
{
  "lostReason" : {
    "id" : 100,
    "name" : "Poor Qualification",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }
}

Headers:

Name Type Description
Location String

The URL that identifies the new lost reason

Update lost reason

Update the name and inclusion in conversion calculation of lost reason. The body must contain an object with a single property lostReason which must be a lost reason. Fields that are not included in the request will remain unchanged.

POST
https://api.capsulecrm.com/api/v2/lostreasons/{lostReasonId}
          {
  "lostReason" : {
    "name" : "Poor Qualification",
    "includedForConversion" : true
  }
}
        

Response

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

HTTP/1.1 200
{
  "lostReason" : {
    "id" : 100,
    "name" : "Poor Qualification",
    "includedForConversion" : true,
    "createdAt" : "2018-10-09T14:33:26Z",
    "updatedAt" : "2018-10-09T14:33:26Z"
  }
}

Delete lost reason

Removes a lost reasons from the capsule account.

DELETE
https://api.capsulecrm.com/api/v2/lostreasons/{lostReasonId}

Response

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

HTTP/1.1 204