What can I do with randomSubscriber?

RandomSubscriber can save you time but has a limited use case:

  • Try selecting winning subscribers for your competition.
  • More efficient than fetching all subscribers to select one at random.
  • The attributes returned by this endpoint mirror those of a subscriber.

GET /randomSubscriber or /randomSubscriber/:id

AttributeTypeFilterSortDescription
id
intNon/aUnique ID of the subscriber.
bounce_exists
boolNon/aWhether this subscriber has ever had a bounced email.
companyname
string/nullNon/aSubscriber's company name.
confirmed
bool/nullNon/aWhether the subscription to the list specified by list_id is confirmed.
contact_exists
boolNon/aWhether this subscriber has ever been contacted.
country
string/nullNon/aSubscriber's country in ISO-3316-1 format (two character), for example "GB".
county
string/nullNon/aSubscriber's county.
daybirth
int/nullNon/aThe day of the month of the subscriber's birthday (1-31).
email
stringNon/aSubscriber email address.
emailmd5
stringNon/aMD5 digest of the contents of the "email" attribute.
emailsuspended
boolNon/aWhether email delivery to the subscriber is currently suspended.
firstname
string/nullNon/aSubscriber's first/given name.
gender
enum/nullNon/aEither "male" or "female".
housenumber
string/nullNon/aSubscriber's house number.
lastname
string/nullNon/aSubscriber's last/family name.
latestopenip
string/nullNon/aIP address from which the subscriber most recently opened an email.
list_id
int/nullNon/aList ID of the list that the subscriber is subscribed to.
monthbirth
int/nullNon/aThe month of the subscriber's birthday (1-12).
msisdn
stringNon/aSubscriber MSISDN (see definition). N.B. This attribute is treated as a string.
postcode
string/nullNon/aSubscriber's postcode.
smssuspended
boolNon/aWhether SMS delivery to the subscriber is currently suspended.
streetname
string/nullNon/aSubscriber's street name.
subscription_count
int/nullNon/aNumber of subscriptions held by this subscriber.
title
string/nullNon/aSubscriber's title.
town
string/nullNon/aSubscriber's town.
yearbirth
int/nullNon/aThe four-digit year of the subscriber's birth.
cdate
decimalNon/aCreation timestamp.
mdate
decimalNon/aLast modification timestamp.

By default only 1 subscriber is returned. The maximum that can be requested is 10.

subscription_count is always "null". This field is here to keep the result set the same as the subscriber endpoint.

Sorting is not supported. If more than 1 subscriber is requested they are sorted by id only.

HEAD /randomSubscriber or /randomSubscriber/:id

This method is not supported.

POST /randomSubscriber

This method is not supported.

PUT /randomSubscriber or /randomSubscriber/:id

This method is not supported.

DELETE /randomSubscriber or /randomSubscriber/:id

This method is not supported.

Error codes

There are no error codes for this endpoint.

Examples

JSON response

{
    "id":                 87654321,
    "bounce_exists":      false,
    "companyname":        "JSmith Ltd",
    "confirmed":          false,
    "contact_exists":     true,
    "country":            "GB",
    "county":             "Surrey",
    "daybirth":           12,
    "email":              "mailbox@example.com",
    "emailmd5":           "0123456789abcdef0123456789abcdef",
    "emailsuspended":     false,
    "firstname":          "John",
    "gender":             "male",
    "housenumber":        "10",
    "lastname":           "Smith",
    "latestopenip":       "44.131.219.205",
    "list_id":            12345,
    "monthbirth":         3,
    "msisdn":             "447123456789",
    "postcode":           "GU22 7PY",
    "smssuspended":       false,
    "streetname":         "Pie street",
    "subscription_count": NULL,
    "title":              "Mr",
    "town":               "Woking",
    "yearbirth":          1960,
    "cdate":              1234966741,
    "mdate":              1234966741
}