Migrated from Redmine #527 | Author: Renaldas Cypas Status: Feedback | Priority: High, I’m very impatient | Created: 2020-05-05
I want to create booking using random operative with “Any Employee selector” addon enabled.
I understand, that when you enable this plugin, you can pass same operative id for example “14” as you can’t pass null to API, and API will choose random available person for this job, but it doesn’t work.
Request:
{“method”:“book”,“params”:[11,“14”,26,“2020-05-20”,“10:00”,“2020-05-20”,“11:00”,0,{“4379752337c12115e8a573be171952ac”:“Service: Change bulb(s) - Basic electrical work,\nDescription: up to 5 bulbs\nQuantity: 2\nDo you have the parts needed for the work? - Yes\nPlease provide any additional information that might be helpful for when our operators visit - tbtthth\n\n”},null,58],“id”:1}
Response:
{“error”:{“code”:-32054,“message”:“Selected time start is not available”,“data”:},“id”:“1”}
This provider has booking on passed date and time already. you can call getAvailableUnits method without unitId to get list of all units available for given service and timeslot
This provider has booking on passed date and time already. you can call getAvailableUnits method without unitId to get list of all units available for given service and timeslot
I understand that it has same date and time booked, but “Any Employee selector” should select another provider randomly even if I passed “14”, it’s what you said before, pass random. So what this addon really do?
Sorry I should have been clearer. I realise that unfortunately the Admin API doesn’t support the “Any employee” feature, but I was wondering what the REST API equivalent of the getAvailableUnits JSON RPC API was? So that I can implement the equivalent of “Any employee” myself.
Unfortunately the REST API does not have such method currently.
You can use JSON RPC API to get this info. (you can use your token in REST API and in JSON RPC)