Val Komarov wrote:
Please use getStartTimeMatrix method
Val Komarov wrote:
Please use getStartTimeMatrix method
Val Komarov wrote:
Renaldas Cypas wrote:
Val Komarov wrote:
Thanks, but what to pass to to UnitId if I want all of them (Any)
@param Mixed $unitId can be Integer or Array of Integers
Val Komarov wrote:
Please pass null instead of unitId
Renaldas Cypas wrote:
How to create registered user booking using admin service, I’m trying to pass but it’s not working for me:
https://user-api.enterpriseappointments.com/admin
X-User-Token: cec116f31af2cf1666835c815b9ede81cf9f21ef2e5f0037fc73fb6ed3bee43a
X-Company-Login: servicestore
{“jsonrpc”:“2.0”,“method”:“book”,“params”:[“9”,“2”,“26”,“2020-03-30”,“10:00:00”,“2020-03-30”,“11:00:00”],“id”:1}
Dmytro Bondarev wrote:
If you need to make cient please use @addClient@ method.
If you need to make booking please use @book@ method.
If you have any issues with making booking or clients please provide raw http request and response.
Renaldas Cypas wrote:
Dmitry Bondarev wrote:
If you need to make cient please use @addClient@ method.
If you need to make booking please use @book@ method.If you have any issues with making booking or clients please provide raw http request and response.
I already added clients, everything works ok except booking, attached what I’m calling
want to add client with ID 26, and service Id: 9
Dmytro Bondarev wrote:
ok. you are making booking, please provide raw http request and response.
Renaldas Cypas wrote:
I already added clients, everything works ok except booking, attached what I’m calling
want to add client with ID 26, and service Id: 9
Renaldas Cypas wrote:
Renaldas Cypas wrote:
I already added clients, everything works ok except booking, attached what I’m calling
want to add client with ID 26, and service Id: 9
Dmytro Bondarev wrote:
Unfortunately i am not able to see headers here.
But it seems that you are trying to access to admin API with public token.
Please use getUserToken and pass this token in X-User-Token header.
Renaldas Cypas wrote:
Dmitry Bondarev wrote:
Unfortunately i am not able to see headers here.
But it seems that you are trying to access to admin API with public token.
Please use getUserToken and pass this token in X-User-Token header.
Yes that was issue, not it works, thank you.
Got another issue unfortunately, I can create booking when I pass UnitId, for example: 2, but I enabled in options, to allow book service regardless unitId, but when I pass null in UnitId field, getting error from API?
{“error”:{“code”:-32052,“message”:“Selected unit id is not available”,“data”:},“id”:“1”}
so how to book “any provider/unit”
Thanks
Redmine Admin wrote:
you always need to pass unit id into API ( you can get all available units for this service and pass random one)
Renaldas Cypas wrote:
Redmine Admin wrote:
you always need to pass unit id into API ( you can get all available units for this service and pass random one)
Thanks, it’s working now, but stuck again on passing “Intake forms” / Additional fields to your API, when I create booking with additional fields data, system creating booking, but field in booking is empty:
Json I passing, but why additional field is still empty?:
{“method”:“book”,“params”:[9,“2”,26,“2020-03-31”,“16:00:00”,“2020-03-31”,“17:00:00”,0,[{“name”:“4379752337c12115e8a573be171952ac”,“value”:“lorem ipsum”,“type”:“text”}],1],“id”:1}
— getAdditionalFields for service 9 response:
{
“result”: [
{
“id”: “1”,
“name”: “4379752337c12115e8a573be171952ac”,
“title”: “Service Details”,
“type”: “text”,
“length”: null,
“values”: null,
“default”: null,
“is_null”: “1”,
“is_visible”: “1”,
“pos”: “1”,
“show_for_all_events”: “1”,
“value”: null,
“plugin_event_field_value_id”: null
}
],
“id”: “1”,
“jsonrpc”: “2.0”
}
Dmytro Bondarev wrote:
@{“method”:“book”,“params”:[9,“2”,26,“2020-03-31”,“16:00:00”,“2020-03-31”,“17:00:00”,0,{“4379752337c12115e8a573be171952ac”:“lorem ipsum”},1],“id”:1}
@