mailchimp-api icon indicating copy to clipboard operation
mailchimp-api copied to clipboard

400 - Invalid interest ID: 'c06bb4b529'.

Open nekromoff opened this issue 4 years ago • 4 comments

Hi,

I am getting error mentioned in the title. However, I am sure interest with that ID exists, as I can see it both in the admin and in the API playground.

$payload = [
        'email_address' => $data['email'],
        'status'        => 'subscribed',
    ];
    if (isset(INTERESTS[$data['campaign_id']])) {
        $payload['interests'] = ['c06bb4b529' => true];
    }
    $result = $mailchimp->post('lists/' . $list_id . '/members', $payload);

result

Array
(
    [type] => http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/
    [title] => Invalid Resource
    [status] => 400
    [detail] => Invalid interest ID: 'c06bb4b529'.
    [instance] => 5a20481d-e4a8-40da-845b-[redacted]
)

Any ideas?

nekromoff avatar Apr 15 '20 13:04 nekromoff

I'm having the same issue even tho I have the correct id

Tbiniimene avatar Feb 11 '22 13:02 Tbiniimene

help?

Tbiniimene avatar Feb 11 '22 14:02 Tbiniimene

same issue

WaqarTabish2807 avatar May 21 '22 18:05 WaqarTabish2807

You have to figure out how your Mailchimp account is set up (groups or tags and how they are actually set up) and write your code accordingly.

Tbiniimene avatar May 23 '22 08:05 Tbiniimene