The section will explain retrieving of a subscriber’s information from the list in MUMARA, it will retrieve and return obtained data in Json format.
Username |
The email that account holder uses to login MUMARA |
API Token |
The API token user has generated using API Configuration section of MUMARA, also mentioned above. |
Method |
Method being called (Post) |
Path |
Path to the API file being called ('http//www.yourdomain.com/API/deleteSubscriber) |
Label/Variable |
Priority |
Description |
subscriber_id |
Required |
It is required to identify particular subscriber and to retrieve related information from its list in MUMARA. |
Following sample request retrieves information for the subscriber with the subscriber ID “4”.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://www.yourdomain.com/API/getSubscriber?subscriber_id=4');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'APIToken: 343b1b831067b50e308e6bf93e0f06f0', 'Login: [email protected]'));
$data = curl_exec($ch);
if (curl_errno($ch)) {
print "Error: " . curl_error($ch);
} else {
// Show me the result
print ($data);
curl_close($ch);
}
Status value for successfully getting subscriber will be- “success”
Data Returned- Subscriber ID, List ID, Email, title, first name, last name, unsubscribed, bounced, format, verification status, confirmation status, city, post code, country, mobile, phone, fax
{"status":"success","response":[{"subscriber_id":"4", "list_id":"2", "email":"[email protected]", "title":"", "first_name":"", "last_name":"", "unsubscribed":"0", "unsubscribed_date":"0000-00-00 00:00:00", "bounced":"0", "bounced_date":"0000-00-00 00:00:00", "create_date":"2014-11-30 19:54:41", "format":"h", "confirmation_status":"1", "verification_status":"0", "city":"", "state":"", "post_code":"", "country":"", "mobile":"", "phone":"", "fax":"0"}]}
When you submit request with inappropriate, incorrect information.
Status value for unsuccessful submission will be- “error”Following is the example of unsuccessful response upon sending request withoutor with an incorrect pattern of Subscriber ID.
{"status":"error","response":"Subscriber ID is required to get subscriber"}