Open Alienturnedhuman opened 5 years ago
Hi @Alienturnedhuman, thanks for reporting the issue, all phone numbers should actually be strings.
@adamgrad Can you please check where we state that the phone numbers are integers and change them strings?
@Azdaroth Sure, I will take care of this.
Hi, here is one page where I noticed it:
http://developers.bookingsync.com/reference/endpoints/inquiries/
Although I see at the top it specifies string, the JSON examples show it as an integer.
I have started developing an API for a client's website who is switching their service from their current provider to BookingSync, and I have noticed that the documentation shows telephone numbers being sent as integers in the JSON, rather than strings.
Treating telephone numbers as numbers is not good practice, as telephone numbers are not 'numbers' they are strings of digits, and often begin with one or more leading zero which is then lost when stored as a number type in the JSON. They should be stored as a string and sent as a string to prevent data loss.
As I have not got to the testing phase, I have not been able to check whether JSON strings are accepted by the API - however if they are not I would strongly urge for this to be changed, and for the API Documentation to be updated accordingly.