Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎6 - Subscription Management‎ > ‎

Get Subscription Info

Will get subscription information for a specific subscriber (by email address) at the publisher's third party email service provider.  Returns subscription lists that the subscriber has opted in to and other demographic fields.

Note: if the subscriber does not exist in the third party system, an error will be returned with an error code that begins with GETSUBSCRIPTIONINFOREQUEST_EMAIL_DOESNOTEXIST.  You may want to ignore this error depending on your system's intended functionality.

Method: GET /api/v3/publisher/subscription/{email}
Authentication: oauth
 
Parameters
email - The email address of the subscriber whose information is being retrieved.

Returns
base response fields
AdditionalFields - A list of {key (string), value (string)} pairs that are additional demographic variables associated with the subscriber.
FirstName - The first name of the subscriber (null if not available)
GlobalOptOut - Boolean indicating whether or not this subscriber has globally opted out of all email at the third party email service provider
IpAddress - The ip address the subscriber signed up from (null if not available)
LastName - The last name of the subscriber (null if not available)
SubscriptionLists - A list of Subscription Lists that the subscriber has opted in to
ZipCode - The zip code of the subscriber (null if not available)

Sample Request:

GET http://api.groupcommerce.com/api/v3/publisher/subscription/gsadowski%2Bsubscriptions%40groupcommerce.com

Authorization: OAuth oauth_signature="OCMBnQZQDizfWiRUXMXpoCpwXkQ%3D", oauth_nonce="1150386", oauth_timestamp="1331850017", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Sample JSON Response:

{
    "errors": [],
    "lastPublished": "/Date(1331849930022)/",
    "success": true,
    "version": "3",
    "additionalFields": [
        {
            "key": "somekey",
            "value": "somevalue"
        },
        {
            "key": "phoneNumber",
            "value": "2168675309"
        },
        {
            "key": "middleName",
            "value": "Carmelo"
        }
    ],
    "firstName": "Jeremy",
    "globalOptOut": false,
    "ipAddress": "84.74.178.114",
    "lastName": "Lin",
    "subscriptionLists": [
        {
            /* see Subscription List */
        },
        {
           
/* see Subscription List */
        },
        {
           
/* see Subscription List */
        }
    ],
    "zipCode": "10025"
}


Sample XML Response:

<getSubscriptionInfoResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <errors />
  <lastPublished>2012-03-15T22:23:34.9036433Z</lastPublished>
  <success>true</success>
  <version>3</version>
  <additionalFields>
    <additionalField>
      <key>somekey</key>
      <value>somevalue</value>
    </additionalField>
    <additionalField>
      <key>phoneNumber</key>
      <value>2168675309</value>
    </additionalField>
    <additionalField>
      <key>middleName</key>
      <value>Carmelo</value>
    </additionalField>
  </additionalFields>
  <firstName>Jeremy</firstName>
  <globalOptOut>false</globalOptOut>
  <ipAddress>184.74.178.114</ipAddress>
  <lastName>Lin</lastName>
  <subscriptionLists>
    <subscriptionList>
      <!--
see Subscription List -->
    </subscriptionList>
    <subscriptionList>
     
<!-- see Subscription List -->
    </subscriptionList>
    <subscriptionList>
     
<!-- see Subscription List -->
    </subscriptionList>
  </subscriptionLists>
  <zipCode>10025</zipCode>
</getSubscriptionInfoResponse>
Comments