POST /V1/configurable-products/{sku}/options
curl \
-X POST https://magento2.winkelstraat.mac/rest/all/V1/configurable-products/{sku}/options \
-d '{"option":{"id":42,"attribute_id":"string","label":"string","position":42,"is_use_default":true,"values":[{"value_index":"string","extension_attributes":{}}],"extension_attributes":{},"product_id":42}}'
Request examples
{
"option": {
"id": 42,
"attribute_id": "string",
"label": "string",
"position": 42,
"is_use_default": true,
"values": [
{
"value_index": "string",
"extension_attributes": {}
}
],
"extension_attributes": {},
"product_id": 42
}
}
Response examples (200)
42
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 (400)
{
"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 (500)
{
"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"
}