Method: GET
Endpoint: /api/getBroadcastStatsOpened/{schedule_id}
Parameters
Parameter |
Type |
Required |
Description |
schedule_id |
int |
Yes |
Schedule id of schedule to get bounced 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/getBroadcastStatsOpened/';
//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": [
{
"id": 23,
"broadcast_id": 18,
"scheduled_id": 111,
"contact_id": 3820183,
"sd_id": null,
"sn_id": null,
"campaign_schedule_logs_id": 498,
"is_clicked": 1,
"ip_address": "39.34.209.252",
"ip_country": "Pakistan",
"ip_region": "Punjab",
"ip_city": "Mianwali",
"ip_zip": "42201",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36",
"user_id": null,
"created_at": "2020-10-02 13:19:49",
"updated_at": "2020-10-02 13:19:49",
"smtp": "Admin Zone1",
"email": "[email protected]",
"subscribers_id": 3820183
}
]
}
Status value of the success response will be "Success".
Example Error Response (JSON)
{
"status": "error",
"result": "Error: Open stats do not exist."
}
Possible Errors
- Open stats do not exist.
- Access Denied