Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you get a MailChimp interest group ID without using the API?

With the MailChimp API, to add a member to a list with a specific interest group, you need both that list's ID and the interest group's ID.

To get both those IDs, you can either query the API for them, or in the case of the list ID you can find it in the form code that the MailChimp interface outputs. The interest group ID can not be found in the same way: the form code simply users integer IDs to reference the interest groups, which are not accepted by the API.

My question: is there any way to get the interest group IDs other than querying the API first? i.e. somewhere in the MailChimp interface?

Context: I'm building a simple add-on to a Wordpress website that includes a MailChimp signup form with interest groups. Parameters are set in the website admin including API key and list ID. If possible, I'd like to avoid having to build in a query mechanism to get, list and select the interest groups and rather just have the administrator enter the IDs.

like image 309
Tim Malone Avatar asked May 18 '16 22:05

Tim Malone


People also ask

What is audience ID MailChimp?

Each Mailchimp audience has a unique audience ID (sometimes called a list ID) that integrations, plugins, and widgets may require to connect and transfer subscriber data. The audience ID is generated by our system when the audience is created and cannot be changed.

How do I check my MailChimp API?

Get Authorized to Access the Platform For Mailchimp, we'll need to use Basic Auth that uses API key as a password. So you enter your email or login in the Username tab and your API key in the Password tab. You can find your API key in the Account→Extras→API keys tab.


2 Answers

You can use the Playgrounds in the Mailchimp Developer site located at developer.mailchimp.com

The Playground is a UI into the API and you can drill down using the Subresources into -> lists -> interest-categories -> interests.

Then choose the Response view and it will show the payload of the response that contains the id's you are looking for.

like image 167
sonic_ninja Avatar answered Sep 23 '22 05:09

sonic_ninja


I am using V3 API and you can use Playground to get group id (Mûhámmàd Yäsår K group name doesn't work for me)

Playground > List > [Your list] > interest-categories > interests > [Your group]-> You'll see payload with field id

Now that you have the group id, you can play with creating members: Playground > List > [Your list] > members > Click Create members

Here's the sample payload:

{
    "email_address": "[email protected]",
    "status": "subscribed",
    "merge_fields": {
        "EMAIL": "[email protected]",
        "FNAME": "Firstname",
        "LNAME": "Lastname",
        "POST_CODE": "",
        "ADDRESS": "",
        "PHONE": ""
    },
    "interests": {
        "733ba3180d": true
    }
}

Note: interests is not inside merge_fields

Hope this help.

like image 42
Kent V Avatar answered Sep 23 '22 05:09

Kent V