0

I'm trying a PUT on Magento 2 REST API through POSTMAN like this:

https://domain/rest/V1/products/IP_X

With only a price change on the json content.

getting the following error message:

{
    "message": "\"%fieldName\" is required. Enter and try again.",
    "parameters": {
        "fieldName": "product"
    }
}

The REST API spec https://devdocs.magento.com/guides/v2.3/rest/list.html indicates the URL to be "PUT /V1/products/:sku" and the json should include only the parameter to change.

Any idea?

[RESOLED]

I found the answer, the json content should be like this:

{ "product": { "price": "500.55" } } 
  • 1
    I found the answer, the json content should be like this: { "product": { "price": "500.55" } } – A Zuniga Aug 8 at 12:59
0

your data is in json format. Removed json_encode from there it will resolve this issue.

  • Hi Anas, the "Content-Type" needs to be "application/json", the problem was that I was doing a bad content package. Here it is how it worked: { "product": { "price": "500.55" } } Tx for your help! – A Zuniga Aug 8 at 13:01

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.