Add option to attribute
Add option to attribute
POST /V1/products/attributes/{attributeCode}/options
curl \
-X POST https://magento2.winkelstraat.mac/rest/all/V1/products/attributes/{attributeCode}/options \
-d '{"option":{"label":"string","value":"string","sort_order":42,"is_default":true,"store_labels":[{"store_id":42,"label":"string"}]}}'
Request examples
{
"option": {
"label": "string",
"value": "string",
"sort_order": 42,
"is_default": true,
"store_labels": [
{
"store_id": 42,
"label": "string"
}
]
}
}
Response examples (200)
string
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 (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}