I have an existing series of products with one variant option, "Size". Using the API, I am attempting to add a 2nd option, "Color". Below is an example of the array I am sending, using PUT /admin/products/#{id}.json to modify an existing product. HOWEVER, if I send the same information using POST /admin/products.json (create a new product) a new product is created with BOTH options, with no errors.
A couple notes:
1. I looked through the admin interface for clues, creating a new variant option requires "defaultValue" with the option name, so as you see in the array, I have also tried adding that value without success.
2. The return info from shopify is simply all the product information, indicating a successful update.
So, (tl,dr) What is the best way to update an existing product by adding the new variant option, "Size"?
RESArray ( [id] => 90230465 [created_at] => 2012-04-04 10:55:03 [handle] => my-product-handle [title] => My Product [product_type] => Tops [vendor] => My Online Store [body_html] => [tags] => blue, shirt [options] => Array ( [0] => Array ( [id] => 107709133 [position] => 1 [product_id] => 90230465 [name] => Size ) [1] => Array ( [id] => 1403143717 [name] => Color [position] => 2 [product_id] => 90230465 [defaultValue] => Blue ) ) [variants] => Array ( [0] => Array ( [id] => 211236403 [product_id] => 90230465 [position] => 1 [barcode] => [created_at] => 2012-04-04 10:55:03 [fulfillment_service] => manual [inventory_management] => shopify [inventory_policy] => deny [requires_shipping] => true [taxable] => 1 [title] => Small / Blue [sku] => BNV-F720003BS [inventory_quantity] => 0 [price] => 29.00 [grams] => 0 [compare_at_price] => [option1] => Small [option2] => Blue [option3] => [updated_at] => 2014-03-14 01:26:12 ) [1] => Array ( [id] => 211243301 [product_id] => 90230465 [position] => 2 [barcode] => [created_at] => 2012-04-04 12:56:38 [fulfillment_service] => manual [inventory_management] => shopify [inventory_policy] => deny [requires_shipping] => true [taxable] => 1 [title] => Medium / Blue [sku] => BNV-F720003BM [inventory_quantity] => 0 [price] => 22.00 [grams] => 0 [compare_at_price] => 29.00 [option1] => Medium [option2] => Blue [option3] => [updated_at] => 2014-03-14 01:26:12 ) [2] => Array ( [id] => 211243343 [product_id] => 90230465 [position] => 3 [barcode] => [created_at] => 2012-04-04 12:57:00 [fulfillment_service] => manual [inventory_management] => shopify [inventory_policy] => deny [requires_shipping] => true [taxable] => 1 [title] => Large / Blue [sku] => BNV-F720003BL [inventory_quantity] => 0 [price] => 29.00 [grams] => 0 [compare_at_price] => [option1] => Large [option2] => Blue [option3] => [updated_at] => 2014-03-14 01:26:12 ) ) [published] => false [updated_at] => 2014-03-14 01:26:12 [published_scope] => global [template_suffix] => )