Choose Language

Fetch Voice Report API


Fetch Voice Report API through Sarv


try { 
$post_url = "http://your_domain/api/voice/fetch_report.php";
$ARR_POST_DATA = array();
$ARR_POST_DATA['username'] = 'your_username';
$ARR_POST_DATA['token'] = "your_token";
$ARR_POST_DATA['unique_ids'] = "unique_id1,unique_id2"; // comma (,) seperated
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $post_url);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($ARR_POST_DATA));
$response = curl_exec($curl);
echo $response; 
$arr_response = json_docode($response, true);
} catch (Sarv_Error $e) {
    // Sarv errors are thrown as exceptions
    echo "A sarv error occurred: " . get_class($e) . " - " . $e->getMessage();


Example Success Response

	"desc":"Request Submitted Successfully",
			 "desc":"unique id fetched found",
				"time_start":"10-Oct-2017 2:34:58 PM",
				"time_connect":"10-Oct-2017 2:35:11 PM",
				"time_end":"10-Oct-2017 2:35:11 PM",
			 "desc":"unique id fetched found",
				"time_start":"10-Oct-2017 2:34:52 PM",
				"time_connect":"10-Oct-2017 2:34:57 PM",
				"time_end":"10-Oct-2017 2:34:58 PM",
			 "desc":"invalid unique id",


Example Error Response

	"desc":"Parameter Missing"

username* string a valid Sarv SMS Panel User Name
token* string a valid token
unique_ids* string comma (,) seperated unique ids ( Ex : unique_id1,unique_id2 )
* compulsory field
Return Value: Success
struct the results of Fetch Voice Report API
status string success
code string 000
desc array array of unique ids and respective results.
Unique Id(key) status desc
123_21_XX success data found
123_22_XX error Invalid Unique Id
Return Value: Error
struct the error results when Fetch Voice Report API
status string error
code string 007
desc string Invalid announcement type (mp3 allowed only)
Api Response Codes
000 Announcement Uploaded Successfully.
001 Parameter Missing .
002 Parameter is blank.
003 Request IP not added in whitelist .
004 Invalid user type.
005 Invalid Credentials.
006 User is InActive.
019 Exceeded unique ids limit for single api call .