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

前端 未结 7 1708
孤城傲影
孤城傲影 2021-02-19 07:32

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

相关标签:
7条回答
  • 2021-02-19 07:46

    The group IDs can also be found in the embed coding form page, but only if the groups aren't hidden.

    0 讨论(0)
  • 2021-02-19 07:50

    You can use either interest group id or its name for this(Hope you are using MaiChimp API v3). You can find it the MailChimp interface itself.

    You need to use name instead of id as the parameters.

    Please let me know if have any issue with using it. :)

    0 讨论(0)
  • 2021-02-19 07:54

    As mentioned above you can use the Playgrounds in the Mailchimp Developer website (developer.mailchimp.com) also you can sort your group's order so you can retrieve all the ids you need instead of relying on the API call or being limited to the first 10.

    0 讨论(0)
  • 2021-02-19 07:56

    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.

    0 讨论(0)
  • 2021-02-19 07:58

    What worked for me was using playground: https://us1.api.mailchimp.com/playground/

    And then to use it, what worked for me was exactly like these:

    $json = json_encode([
        'email_address' => $data['email'],
        'status'        => "subscribed", // "subscribed","unsubscribed","cleaned","pending"
        //'tags'  => array('es'),
        'merge_fields'      => [
            'FNAME'         => $data['name'],
            'USER'          => $data['user'],
            'COUNTRY'       => $data['country'],
            'BIRTHDATE'     => $data['birthdate'],
            'SUBSCRIP'      => $subsription
        ],
        "interests" => array(
            'PLACE_HERE_THE_ID' => true
        )
    ]);
    

    Hope this helps :)

    0 讨论(0)
  • 2021-02-19 08:01

    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": "user@mail.com",
        "status": "subscribed",
        "merge_fields": {
            "EMAIL": "user@mail.com",
            "FNAME": "Firstname",
            "LNAME": "Lastname",
            "POST_CODE": "",
            "ADDRESS": "",
            "PHONE": ""
        },
        "interests": {
            "733ba3180d": true
        }
    }
    

    Note: interests is not inside merge_fields

    Hope this help.

    0 讨论(0)
提交回复
热议问题