[#1123] Attempt to create a booking through gRPC "book" method throwing "Unexpected error"

Migrated from Redmine #1123 | Author: Tonsai S.
Status: Feedback | Priority: High, I’m very impatient | Created: 2023-10-26


I’m trying to create a booking through the gRPC API using book method. It’s throwing -32000 “Unexpected error” every time. The selected time slot, eventId, unitId are correct through.

Endpoint: POST https://user-api.simplybook.me/bookings
JSON Payload:

    "jsonrpc": "2.0",
    "method": "book",
    "params": {
        "eventId": 2,
        "unitId": 2,
        "date": "2023-10-26",
        "time": "14:00:00",
        "clientData": {
            "name": "FF",
            "email": "dd@gmail.com",
            "phone": "+123456789987"
        }
    },
    "id": 1
}```

Dmytro Bondarev wrote:

Hi,

You should pass parameters like

“params”: [
2, 2, “2023-10-26”, “14:00:00”, {“name”: “FF”,“email”: “dd@gmail.com”,“phone”: “+123456789987”}
],