Voice Campaign Request Call
Zlecenie wykonania połączenia na sprawie kampanii głosowej.
Akcję Call można wykonać tylko, jeśli sprawa jest w stanie ASSIGNED
lub WAITING_FOR_USER_CALL
.
POST /voice_campaign/{voice_campaign_id}/request/{voice_campaign_request_id}/call
URL Parameters
Nazwa | Rodzaj | Opcjonalne | Opis |
---|---|---|---|
voice_campaign_id | <STRING> |
5b7c389fe8df7b60af688989 | Identyfikator systemowy Kampanii głosowej |
voice_campaign_request_id | <STRING> |
9b7cm89fe87f7869af68897 | Identyfikator systemowy Sprawy |
Response Body
{
"success": true
}
Response Code
Status | Opis |
---|---|
200 | Żądanie przyjęte do realizacji |
403 | Nie można wykonać takiej akcji |
404 | Nie znaleziono zasobu |
Example
curl -X POST \
$CONPEEK_URL/voice_campaign/5b7c389fe8df7b60af688989/request/9b7cm89fe87f7869af68897/call \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json'
import requests
import json
import os
from urllib import parse
url = parse.urljoin(os.environ["CONPEEK_URL"], "/voice_campaign/%(voice_campaign_id)s/request/%(voice_campaign_request_id)s/call" % {
"voice_campaign_id": "5b7c389fe8df7b60af688989",
"voice_campaign_request_id": "9b7cm89fe87f7869af68897"
})
headers = {
'Content-Type': "application/json",
'Authorization': os.environ["CONPEEK_KEY"]
}
response = requests.request("POST", url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
$voice_campaign_id = "5b7c389fe8df7b60af688989";
$voice_campaign_request_id = "9b7cm89fe87f7869af68897";
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/voice_campaign/$voice_campaign_id/request/$voice_campaign_request_id/call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array(
"Authorization: ".getenv("CONPEEK_KEY"),
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}