Development discussions around Shopify APIs
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 |
---|---|
8 | |
6 | |
3 | |
3 | |
3 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By