Migrated from Redmine #56 | Author: Egor Timofeev Status: New | Priority: Normal | Created: 2017-10-17
Hello,
Can you please advice if we have any way to get booking information/ client information from the system using API?
We plan to use simplybook in one of our pojects and need to build some extra functions on top of it. To be able to do that we need to have ability to get booking infromation and client information and do some search in that.
Do you have anyway for that? If no may be this could be implmented?
Do you have more information about hooks? Can you please share a link where I can check it.
Also API call getClientByLoginHash - can you please advice how can I get that hash for a client? Is it coming from getClientInfoByLoginPassword when I sign in using client email and password.
And for the last getClientInfoByLoginPassword call - can I user phone as a login instaed of email?
In the settings of API plugin you can find info about hooks.
The callback data will be presented in the raw post data in JSON format. The following fields are available:
booking_id - Booking ID
booking_hash - Booking hash
company - Your company login
notification_type - Notification type. Can be ‘create’, ‘cancel’, ‘notify’, ‘change’
You can use getClientByLoginHash or getClientInfoByLoginPassword.
It is better to use getClientByLoginHash in case you have your own clients store and do not want to store passwords in plain text.
getClientInfoByLoginPassword you can use when your clients login directly and you do not store clients at your end.
There is no option to use phone instead email as a login.
When you create client via signUpClient or addClient method you will get client information with client hash.
The difference between methods is that signUpClient method sends signup email.
When I do getClientInfoByLoginPassword I get some client_hash. But seems I can’t get client infromation based on that. Can you clarify what is it in this case?
ACtually I can.. but it is not quite clear about getClientByLoginHash call. What is login_hash there?
I thought may be I can get it by getClientInfoByLoginPassword and save and then get client information based on the hash so I do not need to store username and password.