1

I've some problems with updating the name of my product. I'm using the REST CALL API.

Here's the PHP Code

Here's My PHP code

Here's the error

Here's the error

I'm using the PUT REST CAll from product repository, to update the name of a product. Getting this error and just can't seem to find out why.

EDIT 1 : I managed to pass by this error by giving the attributesetId i use, he then threw ma an error that i needed to give the SKU in the json string, I did that, and now he throws me an error that I can't save the product, reason for this is that you can't update the SKU number because it's unique. Why do I need to add the SKU in my json file, i already gave it by with the rest call, as i add the sku after the URL ?

TanguyB
2131 silver badge13 bronze badges
asked Jun 3, 2016 at 9:10

1 Answer 1

1

Magento use Upsert for PUT request. You need provide full data to update entity.

So, get entity by id, update needed filed and use put to update it

answered Jun 3, 2016 at 12:42

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.