Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating members in batching does not work #317

Open
ynvygy opened this issue Dec 9, 2021 · 1 comment
Open

updating members in batching does not work #317

ynvygy opened this issue Dec 9, 2021 · 1 comment

Comments

@ynvygy
Copy link

ynvygy commented Dec 9, 2021

Hello
So i have to batch a list of members who are either new or will be updated. In the docs example i saw you'd need something like this
gibbon.batches.create(body: {
operations: [{
method: "POST",
path: "lists/#{ list_id }/members",
body: "{...}" # The JSON payload for PUT, POST, or PATCH
}, ...]})

So here the JSON payload is the same. if it's a PUT or POST (the upsert and create have the exact same body), but this would not work, because the method is 'POST' and if the member is there, it will throw a 400. But if i change that to 'PUT' then this would not go through, signaling a 405 error of method not allowed.
Is updating via batching not supported or am i missing something ?

@amro
Copy link
Owner

amro commented Dec 9, 2021

Hmm, Gibbon should support anything the MailChimp API allows. Have you asked MailChimp (or I wonder if their docs mention this) whether their API supports this via the batch API? So long as the payload is formatted properly then their API determines what to do. Gibbon is just a light weight wrapper around it with no business logic to speak of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants