Get Lists
You can retrieve all subscriber lists exist in MUMARA using this API function. We have just discussed retrieving one list using List ID in the above section; the following section will elaborate retrieving a list of existing contact/subscriber lists.
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
You actually don’t require any particular field or ID to make this request work, just correct path to the file, API token and username. Sample request further explains correct Get Lists request.
Sample Request
Following is the sample request to retrieve the lists from MUMARA.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://www.yourdomain.com/API/getLists');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'APIToken: 343b1b831067b50e308e6bf93e0f06f0', 'Login: mumaralogin@domain.com'));
$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
Once you submit the valid Get Lists requests, the response will return after retrieving existing list and other related information in the format as below.
Status value for successfully getting list will be- “success”
Data Returned- List IDs, List Names, List Owner Names, List Owner Emails, List Bounce Emails, List Reply to Emails, Number of Subscribers, Date of Creation
{"status":"success","response":[{"list_id":"1","list_name":"Test List","list_owner_name":"Example Owner","list_owner_email":"owner@example.com","list_bounce_email":"test","list_reply_email":"replyto@example.com","contacts":"7","create_date":"2014-11-30"},{"list_id":"2","list_name":"Example List","list_owner_name":"Testing Owner","list_owner_email":"owner@testing.com","list_bounce_email":"","list_reply_email":"replyto@testing.com","contacts":"12","create_date":"2014-11-30"},{"list_id":"3","list_name":"Custom Fields List","list_owner_name":"Custom List Owner","list_owner_email":"custom@list.com","list_bounce_email":"test","list_reply_email":"replyto@list.com","contacts":"2","create_date":"2014-11-30"},{"list_id":"4","list_name":"Testing Owner ","list_owner_name":"Adnan","list_owner_email":"ahmed@domain.com","list_bounce_email":"","list_reply_email":"","contacts":null,"create_date":"2014-12-18"},{"list_id":"5","list_name":"without custom fields","list_owner_name":"Adnan","list_owner_email":"adnan.ahmed@domain.com","list_bounce_email":"","list_reply_email":"","contacts":null,"create_date":"2014-12-18"},{"list_id":"6","list_name":"Custom Fields List 1","list_owner_name":"Custom List Owner","list_owner_email":"custom@list.com","list_bounce_email":"test","list_reply_email":"replyto@list.com","contacts":null,"create_date":null},{"list_id":"9","list_name":"Sample List","list_owner_name":"Khurram Shahzad","list_owner_email":"owner@domain.com","list_bounce_email":"bounce@domain.com","list_reply_email":"reply@domain.com","contacts":null,"create_date":"2015-05-28"}]}
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
Comments
0 comments
Please sign in to leave a comment.
Article Path: /hc/en-us/articles/203858152-Get-Lists-
Article Title: Get Lists