Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Do not use this API during production hours.

Base URL Endpoint

Server address will be provided by TForge.

Use the following endpoint to initiate your request:

Method

URL Endpoint

Description

POST

https://api.tforge.co.zaserver/vicidial/lead/archive/

Lead archive endpoint

...

Code Block
languagebash
curl -k -X POST https://api.tforge.co.zaserver/vicidial/lead/archive/ \
-H "Authorization: Key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
      "insert_leads": true,
      "update_leads": true,
      "delete_leads": true,
      "lead_ids": [
        12345,
        67890
      ]
    }'

...

Info

The API follows general HTTP response status codes. In addition to the status 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 options specified in the JSON object.

Code Block
languagejson
{
  "success": "lead batch was successfully processed",
  "select_count": 1,
  "insert_count": 1,
  "update_count": 0,
  "delete_count": 1,
  "status_code": 200
}

Warning

HTTP status code - 432

Returns the following error response if the value passed for insert_leads is not a bool value or no value was provided.

Code Block
languagejson
{
  "error": "insert_leads must be a boolean value",
  "status_code": 432
}

Warning

HTTP status code - 433

Returns the following error response if the value passed for update_leads is not a bool value or no value was provided.

Code Block
languagejson
{
  "error": "update_leads must be a boolean value",
  "status_code": 433
}

Warning

HTTP status code - 434

Returns the following error response if the value passed for delete_leads is not a bool value or no value was provided.

Code Block
languagejson
{
  "error": "delete_leads must be a boolean value",
  "status_code": 434
}

Warning

HTTP status code - 435

Returns the following error response if the value passed for lead_ids is not an integer value or was passed with double quotes.

Code Block
languagejson
{
  "error": "lead_ids must only contain integer values",
  "lead_ids": [
    "56712"
  ],
  "status_code": 435
}

Warning

HTTP status code - 436

Returns the following error response if no value was passed for lead_ids.

Code Block
languagejson
{
  "error": "lead_ids must contain atleast 1 value",
  "status_code": 436
}

Warning

HTTP status code - 437

Returns the following error response if the values passed for lead_ids exceed 500 values.

Code Block
languagejson
{
  "error": "lead_ids cannot exceed 500 values",
  "status_code": 437
}

Warning

HTTP status code - 438

Returns the following error response if the values passed for lead_ids contain duplicate values.

Code Block
languagejson
{
  "error": "lead_ids cannot contain duplicate values",
  "lead_ids": [
    12345
  ],
  "status_code": 438
}

Warning

HTTP status code - 439

Returns the following error response if the values passed for lead_ids do not exist in the vicidial_list table.

Code Block
languagejson
{
  "error": "specified leads do not exist",
  "lead_count": 1,
  "values": [
    12345
  ],
  "status_code": 439
}

Warning

HTTP status code - 440

Returns the following error response for any other errors not mentioned above.

...