magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Updating customer via API resets default billing adres

Open PaulBoss opened this issue 10 years ago • 7 comments

Preconditions

Magento 2.1 A customer with a default billing adres set

Steps to reproduce

  1. Update firstname and lastname via the API. PUT /rest/v1/customers/1 {"customer":{"id":1,"email":"[email protected]","firstname":"Paul","lastname":"Boss","middlename":null,"gender":0}}

Expected result

  1. Customer with id 1 has firstname "Paul" and lastname "Boss". Other data is left intact

Actual result

  1. Default billing address option is reset. The address is stil available, but the "default billing address" option is now false.

PaulBoss avatar Nov 09 '16 14:11 PaulBoss

Same goes for Default shipping addresses.

Bbbrinks avatar Nov 10 '16 13:11 Bbbrinks

Workaround would be to fetch the customer before updating and setting the default_billing and default_shipping values in the PUT request.

Makes me wonder what other data is lost when using partial PUT requests.

Bbbrinks avatar Nov 10 '16 13:11 Bbbrinks

Hi, thank you for your request. Internal ticket MAGETWO-59872 was created

olysenko avatar Nov 25 '16 17:11 olysenko

as workaround can advice to modify put data and add:

"default_billing": <address_id> , "default_shipping": <address_id>

vzabaznov avatar Dec 15 '16 16:12 vzabaznov

This issue was fixed in develop branch. It also was fixed for ver. 2.1 in internal ticket MAGETWO-61907 and for ver. 2.0 in internal ticket MAGETWO-61908. Fixes will be available in one of the nearest releases.

veloraven avatar Jun 20 '17 12:06 veloraven

@PaulBoss, thank you for your report. The issue is already fixed in 2.2.0

magento-engcom-team avatar Sep 20 '17 22:09 magento-engcom-team

Still face the same issue on 2.2.1 (enterprise edition)

MarWestermann avatar Jan 23 '18 10:01 MarWestermann