Migrated from Redmine #61 | Author: Sebastian Fratini
Status: Resolved | Priority: High, I’m very impatient | Created: 2017-11-01
Hi! We cannot figure it how to make the API request to get the time matrix when we have locations.
This is our current request:
@{
“jsonrpc”: “2.0”,
“id”: 1,
“method”: “getStartTimeMatrix”,
“params”: [“2017-11-01”,“2017-11-11”,4,[2],5]
}@
And this is the response:
@
{
“result”: {
“2017-11-01”: ,
“2017-11-02”: ,
“2017-11-03”: ,
“2017-11-04”: ,
“2017-11-05”: ,
“2017-11-06”: ,
“2017-11-07”: ,
“2017-11-08”: ,
“2017-11-09”: ,
“2017-11-10”: ,
“2017-11-11”:
},
“id”: “1”,
“jsonrpc”: “2.0”
}@
We are pretty sure the problem is the way we are sending the unitId list but the API documentation is not very clear about how to do this.
The company login is nsx if you want to check. If helps, this is the other example data we have:
Service:
@
{
“id”: “4”,
“name”: “Medicina General”,
“duration”: “15”,
“hide_duration”: “0”,
“description”: “Servicio de medicina general o guardia”,
“is_public”: “1”,
“is_active”: “1”,
“position”: “5”,
“file_id”: null,
“seo_url”: null,
“is_recurring”: “0”,
“picture”: null,
“picture_sub_path”: null,
“is_visible”: “1”,
“picture_path”: null,
“unit_map”: {
“2”: null,
“3”: null
}
}
@
Unit:
@
{
“id”: “2”,
“name”: “Gregory House”,
“description”: “”,
“phone”: “”,
“email”: “”,
“station_id”: “1”,
“qty”: “1”,
“is_active”: “1”,
“position”: “3”,
“is_visible”: “1”,
“file_id”: null,
“seo_url”: null,
“picture”: null,
“picture_sub_path”: null,
“picture_path”: null,
“event_map”: {
“4”: null
},
“locations”: [
“1”
],
“position_in_location”: {
“1”: “2”
}
},@
The answer seems always empty. This is a new calendar so all the slots are available. And we can see them in our booking website.
Thanks!