Developers

Subscriptions API

get_subscribers_list


URL:

http://api.msgme.com/v1/subscriptions/get_subscribers_list

METHOD:

Get

DESCRIPTION:

Returns a paginated list of subscribers. In essence, this is a search of subscribers on a particular keyword.

PARAMETERS:

Parameter Description
token The security token that was returned using authentication_api method.
keywordId The subscription keyword
startAt The record to start at. By default, the result set starts at 0.
numberOfSubscribers Number of subscribers for this result set. The result sets are defaulted or capped to 1000 records per call.
dateCreated Return only subscribers that subscribed after the date specified in YYYYMMDD format. Also, you may pass in a URL encoded YYYY-MM-DD HH:MM:SS format as well. All times are in US-Pacific zone.
fields Filter out subscribers that do not have values for these fields. Passed to this parameter in the following format: field1+field2+fieldN...
returnFields List of metadata fields to be returned for each subscriber. List the fields using the same format as the fields attribute. By default, all fields will be returned if this parameter is not included or is empty.


API REQUEST:

http://api.msgme.com/v1/subscriptions/get_subscribers_list?token=[token]&keywordId=ID&startAt=[starting record]&numberOfSubscribers=[number of subscribers per result set]&dateCreated=[YYYYMMDD] OR URL encoded[YYYY-MM-DD HH:MM:SS]&fields=[field1]+[field2]+[field...]&valueRange=[beginRange]:[endRange]+[singleValue]+...&returnFields=[field1]+[field2]+[field...]



API RESPONSE:

		<?xml version="1.0" encoding="UTF-8"?>
		<apiResponse status="[status text]" statusCode="[status code]" >
			<subscribers page="[page number]" numberOfPages="[total number of pages]">
				<subscriber
					msidn="[10-digit mobile number]"
					dateCreated="[YYYYMMDD]"
					subscriberId="[subscriber ID]"
					fieldname="[field value]" 
					fieldname="[field value]"
					... />
				</subscribers>
		</apiResponse>


EXAMPLE USAGE:

In this example, the age field was specified with range of 13:19, thus the response will list the age field and the value of that field for that subscriber.


REQUEST:

GET http://api.msgme.com/v1/subscriptions/get_subscribers_list?token= 0e9ace1582fbb754dfe7f4e13f3c69&keywordId=10030&fields=age+location&valueRange=13:19+losAngeles&returnFields=zip&age


RESPONSE:

		<?xml version="1.0" encoding="UTF-8"?>
		<apiResponse status="success" statusCode="200" >
			<subscribers page="1" numberOfPages="5">
				<subscriber msidn="6264298416" 
						subscriberId="1987"
						dateCreated="20081002" 
						age="14" />
				<subscriber msidn="6264348414" 
						subscriberId="3241"
						dateCreated="20081002"
						age="19" 
						zip="91775"/>
				<subscriber msidn="6264768412" 
						subscriberId="1002"
						dateCreated="20081002"
						age="13" 
						zip="90210"/>
				<subscriber msidn="6264358411" 
						subscriberId="234" 
						dateCreated="20081002"
						age="15" 
						zip="91002"/>
			</subscribers>
		</apiResponse>