POST /V1/products/options
curl \
-X POST https://magento2.winkelstraat.mac/rest/all/V1/products/options \
-d '{"option":{"product_sku":"string","option_id":42,"title":"string","type":"string","sort_order":42,"is_require":true,"price":42.0,"price_type":"string","sku":"string","file_extension":"string","max_characters":42,"image_size_x":42,"image_size_y":42,"values":[{"title":"string","sort_order":42,"price":42.0,"price_type":"string","sku":"string","option_type_id":42}],"extension_attributes":{}}}'
Request examples
{
"option": {
"product_sku": "string",
"option_id": 42,
"title": "string",
"type": "string",
"sort_order": 42,
"is_require": true,
"price": 42.0,
"price_type": "string",
"sku": "string",
"file_extension": "string",
"max_characters": 42,
"image_size_x": 42,
"image_size_y": 42,
"values": [
{
"title": "string",
"sort_order": 42,
"price": 42.0,
"price_type": "string",
"sku": "string",
"option_type_id": 42
}
],
"extension_attributes": {}
}
}
Response examples (200)
{
"product_sku": "string",
"option_id": 42,
"title": "string",
"type": "string",
"sort_order": 42,
"is_require": true,
"price": 42.0,
"price_type": "string",
"sku": "string",
"file_extension": "string",
"max_characters": 42,
"image_size_x": 42,
"image_size_y": 42,
"values": [
{
"title": "string",
"sort_order": 42,
"price": 42.0,
"price_type": "string",
"sku": "string",
"option_type_id": 42
}
],
"extension_attributes": {}
}
Response examples (401)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}