[#1426] API - getBookings

Migrated from Redmine #1426 | Author: Jean Lasnier
Status: Feedback | Priority: High, I’m very impatient | Created: 2025-06-26


My goal is to use the getBookings API function, in particular to be able to use filters like ‘created_date_from’ and ‘created_date_to’.

GetBookings is used by calling the Company Administration Service method .
The service URL is https://user-api.simplybook.me/admin.

Authentication is done using the getUserToken function.
I get my token without any problem.

Then I run a request in this environment. But I systematically get the following response:
{“error”:{“code”:-32600,“message”:“Access denied”,“data”:[]},“id”:“1”,“jsonrpc”:“2.0”} **

Whether it’s the getBookings function, or even simple functions like getStatuses or getCountryList passed without parameters.

My request:

-X POST
-H “Content-Type: application/json”
-H “X-Company-Login: MyCompany”
-H “X-Token: 16a2xxxxxxxxxxxxx…”

–data “{ "jsonrpc":"2.0", "method":"getBookings", "params":{"filter": { "edited_date_from": "2025-06-25", "edited_date_to" : "2025-06-25", "event_id": 11}, "skip":0,"take":50 },"id":1 }”

Jean Lasnier wrote:

Thank you for your assistance

Val Komarov wrote:

Please use filters as a first unnamed method parameter, e.g.

{
    "jsonrpc":"2.0",
    "method":"getBookings",
    "params":[
        {
            "date_from":"2025-06-19",
            "date_to":"2025-06-19",
            ...

We accept an array (not an object) of parameters in all our methods

Jean Lasnier wrote:

Thanks.

I tried this :

X POST
-H “Content-Type: application/json”
-H “X-Company-Login: xxxxxxxxxxx”
-H “X-Token: xxxxxxxxxxxxxxxxxx”
–data “{ "jsonrpc":"2.0", "method":"getBookings", "params":[{"edited_date_from": "2025-06-10","edited_date_to": "2025-06-20"}],"id":1 }”

and the response is still: {“error”:{“code”:-32600,“message”:“Access denied”,“data”:[]},“id”:“1”,“jsonrpc”:“2.0”}

Also, This simple example doesn’t work either (I got the same “acces denied” message):
–data “{ "jsonrpc":"2.0", "method":" getCountryList ", "id":1 }”

Jean Lasnier wrote:

Hi Val Komarov,
So, as you see in my previous message, I modified my query according to your instructions, but the same error message appears.
Do you have any idea what this could be?