[#99] API "book" method - cannot create a booking

Migrated from Redmine #99 | Author: Ihor Bokatov
Status: Closed | Priority: High, I’m very impatient | Created: 2018-01-31


Hello I have an issue with “book” (‘https://user-api.simplybook.me/admin’ enpoint)

Always receive error={code=-32054, data=, message=Selected time start is not available} regardless of the time selected. Actually it worked twice and then stop working

Payload structure:
{“jsonrpc”:“2.0”,“method”:“book”,“params”:[eventId, unitId, clientId, startDate, startTime, endDate, endTime, clientTimeOffset],“id”:7}

Real params sent :[2, 12, 1, “2018-02-11”, “16:00:00”, “2018-02-11”, “17:15:00”, 0, { 0db3e7523ba2ad3424742eb1f56826c4:“Bernhardt Jensens Bouleveard 89, st tv”}]
Company name: “RaskRask.dk”, email: “info@raskrask.dk”

Redmine Admin wrote:

Please check your available slots. If something cannot be booked because of no slots then it cannot be booked via API too

Ihor Bokatov wrote:

This day/time is available.
working time is “05:00:00” -“24:00:00”
getReservedTime for this day returned:
{
“events”: ,
“type”: “reserved_time”,
“dd”: [
{
“start_time”: “14:00:00”,
“end_time”: “15:15:00”
},
{
“start_time”: “22:00:00”,
“end_time”: “23:15:00”
}
]

Plus I was trying to do the same for 2018-02-12 (there were no reserved_time at all) with the same result