Knowledgebase

Get Broadcast Complaint Stats

Method: GET
Endpoint: /api/getBroadcastStatsComplaints/{schedule_id}


Parameters

Parameter Type Required Description
schedule_id int Yes Schedule id of schedule to get clicked stats
limit_start int (default: 0) No Starting row of result. Default: 0
limit_count int (default: 0) No Number of records to get. Default: 25


Response Parameters

Parameter Type Description
status JSON Success or Error
result JSON Result of the operation
response JSON Output of the operation


Example Request (CURL)

<?php

// Authentication
$api_token	=	'API_KEY'; // Mumara API Key (can be found in Settings -> API Key)
$domain		=	'http://www.anydomain.com'; // Your Mumara Domain Name

// API Endpoint
$endpoint	=	'/api/getBroadcastStatsComplaints/';

//parameters
$data = array (
    'limit_start'	=> '1',
    'limit_count'	=> '2',
    'api_token'	    => $api_token
);

//Schedule id
$schedule_id = 31;

$params = '';
foreach($data as $key=>$value)
    $params .= $key.'='.$value.'&';
$params = trim($params, '&');

// Defining cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$domain.$endpoint.$schedule_id.'?'.$params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Executing cURL
$output = curl_exec ($ch);

// Printing Output
echo "<pre>";
print_r(json_decode($output,true));

// Closing cURL
curl_close ($ch);

?>

 

Example Response (JSON)

{
    "status": "success",
    "result": [
        {
            "subscribers_id": 3820181,
            "email": "[email protected]",
            "updated_at": "2020-11-03 13:10:58",
            "id": 29,
            "broadcast_id": 19,
            "scheduled_id": 195,
            "contact_id": 3820181,
            "sd_id": null,
            "sn_id": null,
            "campaign_schedule_logs_id": 944,
            "is_clicked": 0,
            "ip_address": "39.34.221.158",
            "ip_country": "Pakistan",
            "ip_region": "Punjab",
            "ip_city": "Jauharabad",
            "ip_zip": "29211",
            "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36",
            "user_id": 2,
            "created_at": "2020-11-03 13:10:58"
        }
    ]
}
Status value of the success response will be "Success".


Example Error Response (JSON)

{
    "status": "error",
    "result": "Error: Complaint stats do not exist."
}


Possible Errors

  • Unsubscribe stats do not exist.
  • Access Denied
GET
/api/getBroadcastStatsComplaints/{schedule_id}
Try it out