"You need to add option values for __" when creating a new product with several options

Highlighted
New Member
1 0 0

Hi there, when I make a POST request to /products.json with 2 or more product options, I get this error returned:

 

"errors": {
        "base": [
            "You need to add option values for Size",
            "You need to add option values for Printing Option"
        ]
    }

This is my request body:

 

{
  "product": {
    "title": "Bella Canvas Unisex Tee 3001",
    "vendor": false,
    "body_html": "",
    "product_type": false,
    "published": false,
    "metafields": [
      {
        "key": "createaly_product_id",
        "value": 1000,
        "value_type": "integer",
        "namespace": "global"
      }
    ],
    "variants": [],
    "options": [
      {
        "name": "Color",
        "values": [
          "White",
          "Black",
          "Asphalt",
          "Athletic Heather",
          "Autumn",
          "Canvas Red",
          "Forest",
          "Leaf",
          "Mustard",
          "Olive"
        ]
      },
      {
        "name": "Size",
        "values": [
          "XL",
          "2XL",
          "Small",
          "Large",
          "Medium",
          "3XL"
        ]
      },
      {
        "name": "Printing Option",
        "values": [
          "One-Sided",
          "Two-Sided"
        ]
      }
    ]
  }
}

My post request works and successfully creates a product 

 

0 Likes