Issue while creating product

1 0 0

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": "", "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" } ] }



Reply 1 (1)

497 67 75

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.