system
1
Migrated from Redmine #579 | Author: Michael Prince
Status: Feedback | Priority: High, I’m very impatient | Created: 2020-10-04
Here is what we are using. Also, is the service URL? https://user-api.simplybook.me/admin
{
“jsonrpc”: “2.0”,
“method”: “getBookingDetails”,
“id”: 1,
“params”:
{
“booking_id”: “91746”
}
}
Here is the response I get.
Failed to retrieve documents. Make sure you have at least one record in your data or specified filter path
system
2
Dmytro Bondarev wrote:
Hi! We do not have such error responses from our side. Please check your code.
Also please provide full raw HTTP request.
system
3
Michael Prince wrote:
POST /admin?=&=&= HTTP/1.1
Host: user-api.simplybook.me
X-User-Token:
X-Company-Login:
Accept: application/json
Content-Type: text/plain
{
“jsonrpc”: “2.0”,
“method”: “getBookingDetails”,
“params”: [
{
“date_from”:“10/07/2020”
}
],
“id”: 1
}
Error
{“error”:{“code”:-32000,“message”:“Unexpected error”,“data”:null},“id”:“1”,“jsonrpc”:“2.0”}
system
4
Redmine Admin wrote:
According to our manual admin API must have ‘/admin/’ at hte end of url API documentation | SimplyBook.me Online Scheduling
getBookingDetails ($id)
has this signature according to doc API documentation | SimplyBook.me Online Scheduling
system
5
Michael Prince wrote:
There is. Look at the first line I posted. That is just how Postman shows it. I’m using https://user-api.simplybook.me/admin for the above.
system
6
Michael Prince wrote:
POST https://user-api.simplybook.me/admin?=&=&=
200
573 ms
Network
Request Headers
X-User-Token:
X-Company-Login:
Accept: application/json
Content-Type: application/json
User-Agent: PostmanRuntime/7.26.5
Postman-Token: 1b64dff7-17a0-4702-b852-1122ab91a223
Host: user-api.simplybook.me
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 125
Request Body
{
“jsonrpc”: “2.0”,
“method”: “getBookingDetails”,
“params”: [
{
“date_from”:“10/07/2020”
}
],
“id”: 1
}
Response Headers
Server: nginx
Date: Mon, 05 Oct 2020 02:34:41 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 91
Connection: keep-alive
Keep-Alive: timeout=20
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Headers: content-type, x-company-login, x-application-token, x-user-token, x-token, x-requested-with
X-XSS-Protection: 1; mode=block
Response Body
{“error”:{“code”:-32000,“message”:“Unexpected error”,“data”:null},“id”:“1”,“jsonrpc”:“2.0”}
system
7
Redmine Admin wrote:
Please read my reply again, you have
"method": "getBookingDetails",
"params": [ {
"date_from":"10/07/2020"
}
],
"id": 1
}
but only id param is supported by this method
system
8
Michael Prince wrote:
Then please go back to my original question and show me what the proper body request is for this method.