The following section explains retrieving numbers of subscribers from MUMARA; subsequent sample request demonstrates retrieving of the subscribers and returning of the 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/ Variables |
Priority |
Description |
list_id |
Required |
If you want to retrieve subscribers from particular list, mention the list ID. If you submit the request without mentioning the list ID, the Get Subscribers function will then work randomly to retrieve the subscribers from the lists in Mumara. |
Subscriber Count |
Required |
There are two other tags that you need to take care of when submitting request, both these tags help in subscriber count. (Number of subscribers you want retrieve). By default it is set to “Start” retrieving from 0 subscribers to default 500 “Records” count. If you want to change this, change the numbers with the tags “Start” and “Records”. For example, if you set this to Start=20 & Records=700, it will start retrieving from subscriber number 20 and will count total 700 records. |
If the List ID is provided while sending the API request, application will look for the subscribers with specific field values, only in the provided list (List ID). If the List ID isn't mentioned, application will look across all the list(s), to retrieve subscribers with specific details.
Label/ Variables |
Priority |
Description |
subscriber_id |
|
To retrieve subscriber with particular Subscriber ID |
|
|
Email of the subscriber is required to retrieve subscribers with particular email in the email field |
title |
|
Required in order to retrieve subscribers with some particular Title. |
first_name |
|
First Name of the Subscriber(s) you want to retrieve |
last_name |
|
Last Name of the Subscriber(s) you want to retrieve |
unsubscribed |
|
Set this field with “1” while sending API request for retrieving unsubscribed contacts. Otherwise, initiate with “0” to retrieve contacts that haven't unsubscribed. |
bounced |
|
Set this field with “1” while sending API request to retrieve bounced subscribers.Otherwise, proceed with “0” to retrieve the contacts that haven't been bounced. |
FORMAT |
|
Provide h to get the subscribers saved to receive HTML email campaigns as default, and initiate API request with t to retrieve subscribers saved to receive text email. (h for HTML and t for Text emails) |
confirmation_status |
|
Set this field with “1” to retrieve Confirmed subscribers, or proceed with "0" to get subscribers that haven't been confirmed yet. |
city |
|
To get subscribers from particular city |
country |
|
To get subscribers from particular country |
company |
To get subscribers from particular company |
|
post_code |
|
To get all subscribers with particular Post Code in their post code field |
state |
|
To retrieve subscribers from particular state |
mobile |
To retrieve subscriber(s) with particular mobile number |
|
phone |
|
To retrieve subscriber(s) with particular phone number |
fax |
To retrieve subscriber(s) with particular fax number |
|
unsubscribe_date |
Retrieve unsubscribed contacts of some specific date, by initiating API request with the specific date value in the field. Date format for the field should be YYYY-MM-DD, e.g. 2016-06-24. |
|
bounced_date |
Retrieve contacts that bounced on some specific date, by initiating API request with the specific date value in the field. Date format for the field should be YYYY-MM-DD, e.g. 2016-06-24. | |
create_date |
Retrieve contacts added/created on particular date, by initiating API request with the specific date value in the field. Date format for the field should be YYYY-MM-DD, e.g. 2016-06-24. |
Following Get Subscribers request set to retrieve subscribers’ information from the list ID “2”, the subscriber count is 4 records starting from subscriber number 2.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://www.yourdomain.com/API/getSubscribers?list_id=2&start=0&records=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);
}
Upon submitting valid Get Subscribers request you will get the following Json response.
Note- Valid List ID is required to submit request when you want to retrieve subscribers from particular List.
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":"1", "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"}, {"subscriber_id":"3", "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"}, {"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"}, {"subscriber_id":"5", "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”
Data Returned- Text based message describing reason of unsuccessful response