v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Update Lead Status

Updates the status and substatus of an existing lead. You can have status as OPEN (for new lead), WON (for a successful purchase lead), LOST (for unreverted lead), ON_HOLD, DELETED.

put/leads/{leadId}/status

Request body

status'OPEN' | 'WON' | 'LOST' | 'ON_HOLD' | 'DELETED' required

Status for which you want to add sub-status.

subStatusstring

Name of the new sub-status that you want to create.

reasonIdstring required

Reason id that you want to associate to the lead.

createdByinteger

Entity id of the staff who created the lead.

createdOnstring date

Date and time of lead creation in YYYY-MM-DDThh:mm:ssTZD format. Example: 2018-10-05T08:00:00+05:30

Response

200

idinteger
userIdinteger
typestring
leadForstring
statusstring
nextFollowUpstring
createdOnstring
createdByinteger
lastUpdatedOnstring
lastUpdatedByinteger
orgSourceIdinteger
subStatusstring

Example response

{
  "id": 2,
  "userId": 368754334,
  "type": "SKU",
  "leadFor": "item001",
  "status": "ON_HOLD",
  "nextFollowUp": "2018-10-05T08:00:00+05:30",
  "createdOn": "2018-10-04T13:30:00+05:30",
  "createdBy": 28812689,
  "lastUpdatedOn": "2019-04-15T14:58:39+05:30",
  "lastUpdatedBy": 15002926,
  "followUpDetails": [
    {
      "id": 3,
      "userId": 368754334,
      "leadId": 2,
      "notes": "notes 1",
      "createdBy": 15002926,
      "createdOn": "2018-12-06T17:36:28+05:30",
      "followedUpBy": 28812689,
      "followedUpOn": "2018-10-04T12:45:00+05:30",
      "scheduledFollowUp": "2018-10-04T12:30:00+05:30"
    }
  ],
  "statusLogDetails": [
    {
      "id": 4,
      "userId": 368754334,
      "leadId": 2,
      "status": "OPEN",
      "createdBy": 15002926,
      "createdOn": "2018-12-06T17:36:28+05:30",
      "reasonId": 1,
      "reason": "Item not available in store"
    }
  ],
  "orgSourceId": -1,
  "extendedFields": {
    "trial_status": "Not Done"
  },
  "subStatus": "YetToDecide"
}