Knowledgebase

Get Broadcast Stats Logs

Method: GET
Endpoint: /api/getBroadcastStatsLogs/{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/getBroadcastStatsLogs/';

//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": 3820183,
            "email": "john@gmail.com",
            "message_id": "<09f29541bb38b34886834855ff7de276e@mumara.co>",
            "created_at": "2020-10-02 11:45:10",
            "is_bounced": 0,
            "campaign_schedule_logs_id": 498,
            "recent_activity": "2020-10-02 11:45:10",
            "smtp_id": 6,
            "is_sent": 1,
            "is_spammed": 0,
            "is_delivered": 0,
            "is_delayed": 0,
            "is_injected": 0,
            "name": "Admin Zone1"
        },
        {
            "subscribers_id": 3820183,
            "email": "johnlee@gmail.com",
            "message_id": "<89b95a950cb0463682d857abee51579d9@mumara.co>",
            "created_at": "2020-10-02 13:19:10",
            "is_bounced": 0,
            "campaign_schedule_logs_id": 514,
            "recent_activity": "2020-10-02 13:19:10",
            "smtp_id": 6,
            "is_sent": 1,
            "is_spammed": 0,
            "is_delivered": 0,
            "is_delayed": 0,
            "is_injected": 0,
            "name": "Admin Zone1"
        }
    ]
}
Status value of the success response will be "Success".


Example Error Response (JSON)

{
    "status": "error",
    "result": "Error:  Stats Log do not exist."
}


Possible Errors

  • Stats Log do not exist.
  • Access Denied
GET
/api/getBroadcastStatsLogs/{schedule_id}
Try it out