Using REST API to create product with 10+ variants

New Member
1 0 0

I'm not a developer but I can usually hack my way through the API to build private apps for our shop.  I have not been able to commit the time to learn GraphQL, so I'm still trying to muddle through with REST. 

 

I've built an inventory intake web app to create products with variants.  I have no problem creating products with two or fewer variants, but those with more are not created.  I have confirmed that the array is being built correctly for all the variants.  Is there a limitation when products are created this way?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
502 98 90

Hi @racerx 

 

There is a 100 variant limit. Are you receiving an error? Here is an example with three options. 

 

{
  "product": {
    "title": "Burton Custom Freestyle 151",
    "body_html": "<strong>Good snowboard!</strong>",
    "vendor": "Burton",
    "product_type": "Snowboard",
    "variants": [
      {
        "option1": "First",
        "price": "10.00",
        "sku": "123"
      },
      {
        "option1": "Second",
        "price": "20.00",
        "sku": "123"
      },
			  {
        "option1": "third",
        "price": "20.00",
        "sku": "123"
      }
    ]
  }
}

Can you post your API call so we can debug? Thanks! 

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes