How do you PUT (update) a customer using the rest api?
I have a ticket open on github, but I was wondering if I'm just doing this wrong..
https://github.com/magento/magento2/issues/5115
I've created a customer in admin. I've noted the entity id. It is 22.
I'm attempting to PUT using the rest api to myhost.com/rest/V1/customers/{{myEntityId}}
The actual URL is http://192.168.5.65/rest/V1/customers/22 just to avoid confusion.
I'm sending the following json:
{
"customer": {
"firstname": "NewMitchell",
"lastname": "NewThompson"
}
}
Magento documentation states you only need to send the properties you want to update.
I'm expecting the customer object to be updated, but its actually trying to create a new customer. I'm seeing this message come back:
{
"message": "Please enter a customer email.",
"trace": "#0 /var/www/vendor/magento/module-eav/Model/Entity/VersionControl/AbstractEntity.php(90): Magento\\Customer\\Model\\ResourceModel\\Customer->_beforeSave(Object(Magento\\Customer\\Model\\Customer))\n#1 /var/www/vendor/magento/framework/Interception/Interceptor.php(74): Magento\\Eav\\Model\\Entity\\VersionControl\\AbstractEntity->save(Object(Magento\\Customer\\Model\\Customer))...blahblahblah
I'm afraid I may be doing it wrong, but at the same time, I think I may have identified a bug.
Can anyone test this and see if it works or not? I'm using Magento CE RC3, but i've tested it on Magento CE 2.0.6 and it doesn't work there either.