Development discussions around Shopify APIs
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
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.
I would be grateful if someone could tell me what this might be related to.
Solved! Go to the solution
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
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
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
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
User | RANK |
---|---|
5 | |
5 | |
4 | |
4 | |
4 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022