Flow of POST request made to shopify

New Member
3 0 0

Hey,

I want to confirm , whne we send multiple requests to shopify to create a product (POST api for product) , shopify will execute those requests in queue or parallelly ?

Like if I send 10 produts's request to shopify parallel , will shopify execute those requests parallely to create 10 products at a time or execute them in series one by one ?

 

Thanks in advance.

0 Likes
Shopify Staff
Shopify Staff
472 35 90

Hi @bajwa_rajat,

 

It's a little more complicated then that due to latency, order of arrival of requests, and available workers.  But without getting to the nitty gritty details, in general they will be processed in the order they arrive.  Is there a scenario where this would make a difference for your app?  Why would the order of the creation of products (sent all in parallel) matter?

Developer Experience @ Shopify
0 Likes
Highlighted
New Member
3 0 0

Hey Ryan,

 

I am using product api to create products in shopify store, but as data of product is in large amount , so it takes around 40-45 seconds to create one product and next product's api do not execute untill previous one is completed. We have thousands of products , so it would take very large period of time to upload all. So, is there any way we can send all requests at same time like in parallel , so that all products can be created within same time period ?

0 Likes
Shopify Staff
Shopify Staff
472 35 90

Are you hitting errors on product creations? Or it just takes a while to complete? As long as there are no errors I think your current approach is fine, when sending that many requests to the API it's not certain they will be processed in parallel, many will be queued.

Developer Experience @ Shopify
0 Likes
New Member
3 0 0

I am not getting any errors , only it takes time around 45 seconds to create 1 product. So, that's why I was thinking if I send requests in parallel to shopify , it may take less time

0 Likes