Closed damienromito closed 4 years ago
The method mailchimp.post() is ok. But if i decide to change the method to mailchimp.put(), it returns error :
mailchimp err Error: The requested method and resource are not compatible. See the Allow header for this resource's available methods.
I don't understand because parameters are exactly the same.
var Mailchimp = require('mailchimp-api-v3') var mailchimpListId = "xxxxx" var mailchimpApiKey = "xxxx" var mailchimp = new Mailchimp(mailchimpApiKey); var mailchimpData = { email_address: user.email, status: "subscribed", "merge_fields": { "FNAME": user.firstName, .... } } mailchimp.put(`/lists/${mailchimpListId}/members`, mailchimpData)
There is no PUT endpoint there as far as i can tell https://mailchimp.com/developer/reference/lists/list-members/ To update,you need the subscriber hash as well
The method mailchimp.post() is ok. But if i decide to change the method to mailchimp.put(), it returns error :
I don't understand because parameters are exactly the same.