to get a personalized navigation.
to get a personalized navigation.
I believe this is a functional oversight in the implementation of the Customer/PUT API call.
If I POST a new Customer and supply only a Main Address, the optional addressses (Billing or Delivery address) will have the checkbox "same as main" marked, and the underlying address will be the same Address record (same Id property) as the main record:
If I have created an existing Billing or Delivery address and want to empty it, there is no option in the PUT API to do so.
- supplying empty strings will throw an error (country must have a value)
- supplying null will not update the address record
- supplying the same data as the main record (overwrite the Billing address with the Main address) will result in a separate address record, and "same as main" will not be checked:
This matches the functionality as it is implemented in the screen. There is no way to empty a Country, because it must always have a value:
The way to empty a country in the screen is to manually check the "same as main" checkbox, this will overwrite the entire address record:
However, the Customer/PUT API call offers no way to influence this checkbox at all, which means I cannot mirror the screen functionality using API calls. It means that I am never able to empty a Billing/Delivery address.
Hello, Customer > General Information > Country is a mandatory field. That field is automatically populated, even creating a new Customer in the UI, therefore we can not override the value with null. This is valid for all related Country fields, also not possible with on-the-fly entry.
Thank you, the original bug report is that there is no option to pass the "same as main" parameter through the API. So I am unable to simulate the action I would do in the screen within an API call.
Copyright © 2022 Visma.com. All rights reserved.