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 Lost Reason model definition.

List lost reasons

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

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

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 Reason objects.

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 specific 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 lost reason.

The body must contain an object with a single property lostReason which must be a Lost Reason object. This operation requires the authenticated user has an Administrator role on the Capsule account.

POST
https://api.capsulecrm.com/api/v2/lostreasons
          {
  "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/lostreasons/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 object. Fields that are not included in the request will remain unchanged. This operation requires the authenticated user has an Administrator role on the Capsule account.

PUT
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 reason from the Capsule account. Lost Reasons may not be immediately deleted and may be kept for reporting on historical records, however you will not be able to select a lost reason marked for deletion on a new opportunity or while updating an opportunity. This operation requires the authenticated user has an Administrator role on 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