[#297] Where to get clientHash from when Webhook is used

Migrated from Redmine #297 | Author: Kay Bucksch
Status: New | Priority: Normal | Created: 2018-12-03


Hello,

I am trying to implement a flow with the help of the webhook. Actually I can see that i am getting the following data when the webhoof arrives:

{
  "booking_id": "293",
  "booking_hash": "5ac77d043aa8ce...",
  "company": "THE_COMPANY_NAME",
  "notification_type": "create"
}

With the help of the company id and the hash I am able to request “getBookinDetails” with the following data:

{
  "result": {
    "id": "293",
    "event_id": "1",
    "unit_id": "1",
    "client_id": "277",
    "start_date_time": "2018-11-30 16:00:00",
    "end_date_time": "2018-11-30 16:20:00",
    "is_confirmed": "0",
    "code": "f6u..."
  },
  "id": "293",
  "jsonrpc": "2.0"
}

But now it seems I need to request the client “getClientInfo” to get the email or any data the customer has used, isn’t it? We pass these data into the iframe (or javascript beforehands). I need to access these to be able to get a relation between booking and customer.

Kay Bucksch wrote:

To make it more clear:

If I need to access “getClientInfo” where to get the clientHash from? (API documentation | SimplyBook.me Online Scheduling)

Redmine Admin wrote:

You need to use admin API to be able to get client Company administration service methods - Company administration service methods - SimplyBook.me

Auth procedure for Admin API is slightly different and described here API documentation | SimplyBook.me Online Scheduling