I want to start managing (via automation) Users’ ‘Office’ phone numbers and to do so I’m using the REST API User Patch method.
I can easily create a phone number with label ‘Office’, along with the Country, Code and Number attributes. However, if there are other existing phone numbers on the User’s account, I encounter these issues:
-
Using the api, the entire phone_numbers array must be written in its entirety, otherwise data is lost. When a user has a phone number other than ‘Office’ already recorded (let’s say it’s a ‘Mobile’ number) in order to preserve the Mobile phone number, I must first retrieve the phone_numbers array and update (or add) the Office number. Then I can write the array back to the database with both Office and Mobile numbers intact. (If I just write-out an array with the Office number in it, all the other numbers are deleted.)
-
The API requires a label, but the user interface does not require a label. We have users who have created (via the U/I) phone numbers without labels. The API will permit neither (C#) null nor “” to be passed as the label, which means the numbers without labels can’t be preserved, if we proceed to automate the Office number as described above.
Is there a way to update a particular phone number without destroying other numbers, besides the way I’ve described above ?
How can we handle numbers without labels using automation, if at all ?
Thanks.