Add or update product's special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from update list and \Magento\Catalog\Api\Data\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the update exception will be thrown.
application/json
POST
/V1/products/special-price
cURL (application/json)
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/products/special-price' \
--header "Content-Type: application/json" \
--data '{"prices":[{"price":42.0,"store_id":42,"sku":"string","price_from":"string","price_to":"string","extension_attributes":{}}]}'
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/products/special-price' \
--header "Content-Type: application/xml"
Request examples
{
"prices": [
{
"price": 42.0,
"store_id": 42,
"sku": "string",
"price_from": "string",
"price_to": "string",
"extension_attributes": {}
}
]
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<prices type="array">
<price>
<price type="float">42.0</price>
<store-id type="integer">42</store-id>
<sku>string</sku>
<price-from>string</price-from>
<price-to>string</price-to>
<extension-attributes>
</extension-attributes>
</price>
</prices>
</root>
Response examples (200)
[
{
"message": "string",
"parameters": [
"string"
],
"extension_attributes": {}
}
]
Response examples (200)
<?xml version="1.0" encoding="UTF-8"?>
<root type="array">
<root>
<message>string</message>
<parameters type="array">
<parameter>string</parameter>
</parameters>
<extension-attributes>
</extension-attributes>
</root>
</root>
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>