MrPHP
MrPHP

Reputation: 972

Getting theMailchimp Member info with PHP/API with campaign EID

I am using the Mailchimp API for a few things successfully, one thing I want to do, but can not find the answer for, is using the mc_eid, request the members basic info ( first/last name, email ).

I can do it if I have the email address, but if I only have the mc_cid & mc_eid I have not found a way yet.

Am I missing something here. Thanks

Upvotes: 2

Views: 449

Answers (1)

TooMuchPete
TooMuchPete

Reputation: 4643

It sounds like you're collecting data from ECommerce360 and hoping to link that up to a specific list subscriber. This will require two steps.

First, you need to find the list associated with the campaign ID. To do that, call the campaigns/list call, supplying mc_cid as filter for campaign_id.

Once you have the list_id from the campaigns/list call, you can call lists/member-info. You'll pass the list_id as the id parameter to that call, and then you'll pass the mc_eid as the emails.euid parameter.

To make this more efficient, you'll probably want to cache the campaign_id / list_id relation.

Upvotes: 2

Related Questions