[#661] Booking rpc call timing out

Migrated from Redmine #661 | Author: Caleb Grimah
Status: New | Priority: High, I’m very impatient | Created: 2021-03-14


Hello, i have been using the admin booking endpoint to create bookings, but it just suddenly stopped working around Thursday. The request to create bookings just times out when i try to create a booking.

Redmine Admin wrote:

please provide you company login, api url and raw http requst

Yurii Dunaev wrote:

Hi. I have the same problem.

curl --location --request GET 'https://user-api-v2.simplybook.me/admin/timeline/slots?date_from=2021-03-15&date_to=2021-03-23&provider_id=11' \
--header 'X-Token: 62add075c903179de178d28b6dd107f4d887775bf3660cf159a619ac15aa80ae' \
--header 'X-Company-Login: fjor' \
--header 'Contet-type: application/json'

Dmytro Bondarev wrote:

It works fine for me, but i would suggest to increase speed:

  1. Use this @https://user-api-v2.simplybook.it@ host
  2. you must reuse token, unless it is expired. Do not make token for each call.

Caleb Grimah wrote:

Dmitry Bondarev wrote:

It works fine for me, but i would suggest to increase speed:

  1. Use this @https://user-api-v2.simplybook.it@ host
  2. you must reuse token, unless it is expired. Do not make token for each call.

Hello, this issue has been resolved. thanks, I want to use the simply-book rest api to create a booking for customers that don’t have an account with simply-book which means they don’t have a client id..where do i supply the customer information information. also is the client id required?

Dmytro Bondarev wrote:

The REST API is admin side API.
You have to create client before making booking.

Caleb Grimah wrote:

Dmitry Bondarev wrote:

The REST API is admin side API.
You have to create client before making booking.
API documentation | SimplyBook.me Online Scheduling

Thanks for the response, one more question. How do i know if a token is expired? so i do not generate a new token every time i need to make a request.

Dmytro Bondarev wrote:

You will get error with HTTP code 419. In case you receive such code you need to get token again.

Caleb Grimah wrote:

Dmitry Bondarev wrote:

You will get error with HTTP code 419. In case you receive such code you need to get token again.

IS there a documentation for the error codes for the rest api available?

Dmytro Bondarev wrote:

We use usual HTTP codes:

Caleb Grimah wrote:

Dmitry Bondarev wrote:

We use usual HTTP codes:
List of HTTP status codes - Wikipedia

Okay. Thanks. One more question, When creating a booking, I can see an array :
“additional_fields”: [
{
“field”: “e5a1d0e5312b9515874406a89c986765”,
“value”: “test”
},
{
“field”: “3adae019f9183fcfb7b02fcef54b094d”,
“value”: “Option 1”
},
{
“field”: “9c3ce1fc22bd50cbb21bdfcfd2f850bf”,
“value”: “988”
},
{
“field”: “1a2e4bdc78b9fd4593d8924b25f38244”,
“value”: “Select 2”
}
],
what information can be supplied here and also, where can i provide the comment in the request object. Also, the information in the array above, how does the dashboard know to fetch values from there.

Dmytro Bondarev wrote:

Please check the Types documentation

Redmine Admin wrote:

here is doc about Intake forms plugin which are this fields for Custom Features - What are SimplyBook.me Custom Features

Caleb Grimah wrote:

Redmine Admin wrote:

here is doc about Intake forms plugin which are this fields for Custom Features - What are SimplyBook.me Custom Features

Thankyou

Caleb Grimah wrote:

Caleb Grimah wrote:

Redmine Admin wrote:

here is doc about Intake forms plugin which are this fields for Custom Features - What are SimplyBook.me Custom Features

Thankyou

Hello, how long does it take a token to expire (in minutes)?

Dmytro Bondarev wrote:

30 minutes.
You can then use refresh token to refresh it.