fbpx
Search
Close this search box.
Search
Close this search box.

< / >

APIs Campaign

1. Enter a DNC En

URL: https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=add_dnc Description: Esta API permite ingresar uno o multiples numeros DNC (Do Not Call) inbound o outbond a la base de datos. Benefit: Manage, without the need to reupload the database, the information of customers, collaborators and suppliers of your database to determine massively the records that will be blocked. how it works:
  • Consuming this API is done by POST method.
  • The json adds the parameters according to the operation or process to be performed.
  • To consume this API you must replace in the url {{wolkvox_server}} by the nomenclature of the server of the operation.
  • The wolkvoxtoken header must be used to use the authorization token.
  • Keep in mind that the same token cannot be consumed simultaneously, so you can program the next API to be consumed when the result of the previous one is successful.
REQUEST
NAME DESCRIPTION TYPE
telephone Phone to add String
days_block Days the number will be blocked String
RESPONSE
NAME DESCRIPTION TYPE
total_added Total additions String
total_rejected Total rejected String
total_sent Total number of telephones sent String
Posibles códigos de respuesta
				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL =&gt; 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=add_dnc',
  CURLOPT_RETURNTRANSFER =&gt; true,
  CURLOPT_ENCODING =&gt; '',
  CURLOPT_MAXREDIRS =&gt; 10,
  CURLOPT_TIMEOUT =&gt; 0,
  CURLOPT_FOLLOWLOCATION =&gt; true,
  CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST =&gt; 'POST',
  CURLOPT_POSTFIELDS =&gt;'[
        {
            "telephone": "9319xxxxxxx",
            "days_block": "15"
        },
        {
            "telephone": "9319xxxxxxx",
            "days_block": "30"
        }
]',
  CURLOPT_HTTPHEADER =&gt; array(
    'wolkvox-token: {{token}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
				
			

RESPONSE

				
					{
    "code": 201,
    "error": null,
    "msg": "1 telephones were added",
    "data": [
        {
            "total_added": "",
            "total_rejected": "",
            "total_sent": ""
        }
    ]
}
				
			

Hacemos uso de cookies, si continúas navegando asumiremos que estás de acuerdo. Puede leer más sobre el uso de cookies en nuestras políticas de privacidad y tratamiento de datos personales

Hacemos uso de cookies, si continúas navegando asumiremos que estás de acuerdo. Puede leer más sobre el uso de cookies en nuestras políticas de privacidad y tratamiento de datos personales