[#223] Trying to create new booking using API

Migrated from Redmine #223 | Author: Mariam Mosinyan
Status: Rejected | Priority: Immediate, there is BUG! | Created: 2018-08-24


Hi

I am trying to implement book method. Every time that i try to create booking I am getting following Request error: Selected date start is not available.I am sending various datee, also I checked provider schedule and everything seems fine according date. Could you please help me to understand what I am doing wrong.

This is an example of my request body “{“method”:“book”,“params”:[“40”,“12”,“2018-08-27”,“05:30:00”,{“name":“test”,“email”:"test@mail.ru”,“phone”:“5544564”},{},1],“id”:1}”

Dmytro Bondarev wrote:

Hi! Please provide company info to check.

Mariam Mosinyan wrote:

Hi

Thank you for your quick response.

Company name is raskrask.

Dmytro Bondarev wrote:

Hi! Selected provider does not work at this time. Please check your provider time settings.

Mariam Mosinyan wrote:

Hi Dmitry,

Thanks again!!

I’ve changed that provider schedule. Now he is working all days of week from 5:30 am to 23:30 pm. I am still getting same error. I’ve tried following requests.

“{“method”:“book”,“params”:[“40”,“12”,“2018-08-27”,“15:30:00”,{“name”:“test booking",“email”:"test@mail.ru”,“phone”:“546546564”},{},1],“id”:1}”
“{“method”:“book”,“params”:[“40”,“12”,“2018-08-28”,“15:30:00”,{“name”:“test booking",“email”:"test@mail.ru”,“phone”:“546546564”},{},1],“id”:1}”

“{“method”:“book”,“params”:[“40”,“12”,“2018-08-28”,“05:30:00”,{“name”:“test booking",“email”:"test@mail.ru”,“phone”:“546546564”},{},1],“id”:1}”
string(141) “{“method”:“book”,“params”:[“40”,“12”,“2018-08-29”,“07:30:00”,{“name”:“test booking",“email”:"test@mail.ru”,“phone”:“546546564”},{},1],“id”:1}”
string(141) “{“method”:“book”,“params”:[“40”,“12”,“2018-08-30”,“07:30:00”,{“name”:“test booking",“email”:"test@mail.ru”,“phone”:“546546564”},{},1],“id”:1}”

etc…

If it is possible could you please send me an example of working request. I’ve tested using for cycle and every time I geting same error.

Mariam Mosinyan wrote:

Hi Dmitry

I am still getting same error “Selected date start is not available”, could you please help me to figure out the problem ? I checked schedule before submiting booking and as I can see that provider is available.

Regards,
Mariam

Dmytro Bondarev wrote:

Please provide RAW HTTP request with data that supposed to work, but it does not.

Mariam Mosinyan wrote:

Thank you for your response!!

This is HTTP request {“method”:“book”,“params”:[“40”,“12”,“2018-09-04”,“10:30:00”,{“name”:"test name “,“email”:"test@mail.ru”,“phone”:“445645564”},{},1],“id”:1}.

Dmytro Bondarev wrote:

What is endpoint of API?

Mariam Mosinyan wrote:

I am using following url

https://user-api.simplybook.me/admin/

Do you need token and login as well ?

Dmytro Bondarev wrote:

I do not need token and login.
I see issue is that you pass wrong parameters. Please check: API documentation | SimplyBook.me Online Scheduling