Update attribute option
application/json
PUT
/V1/products/attributes/{attributeCode}/options/{optionId}
cURL (application/json)
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/products/attributes/{attributeCode}/options/{optionId}' \
--header "Content-Type: application/json" \
--data '{"option":{"label":"string","value":"string","sort_order":42,"is_default":true,"store_labels":[{"store_id":42,"label":"string"}]}}'
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/products/attributes/{attributeCode}/options/{optionId}' \
--header "Content-Type: application/xml"
Request examples
{
"option": {
"label": "string",
"value": "string",
"sort_order": 42,
"is_default": true,
"store_labels": [
{
"store_id": 42,
"label": "string"
}
]
}
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<option>
<label>string</label>
<value>string</value>
<sort-order type="integer">42</sort-order>
<is-default type="boolean">true</is-default>
<store-labels type="array">
<store-label>
<store-id type="integer">42</store-id>
<label>string</label>
</store-label>
</store-labels>
</option>
</root>
Response examples (200)
true
Response examples (200)
true
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 (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
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 (400)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
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"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>