Hi,
I'm trying to change or add product options via the API with no success.
I created a new product on my dev store and then tried to do the simplest thing - change the name of the first (default) option:
PUT /admin/products/1196937156.json
{
"product": {
"id": 1196937156,
"options": [
{
"id": 1487251524,
"product_id": 1196937156,
"name": "Color",
"position": 1
}
]
}
}
But the response was:
{
"product": {
"id": 1196937156,
"title": "My Sample Product",
"body_html": "",
"vendor": "Green Brothers Playground",
"product_type": "",
"created_at": "2015-08-20T13:28:06+03:00",
"handle": "product",
"updated_at": "2015-08-20T13:40:07+03:00",
"published_at": "2015-08-20T13:27:00+03:00",
"template_suffix": null,
"published_scope": "global",
"tags": "",
"variants": [
{
"id": 4402236356,
"product_id": 1196937156,
"title": "Default Title",
"price": "0.00",
"sku": "",
"position": 1,
"grams": 0,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": null,
"option1": "Default Title",
"option2": null,
"option3": null,
"created_at": "2015-08-20T13:28:06+03:00",
"updated_at": "2015-08-20T13:28:06+03:00",
"requires_shipping": true,
"taxable": true,
"barcode": "",
"inventory_quantity": 1,
"old_inventory_quantity": 1,
"image_id": null,
"weight": 0,
"weight_unit": "g"
}
],
"options": [
{
"id": 1487251524,
"product_id": 1196937156,
"name": "Title",
"position": 1,
"values": [
"Default Title"
]
}
],
"images": [],
"image": null
}
}
I also tried to add new options with no success.
I also tried to add them manually and then change their names - with no success whatsoever.
Any ideas of what could be wrong?
Thanks