problem when creating product variants with inventory quantity more than 9800

Solved
iPutin
Tourist
6 1 0

Shopify+. I am creating product variants via api. I need to create 90 variants (no more than 100), the quantity of each variant must be 200. 

when I run my api script, variants are created with a quantity of 200, but the problem arises when the total number exceeds 9600/9800, then the rest of the variants are created with zero quantity. 

Screenshot from 2021-08-04 12-51-23.png

iPutin_0-1628070984869.png


I would be grateful if someone could tell me what this might be related to.

0 Likes
GrahamS
Shopify Staff
Shopify Staff
130 19 25

Hello @iPutin ,

Can I ask for an x-request-id for the api call you are running? We can take a look to see what might be happening here.

Best,

Graham

Graham S | 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

0 Likes
iPutin
Tourist
6 1 0

hello @GrahamS 

Thank you for your reply. 

Updated question is here . I'm not sure how I can get from my script x-request-id , i could get x-request-id from postman, but will it somehow related my script. If I provide you with my source code, would it be helpful to you?

I am not getting an error on the console, so it is difficult for me to analyze it



0 Likes
iPutin
Tourist
6 1 0

This is an accepted solution.

my script creates 90 variants, then deletes the most recent one and adds a new variant, when a new variant is added, it was necessary to insert the quantity for a new variant. I needed to get all list of variants.

It turned out that when you retrieves a list of product variants, it returns only 50 variants by default, accordingly, I could not add quantity for the rest variants that went beyond 50.
I set the limit for the number of variants I needed, after which it worked

0 Likes