[#737] Client_id using REST API

Migrated from Redmine #737 | Author: Priyanshu Rai
Status: Feedback | Priority: High, I’m very impatient | Created: 2021-07-13


How can I get the client_id of an already existing client using the REST API methods so that I can use it in my Manage Booking REST API call?

Another issue is how can I create a client with my own id (not auto-generated system-id) using the REST API Create client method?

Dmytro Bondarev wrote:

Hi! You can use API documentation | SimplyBook.me Online Scheduling to search clients and get their ids.
It is not possible to make client with predefined ID.

Priyanshu Rai wrote:

Dmitry Bondarev wrote:

Hi! You can use API documentation | SimplyBook.me Online Scheduling to search clients and get their ids.
It is not possible to make client with predefined ID.

The above-mentioned link would give me a list of clients but I want to get the client_id of a particular client. If I get a list of clients then in that I have to search for that particular client which would not be efficient if the list is very large. So is there any other method get the client_id.

Dmytro Bondarev wrote:

There is @filter[search]@ you can pass email for example to search client by email.

Priyanshu Rai wrote:

Priyanshu Rai wrote:

How can I get the client_id of an already existing client using the REST API methods so that I can use it in my Manage Booking REST API call?

Another issue is how can I create a client with my own id (not auto-generated system-id) using the REST API Create client method?

The above two issues are clear.

I want to ask another issue like let us assume that we want to book sessions with the providers for three different duration like 15min, 30min, and 45 min then how to change the duration according to user choice through REST API call means how can we change the start time and end time through REST API methods ?

Dmytro Bondarev wrote:

Just pass:

start_datetime	string	Booking start datetime
end_datetime	string	Booking end datetime

Priyanshu Rai wrote:

Dmitry Bondarev wrote:

API documentation | SimplyBook.me Online Scheduling
Just pass:
[…]

I have done this it sets the time according to my choice but there is an error or bug when a time slot of say 12:00 to 13:00 is available and I book from 12:00 to 12:15 then the booking is successful but when I want to book another time slot between 12:30 to 13:00 it is showing that time slot is not available so basically my first request is blocking the whole time slot (12:00 to 13:00) though the booking shown is from 12:00 to 12:15. How can I remove this error?

Dmytro Bondarev wrote:

Please check your calendar if there is something else that blocks this time.

Priyanshu Rai wrote:

Dmitry Bondarev wrote:

Please check your calendar if there is something else that blocks this time.

I have checked my calendar no event is blocking that but in my services setting, the duration of services set is 1 hr, and in the configuration setting the timeframe set is 60 minutes. Are these settings blocking the time?

Priyanshu Rai wrote:

Priyanshu Rai wrote:

How can I get the client_id of an already existing client using the REST API methods so that I can use it in my Manage Booking REST API call?

Another issue is how can I create a client with my own id (not auto-generated system-id) using the REST API Create client method?

Issue - How can I get booking details of a particular provider or client ??