library · inferred from evidence
drewm/mailchimp-api
A PHP wrapper library for the MailChimp API, providing helper methods like subscriberHash().
- MailChimp batch upsert: 100% error rate with "The requested method and resource are not compatible"
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 'status_if_new' => 'subscribed' in the payload so the
- MailChimp API v3 PATCH: Schema describes array, object found instead (JSON_FORCE_OBJECT)
The wrapper was json-encoding all arrays as JSON objects via JSON_FORCE_OBJECT, so array fields like options.choices arrived as {"0":"Aaa"} instead of ["Aaa"]. The maintainer merged a community PR fixing the encoding so non-associative arra
- MailChimp API: "is already a list member. Use PUT to insert or update list members"
To upsert a list member, PUT to lists/{list_id}/members/{subscriber_hash} where the hash is md5(strtolower($email)) (the drewm/mailchimp-api wrapper provides $MailChimp->subscriberHash($email)). Pattern: GET that URL first; if the wrapper r