I am trying to get subsciber details using the exacttarget API. I need to get these details by email address but so far I can only get the details by Subscriber key (Code below).

        sfp.Property = "SubscriberKey";
        sfp.SimpleOperator = SimpleOperators.equals;
        sfp.Value = new string[] { "1003608" }; // Subscriber key

        // Create the RetrieveRequest ListSubscriber objects
        RetrieveRequest rr = new RetrieveRequest();
        rr.ObjectType = "ListSubscriber";
        rr.Properties = new string[] { "ListID", "SubscriberKey", "Status"};
        rr.Filter = sfp;

        status = framework.Retrieve(rr, out requestID, out results);
        // Iterate over the results
        Console.WriteLine("List Subscriber Details:\tList ID\tSubscriberKey\tStatus");
        for (int i = 0; i < results.Length; i++)
            ListSubscriber ls = (ListSubscriber)results[i];
            Console.WriteLine("List Subscriber Details:\t{0}\t{1}\t{2}", ls.ListID, ls.SubscriberKey, ls.Status);


My problem is that I do not know what property I need to feed in to search by email address. I have tried..

        sfp.Property = "CustomerKey";
        sfp.SimpleOperator = SimpleOperators.equals;
        sfp.Value = new string[] { "name@test.co.uk" }; // Subscriber key

But this gives the error "Ambigous column name 'CustomerKey'".

Any help would be much appreciated.

Thanks, Bobby

  • Do you have more than one column called customer key? Apr 28 '17 at 9:08
  • It would appear so but I am just calling the API so I don't have any control over it. I would guess I was calling the wrong property but I don't know what other property to use
    – Bobby
    Apr 28 '17 at 9:11

Email address doesn't exist in the ListSubscriber object. You'll need to retrieve the Subscriber object.

If you need access to the Lists for a Subscriber, it's included in the Lists[] property.

  • Thank you Adam, Once I changed the objecttype to "Subscriber" I could then use "EmailAddress" as my filter.
    – Bobby
    May 2 '17 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.