Follow

Show Subscriber Details

The Subscriber Details command allows you to search and return data for a single subscriber by ID.

Arguments

The Subscriber Details command requires the following arguments: Command, Realm, Password, and Subscriber ID.

api_web?r=myrealm&p=mypass&c=detail&subscriber_id=1123

The command is ‘detail', the realm is ‘myrealm’ and the password is ‘mypass’.  The Subscriber to find has id '1123' .

This command will attempt to find a single subscriber associated with the specified subscriber id number and return the results.  A successful search will return the subscriber ID, email address, first name, and last name for each matching Subscriber. 

You can return all subscriber data fields, custom fields that contain data, and the ID numbers of each list to which the Subscriber is subscribed by using the output_format argument.  If output in CSV format, the List results will appear in a column with the list ids separated by commas. 

If the output is XML, the <lists> tag will hold a comma separated list of list ids.  Additional Subscription details will also be included for each list, including the date the subscription was created, the format the subscriber has selected to receive, and the date a campaign was last sent to the subscriber.

The Subscriber Details command supports the following arguments:

 

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=detail

c=detail

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Subscriber ID

Yes

Identifier of the Subscribrer to find. 

subscriber_id=[subscriber_id]

Version

 

Version of API to use.  Data may be added to newer versions of the API.  To alleviate issues for users who have already coded file parsing, new columns are only displayed if the version is included.

version=[version_number]

9.3.0: When used in conjunction with CSV output, 'Created Date', 'Updated Date' and all Custom Data fields will be included (even if they do not contain a value).

Output Format

 

To specify the format of the list output, use one of two arguments.  If no argument is included, the default output is space-delimited plain text string, which may not include all data columns.

csv=1 or

output_format=[csv,csv_tab, csv_pipe,xml]

Header

 

To define the data with a label, use the Header argument.  This can only be used in conjunction with the output format, and does not affect XML.

headers=[0,1]

 

DEFAULT==0

 

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=detail&subscriber_id=12345&version=9.3.0&output_format=csv&headers=1

The command will find and return the subscriber with the id '12345'.

Successful results return:

"subscriber_id","email","first","last","company","address_1","address_2","city","state","zip","country","phone","fax","lists","created_date","update_date","location","source"

"44356","janedup@domain.com","Jane","Doe","","","","","","","","","","5","2012-06-20 10:48:25","2014-03-28 14:15:55","","website"

Results

The Subscriber Details command outputs either a SUCCESS or FAILURE message. 

SUCCESS

The Subscriber Details command does not explicitly return a Success code.  Instead, it outputs the subscriber details in plain text format.  Use the output_format argument to return the results in an alternate format.

FAILURE

A Subscriber Details command will fail for several reasons.  The result format is:

FAILURE: [Reason]  

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk