Skip to main content
1 of 5
Kirti Nariya
  • 3.1k
  • 2
  • 24
  • 53

Magento 2: Rest API "PUT" method Customer is not updated

Rest API for updating customer PUT method not working. Every time creating new customer.

Method: PUT

Request URL: http://localhost/magento/rest/en/V1/customers/55

Body:

{
   "customer": {
     "email": "[email protected]",
     "firstname": "firstname new",
     "lastname":  "lastname new",
     "website_id": 1
   }
}

Also when pass the customer Email Id then response is throwing below error.

Response:

{
    "message": "A customer with the same email address already exists in an associated website."
}
Kirti Nariya
  • 3.1k
  • 2
  • 24
  • 53