VICIdial API - Lead Archive
Overview
The Vicidial Lead Archive API facilitates the archiving of leads within the Vicidial system.
Endpoint
The API will operate outside of office hours only.
The endpoint server address will be provided by Service Delivery.
Use the following endpoint to initiate your request:
Method | Endpoint | Description |
---|---|---|
POST | /vicidial/leads/archive | Lead archive endpoint |
Authentication
API key will be provided by Service Delivery.
To access the Lead Archive API, you must authenticate using an API key.
Include the following headers in your request:
Authorization: Key=YOUR_API_KEY
Content-Type: application/json
Request
When making a request, you must post the following JSON object.
{
"insert_leads": true,
"update_leads": true,
"delete_leads": true,
"lead_ids": [
0,
1
]
}
Field | Datatype | Description |
---|---|---|
insert_leads | true | false | This feature enables the insertion of specified lead IDs into the vicidial_list_archive table. Lead IDs that are already present in the vicidial_list_archive table will not be inserted again. Use update_leads to ensure the specified lead IDs data is synchronized for lead IDs that were not inserted into vicidial_list_archive table. It is recommended to always set this feature to true. |
update_leads | true | false | This feature enables the updation of specified lead IDs. If a lead ID is already present in the vicidial_list_archive table, the API will update the lead ID data with the most recent matching lead ID information retrieved from the vicidial_list table. It is recommended to always set this feature to true for lead ID data synchronization. |
delete_leads | true | false | This feature enables the deletion of specified lead IDs from the vicidial_list table in a safe manner. Before deleting, the API checks if the specified lead IDs exists in the vicidial_list_archive table and the column data matches the vicidial_list table lead ID data. Setting this feature to false will result in lead IDs remaining in the vicidial_list table. |
lead_ids | Integer | Specify the lead IDs that you wish to archive. Limited to 500 leads per request. |
CURL request example:
Insert lead IDs into the vicidial_list_archive table. Ignore lead IDs that exist in the vicidial_list_archive table.
Update lead ID in the vicidial_list_archive table with lead ID data from the vicidial_list table.
Delete lead IDs from the vicidial_list table. Performs safe delete by checking if the lead IDs exist in the vicidial_list_archive table and if the column data matches the vicidial_list table lead ID.
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
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.
Â
Returns the following error response if the API cannot validate the API user.
Â
Returns the following error response if the API was executed during office hours.
Â
Returns the following error response if the value passed for insert_leads is not a bool value or no value was provided.
Â
Returns the following error response if the value passed for update_leads is not a bool value or no value was provided.
Â
Returns the following error response if the value passed for delete_leads is not a bool value or no value was provided.
Â
Returns the following error response if the value passed for lead_ids is not an integer value or was passed with double quotes.
Â
Returns the following error response if no value was passed for lead_ids.
Â
Returns the following error response if the values passed for lead_ids exceed 500 values.
Â
Returns the following error response if the values passed for lead_ids contain duplicate values.
Â
Returns the following error response if the values passed for lead_ids do not exist in the vicidial_list table.
Â
Returns the following error response for any other errors not mentioned above.
Â