Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Randomly getting "422 unprocessable entity" response in customer send_invite API

Solved

Randomly getting "422 unprocessable entity" response in customer send_invite API

sharonbabu
Shopify Partner
4 0 0

Hi,

I am using customer send invite API to send bulk invites to customer. But sometimes after sending 5(not accurate) sucessfull invites i am getting this error
{"code":422,"statusText":"Unprocessable Entity","body":{"errors":{"base":["Error sending account invite to customer."]}}.

Why is this happening?

"x-request-id":["3b9ba7ca-e78f-4118-9ed3-1e19ba7b2e3f"]

 

Accepted Solution (1)

Alan
Shopify Staff
129 15 25

This is an accepted solution.

Hey @sharonbabu - thanks for getting in touch. This was a great question and I was able to do a bit of looking into this for you on our end here. Generally, there shouldn't be an error like this surfacing and Bulk Invites should send out correctly to customers when the API call is made. 

However, there is a "throttle" in place for Developer/Partner test stores, so if you are using one of those types of development/test stores to test this feature, it's possible you would see a 422 error like the one you mentioned above. This throttle does limit test/development stores from sending more than five bulk customer account invites.

 

That said, I'm going to send a note up to our developers on our end to see if we can take a look at removing this limitation as I do understand how the limitation can impact testing workflows when you're building an integration and want to work on scaling it to handle large operations like this. I can't guarantee that this will be implemented, but I'm more than happy to advocate for even an adjustment to the limitation as I get how a larger amount would help with app testing/stress-testing. 

 

Thanks again for reaching out - really appreciate you bringing this to our attention. 

 

Cheers!

Alan | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 4 (4)

Alan
Shopify Staff
129 15 25

This is an accepted solution.

Hey @sharonbabu - thanks for getting in touch. This was a great question and I was able to do a bit of looking into this for you on our end here. Generally, there shouldn't be an error like this surfacing and Bulk Invites should send out correctly to customers when the API call is made. 

However, there is a "throttle" in place for Developer/Partner test stores, so if you are using one of those types of development/test stores to test this feature, it's possible you would see a 422 error like the one you mentioned above. This throttle does limit test/development stores from sending more than five bulk customer account invites.

 

That said, I'm going to send a note up to our developers on our end to see if we can take a look at removing this limitation as I do understand how the limitation can impact testing workflows when you're building an integration and want to work on scaling it to handle large operations like this. I can't guarantee that this will be implemented, but I'm more than happy to advocate for even an adjustment to the limitation as I get how a larger amount would help with app testing/stress-testing. 

 

Thanks again for reaching out - really appreciate you bringing this to our attention. 

 

Cheers!

Alan | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

sharonbabu
Shopify Partner
4 0 0

Hi @Alan 

 

Thanks for the reply.

Could you please confirm that the above limit is for developer/partner test stores only and not live stores?

sharonbabu
Shopify Partner
4 0 0

Hi @Alan117 

 

Thank you for spending your valuable time on our enquiry and appreciate your detailed response.

 

Could you please confirm that the above limit is only for developer/partner test stores and not for live stores? So, if we use the API service along with a Live store, we will be able to send bulk emails without any limit?

bbogdan
Shopify Partner
1 0 0

Hi @Alan ,
I want to migrate to shopify a customer and the first step of the process is to migrate his old products.
I started his project in partner account on a demo store but I cannot migrate his data due this 422 error. 
How can I migrate his stuff without error?
Mention (The client has 13000 products and 350 categories and I estimate I have to send around 60-80k requests. I tried to optimize the number the requests as much as I could.)
What solutions I have for migrating a big customer in shopify in my partner account ?