Shopify themes, liquid, logos, and UX
I am currently working on integrating the Shopify API into our system to create products dynamically. However, I've encountered an issue when attempting to create products with multiple variants. Product is not creating with variants. Could you please provide guidance on how to achieve this using the Shopify API? I've thoroughly reviewed the documentation but haven't found a clear solution.
i am using this payload
{ "file": "https://cdn.pixabay.com/photo/2015/07/13/16/49/night-table-lamp-843461_1280.jpg", "title": "Manish Product111", "SKU": "Manish Product111", "bar_code": "Test bar code", "weight": 1, "dimensions": "12*16", "price": 100, "cost_price": 80, "wholesale_price": 75, "variants": [ { "option1": "Red", "price": 10.00, "sku": "red-variant-sku" } ] }
Hi @VaidbanV ,
This is Theodore from PageFly - Shopify Page Builder App.
Hi @Amandalman,
This is Theodore from PageFly - Shopify Page Builder App.
Instead of placing the variants array directly in the main payload, nest it within a "product" object. Include the image URL within an "image" object with an "src" key. The variants array itself can remain the same, containing details for each variant (option, price, SKU).
By making these adjustments and referring to the official Shopify API documentation for product creation with variants, you should be able to successfully create products with multiple variants through your system integration.
Best regards,
Theodore | PageFly
Best regards,
Theodore | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024