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

前端 未结 7 1581
孤城傲影
孤城傲影 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: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 :)

提交回复
热议问题