...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "endDate": "2018-09-09", "endDateDate": 1536364800000, "firstWeek": false, "fourthWeek": false, "fri": false, "inEditableRange": true, "lastWeek": false, "mon": false, "objects": [{ "days": [{ "checked": falsetrue, "inEditableRange": false, "times": [{ "active": true, "endTime": 1300, "endTimeObj": "2018-07-01 13:00:00", "startTimeid": 12000, "startTimeObjresumeDayTimeAfterBreakStarts": "2018-07-01 12:00:00",false, }],"roomNumber": null, "workdaystartTime": 11200, }], "locationIdstartTimeAfterEndTime": 81125false, "locationName": "Second Office", "objecttypestartTimeObj": "PROFESSIONAL2018-07-01 12:00:00", "professionalId": 81651, "professionalNameworkScheduleId": null "Titus Bigly", "reasonId": null, }], "reasonNameworkday": null1 }], "resourceIdlocationId": null81125, "resourceNamelocationName": null"Second Office", }], "recurringobjecttype": false,"PROFESSIONAL", "repeatIntervalprofessionalId": null81651, "repeatScheduleprofessionalName": "Titus nullBigly", "satreasonId": falsenull, "secondWeekreasonName": falsenull, "startDateresourceId": "2018-07-09",null, "startDateDateresourceName": 1530403200000null }], "sunrecurring": false, "thirdWeekrepeatInterval": falsenull, "thurepeatSchedule": falsenull, "tuesat": false, "validDOTWsecondWeek": []false, "wed": false }startDate": "2018-07-09", "sun": false, "thirdWeek": false, "thu": false, "tue": false, "wed": false }] |
Finally we show the period object that gets returned on all subsequent GET calls.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "endDate": "2018-09-09", "endDateDate": 1536451200000, "firstWeek": false, "fourthWeek": false, "fri": false, "lastWeek": false, "mon": false, "objects": [{ "days": [{ "checked": false, "times": [{ "active": true, "endTime": 13001100, "endTimeObj": "2018-07-09 13:00:00", "roomNumber": null, "startTime": 1200900, "startTimeObj": "2018-07-09 12:00:00", "workScheduleId": 1415156 }], "workday": 1, }], "locationId": 81125, "locationName": "Second Office", "objecttype": "PROFESSIONAL", "professionalId": 81651, "professionalName": "Titus Bigly", "reasonId": null, "reasonName": null, "resourceId": null, "resourceName": null }], "recurring": false, "repeatInterval": null, "repeatSchedule": null, "sat": false, "secondWeek": false, "startDate": "2018-07-09", "startDateDate": 1531094400000, "sun": false, "thirdWeek": false, "thu": false, "tue": false, "wed": false }] |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "endDate": "2018-06-27", "endDateDate": 1530057600000, "firstWeek": false, "fourthWeek": false, "fri": false, "lastWeek": false, "mon": false, "objects": [{ "days": [{ "checked": false, "times": [{ "active": true, "endTime": 1300, "endTimeObj": "2018-06-27 13:00:00", "roomNumber": null, "startTime": 1200, "startTimeObj": "2018-06-27 12:00:00", "workScheduleId": 1425077 }], "workday": 3 }], "locationId": 87877, "locationName": "Office 1", "objecttype": "PROFESSIONAL", "professionalId": 81651, "professionalName": "Titus Bigly", "reasonId": null, "reasonName": null, "resourceId": null, "resourceName": null }], "recurring": false, "repeatInterval": null, "repeatSchedule": null, "sat": false, "secondWeek": false, "startDate": "2018-06-27", "startDateDate": 1530057600000, "sun": false, "thirdWeek": false, "thu": false, "tue": false, "wed": false }] |
Next we show the request payload of the POST call that is made to update the working hours of service availability.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "endDate": "2018-06-27", "endDateDate": 1530057600000, "firstWeek": false, "fourthWeek": false, "fri": false, "inEditableRange": false, "lastWeek": false, "lessThanOneWeek": true, "mon": false, "objects": [{ "days": [{ "checked": false, "inEditableRange": false, "times": [{ "active": true, "endTime": 1300, "endTimeObj": "2018-06-27 13:00:00", "roomNumber": null, "startTime": 1200, "startTimeObj": "2018-06-27 12:00:00", "workScheduleId": 1425077 }], "workday": 3 }], "locationId": 87877, "locationName": "Office 1", "objecttype": "PROFESSIONAL", "professionalId": 81651, "professionalName": "Titus Bigly", "reasonId": null, "reasonName": null, "resourceId": null, "resourceName": null }], { "recurring": false, days"repeatInterval": [{null, "repeatSchedule": null, times"resumeDayTimeAfterBreakStarts": [{false, "sat": false, endTime"secondWeek": 1630false, endTimeObj"startDate": "Wed, 06 Jun 2018 20:30:00 GMT2018-06-27", "startDateDate": 1530057600000, "startTimeAfterEndTime": false, startTime"sun": 1500false, "thirdWeek": false, "thu": false, startTimeObj"tue": "Wedfalse, 06 Jun 2018 19:00:00 GMT" "validDOTW": [3], "wed": false }] }] |
Finally we show the period object that gets returned on all subsequent GET calls.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "endDate": "2018-06-27", workday"endDateDate": 31530057600000, "firstWeek": false, }] "fourthWeek": false, locationId"fri": 81181false, "lastWeek": false, locationName: "Beach Office"mon": false, "objects": [{ objecttype: "PROFESSIONAL", "days": [{ professionalId: 81651, professionalName"checked": "Titus Bigly"false, reasonId: null, "times": [{ reasonName: null, resourceId"active": nulltrue, resourceName "endTime": null1630, }] recurring: false, repeatInterval"endTimeObj": null"2018-06-27 16:30:00", repeatSchedule: null, resumeDayTimeAfterBreakStarts: false, sat"roomNumber": falsenull, secondWeek: false, startDate: "2018-06-27"startTime": 1500, startDateDate: 1530057600000, startTimeAfterEndTime: false, sun"startTimeObj": false"2018-06-27 15:00:00", thirdWeek: false, thu: false, tue"workScheduleId": false,1425109 validDOTW: [3], wed: false }] |
Finally we show the period object that gets returned on all subsequent GET calls.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{, endDate: "2018-06-27", endDateDate"workday": 3 1530057600000, firstWeek: false, }], fourthWeek: false, fri"locationId": false81181, lastWeek: false, "locationName": mon: false"Beach Office", objects: [{ "objecttype": "PROFESSIONAL", days: [{ "professionalId": 81651, checked"professionalName": false"Titus Bigly", "reasonId": null, times: [{ "reasonName": null, active"resourceId": truenull, "resourceName": null endTime: 1630}], "recurring": false, "repeatInterval": null, endTimeObj"repeatSchedule": "2018-06-27 16:30:00"null, "sat": false, startTime"secondWeek": 1500false, startTimeObj"startDate": "2018-06-27 15:00:00", "startDateDate": 1530057600000, "sun": false, workScheduleId"thirdWeek": 1425109false, "thu": false, "tue": false, }] "wed": workday: 3 }] locationId: 81181, locationName: "Beach Office", objecttype: "PROFESSIONAL", professionalId: 81651, professionalName: "Titus Bigly", reasonId: null, reasonName: null, resourceId: null, resourceName: null }, { days: [{ checked: false, times: [{ active: true, endTime: 1300, endTimeObj: "2018-06-27 13:00:00", startTime: 1200, startTimeObj: "2018-06-27 12:00:00", workScheduleId: 1425110 }] workday: 3 }] locationId: 87877, locationName: "Office 1", objecttype: "PROFESSIONAL", professionalId: 81651, professionalName: "Titus Bigly", reasonId: null, reasonName: null, resourceId: null, resourceName: null }] recurring: false, repeatInterval: null, repeatSchedule: null, sat: false, secondWeek: false, startDate: "2018-06-27", startDateDate: 1530057600000, sun: false, thirdWeek: false, thu: false, tue: false, wed: false }] |
Example 5:
How to split a date range of service availability into two smaller ranges
Say your employee Mr. Biscuits is running a tutoring program in your downtown office, which is adjacent to the middle school. He has service availability set up on Mondays, Wednesdays, and Fridays from 4 until 5 pm for the entire school year (August 20 until May 17) so the kids can walk over right after school. However, you want to split his availability down the middle to account for the two separate semesters. Here is what you would do:
First we show the initial period object as returned in the GET call.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{
endDate: "2019-05-17",
endDateDate: 1558051200000,
firstWeek: false,
fourthWeek: false,
fri: false,
lastWeek: false,
mon: false,
objects: [{
days: [{
checked: false,
times: [{
active: true,
endTime: 1700,
endTimeObj: "2018-08-20 17:00:00",
startTime: 1600,
startTimeObj: "2018-08-20 16:00:00",
workScheduleId: 1420755
}]
workday: 1
},
{
checked: false,
times: [{
active: true,
endTime: 1700,
endTimeObj: "2018-08-20 17:00:00",
startTime: 1600,
startTimeObj: "2018-08-20 16:00:00",
workScheduleId: 1420756
}]
workday: 3
},
{
checked: false,
times: [{
active: true,
endTime: 1700,
endTimeObj: "2018-08-20 17:00:00",
startTime: 1600,
startTimeObj: "2018-08-20 16:00:00",
workScheduleId: 1420757
}]
workday: 5
}]
locationId: 81353,
locationName: "Downtown Office",
objecttype: "PROFESSIONAL",
professionalId: 80891,
professionalName: "Mr. Biscuits",
reasonId: null,
reasonName: null,
resourceId: null,
resourceName: null
}]
recurring: false,
repeatInterval: null,
repeatSchedule: null,
sat: false,
secondWeek: false,
startDate: "2018-08-20",
startDateDate: 1534723200000,
sun: false,
thirdWeek: false,
thu: false,
tue: false,
wed: false
}] |
Next we show the request payload of the POST call made to split up the date range.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ endDate: "2019-05-17", endDateDate: 1558051200000, firstWeek: false, fourthWeek: false, fri: false, inEditableRange: true, lastWeek: false, lessThanOneWeek: false mon: false, objects: [{ days: [{ checked: false, inEditableRange: false, times: [{ active: true, endTime: 1700, endTimeObj: "2018-08-20 17:00:00", startTime: 1600, startTimeObj: "2018-08-20 16:00:00", workScheduleId: 1420754 }] workday: 1 }, { checked: false, inEditableRange: false, times: [{ active: true, endTime: 1700, endTimeObj: "2018-08-20 17:00:00", startTime: 1600, startTimeObj: "2018-08-20 16:00:00", workScheduleId: 1420755 }] workday: 3 }, { checked: false, inEditableRange: false, times: [{ active: true, endTime: 1700, endTimeObj: "2018-08-20 17:00:00", startTime: 1600, startTimeObj: "2018-08-20 16:00:00", false }] |
Example 5:
How to split a date range of service availability into two smaller ranges
Say your employee Mr. Biscuits is running a tutoring program in your downtown office, which is adjacent to the middle school. He has service availability set up on Mondays, Wednesdays, and Fridays from 4 until 5 pm for the entire school year (August 20 until May 17) so the kids can walk over right after school. However, you want to split his availability down the middle to account for the two separate semesters. Here is what you would do:
First we show the initial period object as returned in the GET call.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "endDate": "2019-05-17", "endDateDate": 1558051200000, "firstWeek": false, "fourthWeek": false, "fri": false, "lastWeek": false, "mon": false, "objects": [{ workScheduleId"days": 1420756[{ }]"checked": false, workday"times": 5[{ }] locationId"active": 81353true, locationName: "Downtown Office", objecttype"endTime": "PROFESSIONAL"1700, professionalId: 80891, professionalName"endTimeObj": "Mr. Biscuits2018-08-20 17:00:00", reasonId "roomNumber": null, reasonName "startTime": null1600, resourceId: null, "startTimeObj": resourceName: null"2018-08-20 16:00:00", }] recurring: false, repeatInterval"workScheduleId": 1420755 null, repeatSchedule: null, sat: false}], secondWeek: false, startDate: "2018-08-20", workday": 1 startDateDate: 1534723200000, sun: false,}], thirdWeek"locationId": false81353, thu: false, tue: false"locationName": "Downtown Office", validDOTW: [], "objecttype": "PROFESSIONAL", wed: false }] |
Finally we show the two new period objects that get returned on all subsequent GET calls.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ endDate: "2018-12-31", professionalId": 80891, endDateDate: 1546214400000, firstWeek: false"professionalName": "Mr. Biscuits", fourthWeek: false, fri"reasonId": falsenull, lastWeek: false, mon"reasonName": falsenull, objects: [{ "resourceId": null, days: [{ "resourceName": null }], checked"recurring": false, "repeatInterval": null, "repeatSchedule": null, times"sat": [{false, "secondWeek": false, "startDate": "2018-08-20", active"startDateDate": true1534723200000, "sun": false, "thirdWeek": false, endTime"thu": 1700false, "tue": false, "wed": false }] |
Next we show the request payload of the POST call made to split up the date range.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ endTimeObj"endDate": "20182019-0805-20 17:00:00", "endDateDate": 1558051200000, "firstWeek": false, startTime"fourthWeek": 1600false, startTimeObj: "2018-08-20 16:00:00""fri": false, "inEditableRange": true, "lastWeek": false, workScheduleId"lessThanOneWeek": 1420758false "mon": false, "objects": [{ }] "days": [{ workday: 1 "checked": }false, { checked"inEditableRange": false, "times": [{ "active": true, "endTime": 1700, "endTimeObj": "2018-08-20 17:00:00", startTime"roomNumber": 1600null, startTimeObj"startTime": "2018-08-20 16:00:00"1600, workScheduleId"startTimeObj": 1420759 }] workday: 3 "2018-08-20 16:00:00", }, { checked"workScheduleId": false,1420754 times: [{}], "workday": 1 active: true, }], "locationId": 81353, endTime: 1700, "locationName": "Downtown Office", endTimeObj"objecttype": "2018-08-20 17:00:00PROFESSIONAL", "professionalId": 80891, startTime"professionalName": 1600"Mr. Biscuits", "reasonId": null, startTimeObj: "2018-08-20 16:00:00"reasonName": null, "resourceId": null, workScheduleId: 1420760 "resourceName": null }], "recurring": false, workday"repeatInterval": 5null, "repeatSchedule": null, }] "sat": false, locationId"secondWeek": 81353false, locationName"startDate": "Downtown Office2018-08-20", "startDateDate": 1534723200000, objecttype: "PROFESSIONALsun": false, "thirdWeek": false, professionalId"thu": 80891false, "tue": false, professionalName: "Mr. Biscuits"validDOTW": [], "wed": reasonId: null,false }] |
Finally we show the two new period objects that get returned on all subsequent GET calls.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ reasonName: null"endDate": "2018-12-31", resourceId"endDateDate": null1546214400000, resourceName: null }] recurring"firstWeek": false, repeatInterval"fourthWeek": nullfalse, repeatSchedule"fri": nullfalse, sat"lastWeek": false, secondWeek"mon": false, startDate"objects": "2018-08-20",[{ startDateDate: 1534723200000, "days": [{ sun: false, thirdWeek: false, thu"checked": false, tue: false, wed: false }, "times": [{ endDate: "2019-05-17", endDateDate: 1546300800000, firstWeek"active": falsetrue, fourthWeek: false, fri: false, lastWeek"endTime": false1700, mon: false, objects: [{ "endTimeObj": "2018-08-20 17:00:00", days: [{ checked"roomNumber": falsenull, times"startTime": [{1600, active"startTimeObj": true"2018-08-20 16:00:00", endTime"workScheduleId": 1420758 1700, }], endTimeObj: "2018-08-20 17:00:00", "workday": 1 }], startTime: 1600, "locationId": 81353, startTimeObj"locationName": "2018-08-20 16:00:00Downtown Office", "objecttype": "PROFESSIONAL", workScheduleId: 1420762 "professionalId": 80891, "professionalName": }]"Mr. Biscuits", "reasonId": null, workday: 1 }, {"reasonName": null, checked"resourceId": falsenull, times"resourceName": [{null }], "recurring": false, active"repeatInterval": truenull, "repeatSchedule": null, "sat": false, endTime"secondWeek": 1700false, "startDate": "2018-08-20", "startDateDate": 1534723200000, endTimeObj: "2019-01-01 17:00:00"sun": false, "thirdWeek": false, "thu": false, startTime"tue": 1600false, "wed": false }, { startTimeObj"endDate": "2019-01-01 16:00:0005-17", "endDateDate": 1546300800000, "firstWeek": false, workScheduleId"fourthWeek": 1420763false, "fri": false, "lastWeek": false, }] "mon": false, workday"objects": 3[{ }, "days": [{ checked: false, times: [{ active: true, endTime: 1700, endTimeObj: "20192018-0108-0120 17:00:00", startTime: 1600, startTimeObj: "20192018-0108-0120 16:00:00", workScheduleId: 14207641420762 }], workday: 51 }], locationId: 81353, locationName: "Downtown Office", objecttype: "PROFESSIONAL", professionalId: 80891, professionalName: "Mr. Biscuits", reasonId: null, reasonName: null, resourceId: null, resourceName: null }], recurring: false, repeatInterval: null, repeatSchedule: null, sat: false, secondWeek: false, startDate: "2019-01-01", startDateDate: 1546300800000, sun: false, thirdWeek: false, thu: false, tue: false, wed: false }] |
...