[#1098] Unable to book a slot, though it is available. Interested in knowing why. Could it be a bug?

Migrated from Redmine #1098 | Author: Jagan Pandurangan
Status: Closed | Priority: High, I’m very impatient | Created: 2023-08-23


Our company name is “cocorio”

We are trying to book a slot that is empty, but it fails saying @“code”: -32054@ , and @“message”: “Selected time start is not available”@

The request body is,


{
  "jsonrpc": "2.0",
  "method": "book",
  "params": [
    "2",
    "27",
    "2023-09-11",
    "07:00",
    {
      "client_id": "34",
      "client_sign": "639448b1f2ad7b52eff5430a4a53c94d"
    },
    {
      "handle_invoice": true,
      "4a23dbbaef6ffd53a9b1d9c3c9f218d3": "null ",
      "8d710a3f9e0fa23280bab560486ef0d5": "",
      "products": [
        {
          "id": 2,
          "qty": 1
        }
      ]
    },
    1
  ],
  "id": "34"
}

The response body is,


{
    "error": {
        "code": -32054,
        "message": "Selected time start is not available",
        "data": []
    },
    "id": "3",
    "jsonrpc": "2.0"
}

This particularly happens when add-ons are added in the request body, “products” ,


            "products": [{"id": 2, "qty": 1}]

Dmytro Bondarev wrote:

Hi,

It is addon and it requires additional 1 hour.

Jagan Pandurangan wrote:

Yes, this is how we use an addon to book an extended period for a servie since that is the only way for non-admin.#

Jagan Pandurangan wrote:

I’m sorry, I didn’t understand your previous reply. Was that a question or is it information?
Are we doing something wrong?

We expect to book 2 hours with the above payload.

Dmytro Bondarev wrote:

I see.
Please check schedule settings, Customer features settings and try to with the same parameters on public site.
If you have the same issue on public site please contact support, otherwise let us know, we will investigate issue further.

Jagan Pandurangan wrote:

The schedule is all available. I am 100% sure because when we make two “book” API calls without add-ons it works. These issues are really annoying.

I cannot test this on the public site because our services have some location related issues. When it is clearly an issue in the API why can’t you guys take it up? Can you please ask your team to look into this in detail?

Jagan Pandurangan wrote:

Our tester says that odd-numbered hours like 7:00, 9:00, 11:00, etc. are failing but even-numbered hours like 8:00, and 10:00 are working.

It felt weird to me as a developer but that seems to be the case.

Surprisingly, on the public site, all the time-start is even numbered like 8:00, 10:00, etc (please see the screenshot)

Dmytro Bondarev wrote:

As i see the issue is repeatable on public site.
And as i see issue related to invalid configuration of “Appointment at fixed time” custom feature. Please disable it if you do not user it.

Jagan Pandurangan wrote:

I have disabled that custom feature. It seems to work now. We will do a round of regression and reach you again if something goes wrong. Thanks much!