0

I send a HTTP PUT request using this url route /rest/V1/products/{SKU}

JSON:

{
  "product": {
  "name": "Test title",
  "price": 123
  }
}

But nothing is changed on the product.

The response is the same I get when sending a HTTP GET request. So it seems to just ignore that it's an update request.

The product was created by sending a POST request. So POST and GET is working fine.

Any ideas?

2

The problem is the route. Using /V1/products/{SKU} will update a store view, but not All store views. And since Price is a global setting, then nothing is change.

Changing the route to /all/V1/products/{SKU} fixed the problem.

1

Your payload (JSON Body) has to begin with product.

Here's a working example:

{
  "product": {
    "price": 123.45
  }
}
  • Doesn't my JSON begin with "product"?? – Casper Skovgaard Jan 26 '17 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.