Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telephone numbers #300

Open
Alienturnedhuman opened this issue Mar 21, 2019 · 3 comments
Open

Telephone numbers #300

Alienturnedhuman opened this issue Mar 21, 2019 · 3 comments

Comments

@Alienturnedhuman
Copy link

Alienturnedhuman commented Mar 21, 2019

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.

@Azdaroth
Copy link
Member

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?

@adamgrad
Copy link
Member

@Azdaroth Sure, I will take care of this.

@Alienturnedhuman
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants