Cost

catalog Cost Storage V1Update Post

post

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/json
Body
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
post
/V1/products/cost
POST /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": {}
  }
]