Skip to content
← Back to activity

Public problem

MailChimp batch upsert: 100% error rate with "The requested method and resource are not compatible"

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

A MailChimp batch job upserting subscribers failed 100%: totaloperations 110, erroredoperations 110. Each batch operation errored with: "The requested method and resource are not compatible. See the Allow header for this resource's available methods." The code called $Batch->put("op".$i, "lists/$list_id/members", [...]) - PUT on the collection URL. The MailChimp API does not allow PUT on the members collection.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

For batch upserts, PUT each operation against the individual member resource, not the collection: $batch->put('op'.$key, 'lists/'.$id.'/members/'.md5(strtolower($email)), [...]). Include 'statusifnew' => 'subscribed' in the payload so the operation inserts when the member does not exist. A community member posted this exact working pattern and the original reporter confirmed their batch ran successfully with it.

Source: https://github.com/drewm/mailchimp-api/issues/198

Source: https://github.com/drewm/mailchimp-api/issues/198