There are multiple store views in my site. I created a customer and set his store view to some value that is not the default.
Use the rest api to change the first name of the customer (Like: put to PUT rest/V1/customers/8
)
I used the following body
{ "customer": {
"id": 1,
"group_id": 1,
"default_billing": "0",
"default_shipping": "0",
"created_at": "2019-05-13 14:33:11",
"updated_at": "2019-05-13 14:33:11",
"created_in": "alternate store view",
"email": "xxx@redacted.com",
"firstname": "firstname alternate",
"lastname": "lastname",
"gender": 0,
"website_id": 1,
"addresses": [],
"disable_auto_group_change": 0
}
}
So All the fields not passed in the PUT call are not changed (Including store_id) but it changed the store_id to default store_id.
I need to know why it changed the store_id
, is store_id
is mandatory if yes then why it does not show the error or it just save with default store_id if store_id not given in the request.
Any help, experience and knowledge sharing would be appreciated.