Migrated from Redmine #163 | Author: Razrab Razrab
Status: Closed | Priority: Normal | Created: 2018-05-12
I use the method “book”. In the parameter values:
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: [
{
“eventId”: “18”,
“unitId”: “2”,
“clientId”: “5”,
“startDate”: “2018-04-03”,
“startTime”: “10:30:00”,
“endDate”: “2018-04-03”,
“endTime”: “11:30:00”,
“clientTimeOffset”: 0
}
],
“id”: 6
}
As a result I receive an error:
{“error”:{“code”:-32000,“message”:“SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens”,“data”:null},“id”:“6”,“jsonrpc”:“2.0”}
I can not understand what I’m doing wrong.
Redmine Admin wrote:
please check documentation. We do not use named params for functions.
Razrab Razrab wrote:
Fixed errors.
{
“jsonrpc”: “2.0”,
“method”: “book”,
“eventId”: 19,
“unitId”: 2,
“clientId”: 5,
“startDate”: “2018-04-03”,
“startTime”: “10:30:00”,
“endDate”: “2018-04-03”,
“endTime”: “11:30:00”,
“clientTimeOffset”: 0,
“id”: 6
}
As a result I receive an error:
{“error”:{“code”:-32051,“message”:“Selected event id is not available”,“data”:},“id”:“6”,“jsonrpc”:“2.0”}
What do I do wrong?
Redmine Admin wrote:
it should be
{
“jsonrpc”: “2.0”,
“method”: “book”,
“params”: [ “18”,“2”,"“5”,“2018-04-03”,“10:30:00”,“2018-04-03”,“11:30:00”,0],
“id”: 6
}
Redmine Admin wrote:
Please check our API explorer for reference API documentation | SimplyBook.me Online Scheduling