Cost
Add or update product cost. Input item should correspond to \Magento\Catalog\Api\Data\CostInterface. If any items will have invalid cost, store id or sku, 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.
Header parameters
Content-TypestringOptionalExample:
application/jsonBody
objectOptionalExample:
{"prices":[{"cost":-27116009.88391751,"store_id":-94509668,"sku":"pariatur Ut","extension_attributes":{}},{"cost":214412.94627031684,"store_id":-93183852,"sku":"elit","extension_attributes":{}}]}Responses
200
OK
application/json
Responseobject
401
Unauthorized
application/json
500
Internal Server Error
application/json
post
/V1/products/costPOST /V1/products/cost HTTP/1.1
Host: {{baseurl}}
Content-Type: application/json
Accept: */*
Content-Length: 195
{
"prices": [
{
"cost": -27116009.88391751,
"store_id": -94509668,
"sku": "pariatur Ut",
"extension_attributes": {}
},
{
"cost": 214412.94627031684,
"store_id": -93183852,
"sku": "elit",
"extension_attributes": {}
}
]
}[
{
"message": "Duis",
"parameters": [
"Excepteur in pariatur",
"ut n"
],
"extension_attributes": {}
},
{
"message": "aliqua pariatur",
"parameters": [
"tempor adipisicing voluptate est",
"incididunt est sint in proident"
],
"extension_attributes": {}
}
]