[#585] wrong timeslot in api for class setup

Migrated from Redmine #585 | Author: Aaron Chen
Status: New | Priority: Normal | Created: 2020-10-10


we use one service to set two classes in one day
first class is 7:00 - 7:50
second class is 8:00 - 8:50

but from the api, we get the information is only one class from 7:00 - 8:50
please see attachment files and help to solve the problem

thank you.

Redmine Admin wrote:

please provide raw http requests

Please also make sure we do not offer special class API and to emulate class you need to do call with necessary service and unit (provider) id

Aaron Chen wrote:

I try to attach picture,but it seems not work for your redmine. always show not found

Aaron Chen wrote:

URL: (please pay attention to 2020-10-05)
https://user-api.365bookings.cn/admin
Params:
{
“id”: “1”,
“jsonrpc”: “2.0”,
“method”: “getWorkCalendar”,
“params”: {
“year”:“2020”,
“month”:“10”,
“data”: {
“unit_group_id”: 121,
“event_id”: 508
}
}
}

Response:
{
“result”: {
“2020-10-01”: {
“from”: “07:00:00”,
“to”: “07:50:00”,
“is_day_off”: “0”
},
“2020-10-02”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-03”: {
“from”: “07:00:00”,
“to”: “07:50:00”,
“is_day_off”: “0”
},
“2020-10-04”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-05”: {
“from”: “07:00:00”,
“to”: “08:50:00”,
“is_day_off”: “0”
},
“2020-10-06”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-07”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-08”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-09”: {
“from”: “14:00:00”,
“to”: “14:50:00”,
“is_day_off”: “0”
},
“2020-10-10”: {
“from”: “16:00:00”,
“to”: “16:50:00”,
“is_day_off”: “0”
},
“2020-10-11”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-12”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-13”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-14”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-15”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-16”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-17”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-18”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-19”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-20”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-21”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-22”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-23”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-24”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-25”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-26”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-27”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-28”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-29”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-30”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
},
“2020-10-31”: {
“from”: “00:00:00”,
“to”: “00:00:00”,
“is_day_off”: “1”
}
},
“id”: “1”,
“jsonrpc”: “2.0”
}

Redmine Admin wrote:

what is your company login?

Aaron Chen wrote:

sangharetreat

(Short original content)

Redmine Admin wrote:

API is working correctly, there is special date shecule set for this class here https://sangharetreat.secure.365bookings.cn/v2/management/#classes-worktime/class/10/year/2020/day/2020-10-18 07:00-07:50
and kind of same for other dates

Aaron Chen wrote:

not this date, please see 2020-10-05,https://sangharetreat.secure.365bookings.cn/v2/management/#classes-worktime/class/10/year/2020/day/2020-10-05
there are two special date schedule set for this class, one is 7:00-7:50, another is 8:00-8:50
but the api raw http is
“2020-10-05”: {
“from”: “07:00:00”,
“to”: “08:50:00”,
“is_day_off”: “0”
},

Redmine Admin wrote:

but you got

"2020-10-05": {
"from": "07:00:00",
"to": "08:50:00",
"is_day_off": "0"
},

which is correct

Aaron Chen wrote:

if I set one is 7:00-7:50, another is 18:00-18:50 then will got

“2020-10-05”: {
“from”: “07:00:00”,
“to”: “18:50:00”,
“is_day_off”: “0”
},

so I think it will make confused.The timeslot should be separated, like:

“2020-10-05”: {
“time”: [
{“from”: “07:00:00”,“to”: “07:50:00”},
{“from”: “08:00:00”,“to”: “08:50:00”},
]
“is_day_off”: “0”
},

Redmine Admin wrote:

it seems you need to call this method API documentation | SimplyBook.me Online Scheduling