Overview
The Vicidial Lead Archive API facilitates the archiving of leads within the Vicidial system.
Endpoint
Note |
---|
The API will operate outside of office hours only. |
...
Method | Endpoint | Description |
---|---|---|
POST | /vicidial/leads/archive | Lead archive endpoint |
Authentication
API key will be provided by Service Delivery.
...
Code Block |
---|
Authorization: Key=YOUR_API_KEY Content-Type: application/json |
Request
Info |
---|
The API consistently executes operations in the following sequential order:
|
...
Code Block | ||
---|---|---|
| ||
curl -k -X POST https://<server>/vicidial/leads/archive \ -H "Authorization: Key=YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "insert_leads": true, "update_leads": true, "delete_leads": true, "lead_ids": [ 0, 1 ] }' |
Response
Info |
---|
The API follows general HTTP response status codes. In addition to the HTTP code included in the JSON response, you can also rely on the HTTP status code returned by the response. |
Tip |
---|
HTTP status code - 200 |
Returns the following successful response If there are no errors with the request or the specified lead IDs. The data will be processed based on the option values specified in the request JSON object.
Code Block | ||
---|---|---|
| ||
{ "message": "lead_ids batch was successfully processed", "select_count": 1, "insert_count": 1, "update_count": 0, "delete_count": 1 } |
Warning |
---|
HTTP status code - 401 |
Returns the following error response if the API cannot validate the API user.
Code Block | ||
---|---|---|
| ||
{ "message": "unable to validate api user" } |
Warning |
---|
HTTP status code - 403 |
Returns the following error response if the API was executed during office hours.
Code Block | ||
---|---|---|
| ||
{ "message": "api cannot be executed during office hours time condition" } |
Warning |
---|
HTTP status code - 400 |
Returns the following error response if the value passed for insert_leads is not a bool value or no value was provided.
...
Code Block | ||
---|---|---|
| ||
{ "message": "lead_ids does not exist", "lead_errors": 1, "lead_ids": [ 0 ] } |
Warning |
---|
HTTP status code - 500 |
Returns the following error response for any other errors not mentioned above.
...