Add or update product prices. If any items will have invalid price, price type, website id, sku, customer group or quantity, 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/tier-prices
cURL (application/json)
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/products/tier-prices' \
--header "Content-Type: application/json" \
--data '{"prices":[{"price":42.0,"price_type":"string","website_id":42,"sku":"string","customer_group":"string","quantity":42.0,"extension_attributes":{}}]}'
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/products/tier-prices' \
--header "Content-Type: application/xml"
Request examples
{
"prices": [
{
"price": 42.0,
"price_type": "string",
"website_id": 42,
"sku": "string",
"customer_group": "string",
"quantity": 42.0,
"extension_attributes": {}
}
]
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<prices type="array">
<price>
<price type="float">42.0</price>
<price-type>string</price-type>
<website-id type="integer">42</website-id>
<sku>string</sku>
<customer-group>string</customer-group>
<quantity type="float">42.0</quantity>
<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 (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>