Add new option for bundle product
application/json
PUT
/V1/bundle-products/options/{optionId}
cURL (application/json)
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/bundle-products/options/{optionId}' \
--header "Content-Type: application/json" \
--data '{"option":{"option_id":42,"title":"string","required":true,"type":"string","position":42,"sku":"string","product_links":[{"id":"string","sku":"string","option_id":42,"qty":42.0,"position":42,"is_default":true,"price":42.0,"price_type":42,"can_change_quantity":42,"extension_attributes":{}}],"extension_attributes":{}}}'
curl \
--request PUT 'https://magento2.winkelstraat.mac/rest/all/V1/bundle-products/options/{optionId}' \
--header "Content-Type: application/xml"
Request examples
{
"option": {
"option_id": 42,
"title": "string",
"required": true,
"type": "string",
"position": 42,
"sku": "string",
"product_links": [
{
"id": "string",
"sku": "string",
"option_id": 42,
"qty": 42.0,
"position": 42,
"is_default": true,
"price": 42.0,
"price_type": 42,
"can_change_quantity": 42,
"extension_attributes": {}
}
],
"extension_attributes": {}
}
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<option>
<option-id type="integer">42</option-id>
<title>string</title>
<required type="boolean">true</required>
<type>string</type>
<position type="integer">42</position>
<sku>string</sku>
<product-links type="array">
<product-link>
<id>string</id>
<sku>string</sku>
<option-id type="integer">42</option-id>
<qty type="float">42.0</qty>
<position type="integer">42</position>
<is-default type="boolean">true</is-default>
<price type="float">42.0</price>
<price-type type="integer">42</price-type>
<can-change-quantity type="integer">42</can-change-quantity>
<extension-attributes>
</extension-attributes>
</product-link>
</product-links>
<extension-attributes>
</extension-attributes>
</option>
</root>
Response examples (200)
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 (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>