URL:
Description:
This API allows you to insert records automatically and remotely or from external platforms, in an existing campaign in wolkvox manager.
Benefit:
This API is very useful when you have, for example, external forms to capture leads, when the user registers automatically the information will be sent to the campaign and the call or message will be sent as parameterized.
How it works:
NAME | DESCRIPTION | TYPE |
---|---|---|
customer_name | Customer’s first name | String |
customer_last_name | Last name of customer | String |
id_type | Identification type | String |
customer_id | Customer identification number | String |
age | Age | String |
gender | Gender | String |
country | Country of residence | String |
state | State of residence | String |
city | City of residence | String |
zone | Area of residence | String |
address | Residence address | String |
opt1 | Additional field #1 where you can enter additional information of the campaign | String |
opt2 | Additional field #2 where you can enter additional information of the campaign | String |
opt3 | Additional field #3 where you can enter additional information of the campaign | String |
opt4 | Additional field #4 where you can enter additional information of the campaign | String |
opt5 | Additional field #5 where you can enter additional information of the campaign | String |
opt6 | Additional field #6 where you can enter additional information of the campaign | String |
opt7 | Additional field #7 where you can enter additional information of the campaign | String |
opt8 | Additional field #8 where you can enter additional information of the campaign | String |
opt9 | Additional field #9 where you can enter additional information of the campaign | String |
opt10 | Additional field #10 where you can enter additional information of the campaign | String |
opt11 | Additional field #11 where you can enter additional information of the campaign | String |
opt12 | Additional field #12 where you can enter additional information of the campaign | String |
tel1 | First phone number option. | String |
tel2 | Second phone number option. | String |
tel3 | Third phone number option. | String |
tel4 | Fourth phone number option. | String |
tel5 | Fifth phone number option. | String |
tel6 | Sixth phone number option. | String |
tel7 | Seventh phone number option. | String |
tel8 | Eighth phone number option. | String |
tel9 | Ninth phone number option. | String |
tel10 | Tenth phone number option. | String |
agent_id | This field only appears when consulting preview type campaigns and refers to the extension number of each of the wolkvox users Agent | String |
NAME | DESCRIPTION | TYPE |
---|---|---|
total_registers | Total de registros añadidos | int |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=add_record&type_campaign=preview&campaign_id={{campaign_id}}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'[
{
"customer_name": "{{customer_name}}",
"customer_last_name": "{{customer_last_name}}",
"id_type": "{{id_type}}",
"customer_id": "{{customer_id}}",
"age": "{{age}}",
"gender": "{{gender}}",
"country": "{{country}}",
"state": "{{state}}",
"city": "{{city}}",
"zone": "{{zone}}",
"address": "{{address}}",
"opt1": "{{opt1}}",
"opt2": "{{opt2}}",
"opt3": "{{opt3}}",
"opt4": "{{opt4}}",
"opt5": "{{opt5}}",
"opt6": "{{opt6}}",
"opt7": "{{opt7}}",
"opt8": "{{opt8}}",
"opt9": "{{opt9}}",
"opt10": "{{opt10}}",
"opt11": "{{opt11}}",
"opt12": "{{opt12}}",
"tel1": "{{tel1}}",
"tel2": "{{tel2}}",
"tel3": "{{tel3}}",
"tel4": "{{tel4}}",
"tel5": "{{tel5}}",
"tel6": "{{tel6}}",
"tel7": "{{tel7}}",
"tel8": "{{tel8}}",
"tel9": "{{tel9}}",
"tel10": "{{tel10}}",
"agent_id": "{{agent_id}}"
}
]',
CURLOPT_HTTPHEADER => array(
'wolkvox_server: {{wolkvox_server}}',
'wolkvox-token: {{wolkvox-token}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location --globoff 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=add_record&type_campaign=preview&campaign_id={{campaign_id}}' \
--header 'wolkvox_server: {{wolkvox_server}}' \
--header 'wolkvox-token: {{wolkvox-token}}' \
--header 'Content-Type: application/json' \
--data '[
{
"customer_name": "{{customer_name}}",
"customer_last_name": "{{customer_last_name}}",
"id_type": "{{id_type}}",
"customer_id": "{{customer_id}}",
"age": "{{age}}",
"gender": "{{gender}}",
"country": "{{country}}",
"state": "{{state}}",
"city": "{{city}}",
"zone": "{{zone}}",
"address": "{{address}}",
"opt1": "{{opt1}}",
"opt2": "{{opt2}}",
"opt3": "{{opt3}}",
"opt4": "{{opt4}}",
"opt5": "{{opt5}}",
"opt6": "{{opt6}}",
"opt7": "{{opt7}}",
"opt8": "{{opt8}}",
"opt9": "{{opt9}}",
"opt10": "{{opt10}}",
"opt11": "{{opt11}}",
"opt12": "{{opt12}}",
"tel1": "{{tel1}}",
"tel2": "{{tel2}}",
"tel3": "{{tel3}}",
"tel4": "{{tel4}}",
"tel5": "{{tel5}}",
"tel6": "{{tel6}}",
"tel7": "{{tel7}}",
"tel8": "{{tel8}}",
"tel9": "{{tel9}}",
"tel10": "{{tel10}}",
"agent_id": "{{agent_id}}"
}
]'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "[\r\n {\r\n \"customer_name\": \"{{customer_name}}\",\r\n \"customer_last_name\": \"{{customer_last_name}}\",\r\n \"id_type\": \"{{id_type}}\",\r\n \"customer_id\": \"{{customer_id}}\",\r\n \"age\": \"{{age}}\",\r\n \"gender\": \"{{gender}}\",\r\n \"country\": \"{{country}}\",\r\n \"state\": \"{{state}}\",\r\n \"city\": \"{{city}}\",\r\n \"zone\": \"{{zone}}\",\r\n \"address\": \"{{address}}\",\r\n \"opt1\": \"{{opt1}}\",\r\n \"opt2\": \"{{opt2}}\",\r\n \"opt3\": \"{{opt3}}\",\r\n \"opt4\": \"{{opt4}}\",\r\n \"opt5\": \"{{opt5}}\",\r\n \"opt6\": \"{{opt6}}\",\r\n \"opt7\": \"{{opt7}}\",\r\n \"opt8\": \"{{opt8}}\",\r\n \"opt9\": \"{{opt9}}\",\r\n \"opt10\": \"{{opt10}}\",\r\n \"opt11\": \"{{opt11}}\",\r\n \"opt12\": \"{{opt12}}\",\r\n \"tel1\": \"{{tel1}}\",\r\n \"tel2\": \"{{tel2}}\",\r\n \"tel3\": \"{{tel3}}\",\r\n \"tel4\": \"{{tel4}}\",\r\n \"tel5\": \"{{tel5}}\",\r\n \"tel6\": \"{{tel6}}\",\r\n \"tel7\": \"{{tel7}}\",\r\n \"tel8\": \"{{tel8}}\",\r\n \"tel9\": \"{{tel9}}\",\r\n \"tel10\": \"{{tel10}}\",\r\n \"agent_id\": \"{{agent_id}}\"\r\n }\r\n]");
Request request = new Request.Builder()
.url("https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=add_record&type_campaign=preview&campaign_id={{campaign_id}}")
.method("POST", body)
.addHeader("wolkvox_server", "{{wolkvox_server}}")
.addHeader("wolkvox-token", "{{wolkvox-token}}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
import requests
import json
url = "https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=add_record&type_campaign=preview&campaign_id={{campaign_id}}"
payload = json.dumps([
{
"customer_name": "{{customer_name}}",
"customer_last_name": "{{customer_last_name}}",
"id_type": "{{id_type}}",
"customer_id": "{{customer_id}}",
"age": "{{age}}",
"gender": "{{gender}}",
"country": "{{country}}",
"state": "{{state}}",
"city": "{{city}}",
"zone": "{{zone}}",
"address": "{{address}}",
"opt1": "{{opt1}}",
"opt2": "{{opt2}}",
"opt3": "{{opt3}}",
"opt4": "{{opt4}}",
"opt5": "{{opt5}}",
"opt6": "{{opt6}}",
"opt7": "{{opt7}}",
"opt8": "{{opt8}}",
"opt9": "{{opt9}}",
"opt10": "{{opt10}}",
"opt11": "{{opt11}}",
"opt12": "{{opt12}}",
"tel1": "{{tel1}}",
"tel2": "{{tel2}}",
"tel3": "{{tel3}}",
"tel4": "{{tel4}}",
"tel5": "{{tel5}}",
"tel6": "{{tel6}}",
"tel7": "{{tel7}}",
"tel8": "{{tel8}}",
"tel9": "{{tel9}}",
"tel10": "{{tel10}}",
"agent_id": "{{agent_id}}"
}
])
headers = {
'wolkvox_server': '{{wolkvox_server}}',
'wolkvox-token': '{{wolkvox-token}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
{
"code": "201",
"error": null,
"msg": "All records has been added successfully",
"data": [
{
"total_registers": " "
}
]
}
Sao Paulo +55 (11) 521 75 933
Santiago de Chile +56 (2) 240 533 89
Medellín +57 (604) 322 98 80
Ciudad de Guatemala +502 (2) 3141344
Ciudad de México +52 (55) 8526 36 34
Copyright © 2023 MICROSYSLABS. 1820 N Corporate Lakes Blvd, unit 205. Weston, FL 33326
COLOMBIA
Medellín +57 (4) 322 98 80
Bogotá +57 (1) 381 90 40
Cali +57 (2) 891 28 46
Barranquilla +57 (5) 316 10 34
ARGENTINA
Buenos Aires +54 (11) 5217 5933
SPAIN
Madrid +34 (910) 601 691
MEXICO
Ciudad de México +52 (55) 8526 36 34
BRASIL
Brasilia +55 (61) 9836 4127
São Paulo +55 (12) 9811 155 83
UNITED STATES
New York +1 (914) 373 71 36
DOMINICAN REPUBLIC
Santo Domingo +1 (829) 249 69 68
CHILE
Santiago de Chile +56 (2) 240 533 89
GUATEMALA
Ciudad de Guatemala +502 (2) 314 1344
PERU
Lima +51 (1) 644 91 39
Copyright © 2023 MICROSYSLABS S.A.S.
Cra 30 # 4A – 45 Of. 205 Ed. FOREVER W&L, Medellín, Colombia