Reset a Lead

This API allows you to delete (reset) the selected custom activities, audit activities (such as ‘Change Owner’ and ‘Change Stage’), tasks and notes that are present on the specified lead.

  • Specify theProspectId(Lead Id) in the JSON body. This is a mandatory field.
  • Additionally, specify any one of custom activities, audit activities, tasks or notes. Either one of these are mandatory fields.
    • Only those fields that are specified will be reset.
  • The accessKey and secretKey you pass must be that of an admin user.
  • If the ‘From’ and ‘To’ dates are not passed, then all the records created, from the lead creation date to the present date, will be deleted (for the specified fields).

 

Notes:

Reset API_1

 

API URL

POST
https://{host}/v2/LeadManagement.svc/Lead.Reset?accessKey=AccessKey&secretKey=SecretKey
Copy URL

Request

JSON Body/Payload

Content-Type: application/json

{
   "ProspectId":"fea01c86-5617-44d6-8469-4dbc409ab8f8",
   "TaskTypeList":[
      "3c8c1a5b-8374-11e7-ab78-02de49b06427",
      "128acb87-542d-11e8-8455-020714094d7e"
   ],
   "ActivityEventList":[
      166,
      167
   ],
   "ShouldDeleteProspectNotes":false,
   "AuditActivityList":[
      "StageChange",
      "OwnerChange"
   ],
   "FromDate":"2020-10-14 18:30:00",
   "ToDate":"2020-10-16 18:29:59"
}

JSON Properties

Parameter Description
Prospect Id

The lead Id of the lead. This is mandatory.

TaskTypeList

TheTaskTypeIdfor the tasks created on the lead, that you want to delete.

ActivityEventList

The activity event code for the activities you want to delete on the lead.

ShouldDeleteProspectNotes

If you want to delete the notes added on the lead, “true”. Else, “false”.

AuditActivityList

The audits on the lead you want to delete.

FromDate

The date from which you want to delete the lead’s data. The date format is YYYY-MM-DD HH:MM:SS.

ToDate

The date up to which you want to delete the lead’s data. The date format is YYYY-MM-DD HH:MM:SS.

Response

200 OK

Content-Type: application/json

{
    "Status": "Success",
    "Message": {
        "Message": "Your request for lead reset has been queued."
    }
}

HTTP Response Code

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.