Knowledgebase

Get Subscriber

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.

Required to Submit Json Request

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)

Field Details

Label/Variable 

Priority

Description

subscriber_id

Required

It is required to identify particular subscriber and to retrieve related information from its list in MUMARA.

Sample Request

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);
}

Success Response 

In case of submitting valid request, it returns the following data in Json format.

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"}]}

Erroneous Response

When you submit request with inappropriate, incorrect information.

Status value for unsuccessful submission will be- “error”
Data Returned- Text based message describing reason of unsuccessful response

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"}