Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Next we show the request payload of the POST /workingHours/update call that is made to clone this section of service availability.

Code Block
languagejs
titlePOST /workingHours/save/staff/81651?resume=0&preview=false&splitDate=undefined period object:update/originalStartDate=2018-07-01&originalEndDate=2018-07-08
linenumberstrue
collapsetrue
[{
    "endDate": "2018-09-09",
    "endDateDateendDatDate": 15363648000001702339200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "inEditableRange": true,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": falsetrue,
            "inEditableRangeeditable": falsetrue,
            "timesinEditableRange": [{ false,
            "noActiveTimes": false,
            "activeresumeDayTimeAfterBreakStarts": truefalse,
                "endTimetimes": 1300,[{
                "endTimeObjactive": "2018-07-01 13:00:00"true,
                "startTimeendTime": 12001300,
                "startTimeObjendTimeObj": "2018-07-01 1213:00:00",
            }],    "id": 0,
       "workday": 1         }],"resumeDayTimeAfterBreakStarts": false,
         "locationId       "roomNumber": 81125null,
        "locationName        "startTime": "Second Office",1200,
                "objecttypestartTimeAfterEndTime": "PROFESSIONAL"false,
 
      "professionalId": 81651,         "professionalNamestartTimeObj": "Titus Bigly2018-07-01 12:00:00",
 
      "reasonId": null,         "reasonNameworkScheduleId": null,
           "resourceId": null, }],
            "resourceNameworkday": null1
        }],
        "recurringlocationId": false81125,
        "repeatIntervallocationName": "Second nullOffice",
        "repeatScheduleobjecttype": null"PROFESSIONAL",
    "sat": false,
    "secondWeekprofessionalId": false81651,
        "startDateprofessionalName": "2018-07-09Titus Bigly",
        "startDateDatereasonId": 1530403200000null,
    "sun": false,     "thirdWeekreasonName": falsenull,
 
  "thu": false,     "tueresourceId": falsenull,
    "validDOTW": [],     "wedresourceName": false
}]

Finally we show the period object that gets returned on all subsequent GET calls.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{null
    }],
    "endDateoriginalEndDate": "2018-0907-0908",
    "endDateDateorginalStartDate": 1536451200000"2018-07-01",
    "firstWeekrecurring": false,
    "fourthWeekrepeatInterval": falsenull,
    "frirepeatSchedule": falsenull,
    "lastWeeksat": false,
    "monsecondWeek": false,
    "objectsshowAddLocation": [{true,
    "startDate": "2018-07-09",
    "daysstartDateDate": [{1701734400000,
    "sun": false,
      "checkedthirdWeek": false,
    "thu": false,
      "timestue": [{false,
    "updating": true,
    "validDOTW": [],
    "activewed": false
true,}]

Finally we show the period object that gets returned on all subsequent GET calls.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{    
    "endDate": "2018-09-09",
      "endTimeendDateDate": 13001536451200000,
    "firstWeek": false,
    "fourthWeek": false,
    "endTimeObjfri": "2018-07-09 13:00:00"false,
    "lastWeek": false,
    "mon": false,
    "roomNumberobjects": null,[{
        "days": [{
            "startTimechecked": 1200false,
                "startTimeObjtimes": "2018-07-09 12:00:00",
[{
                "workScheduleIdactive": 1415156true,
                 }],"endTime": 1100,
                "workdayendTimeObj": 1"2018-07-09 13:00:00",
        }],         "locationIdroomNumber": 81125null,

       "locationName": "Second Office",         "objecttypestartTime": "PROFESSIONAL"900,
        "professionalId": 81651,
        "professionalNamestartTimeObj": "Titus Bigly2018-07-09 12:00:00",
        "reasonId": null,         "reasonNameworkScheduleId": null,1415156
           "resourceId": null }],
            "resourceNameworkday": null 1,
        }],
        "recurringlocationId": false81125,
        "repeatIntervallocationName": "Second nullOffice",
        "repeatScheduleobjecttype": null"PROFESSIONAL",
        "satprofessionalId": false81651,
    "secondWeek": false,     "startDateprofessionalName": "2018-07-09Titus Bigly",
        "startDateDatereasonId": 1531094400000null,
        "sunreasonName": falsenull,
        "thirdWeekresourceId": falsenull,
        "thuresourceName": false,null
    "}],
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "sat": false,
    "secondWeek": false,
    "startDate": "2018-07-01",
    "startDateDate": 1531094400000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "wed": false
}]

...

Say your employee Titus Bigly has service availability set up in Office 1 from noon until 1 pm on Wednesday, June 27, and you get him to agree to offer additional availability at your part-time beach office later in the afternoon on the same day from 3 until 4:30 pm. Here is what you would do:

...

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "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
languagejs
titlePOST /workingHours/save/staff/81651?resume=0&preview=false&splitDate=undefined period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-06-27",
    "endDateDate": 1530057600000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "inEditableRange": false,
    "lastWeek": false,
    "lessThanOneWeek": true,
    "mon": false,
    "noActiveTimes": false,
    "objects": [{
        "days": [{
            "checked": false,
            inEditableRange: false,
            times: "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,
    }, {   "validDayCounter": 1
    days: [{}],
    "recurring": false,
       times"repeatInterval": [{null,
    "repeatSchedule": null,
    "resumeDayTimeAfterBreakStarts": false,
    endTime"sat": 1630false,
    "secondWeek": false,
    "showAddLocation": true,
    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
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "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: null     }]     recurring"endTime": false1630,
    repeatInterval: null,     repeatSchedule: null,     resumeDayTimeAfterBreakStarts"endTimeObj": false"2018-06-27 16:30:00",
    sat: false,     secondWeek: false,     startDate"roomNumber": "2018-06-27"null,
    startDateDate: 1530057600000,     startTimeAfterEndTime: false,     sun"startTime": false1500,
    thirdWeek: false,     thu: false,     tue"startTimeObj": false"2018-06-27 15:00:00",
    validDOTW: [3],
    wed: false }]

Finally we show the period object that gets returned on all subsequent GET calls.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{     endDate: "2018-06-27",workScheduleId": 1425109
     endDateDate: 1530057600000,     firstWeek: false}],
     fourthWeek: false,      fri"workday": 3
false,     lastWeek: false,  }],
  mon: false,     objects"locationId": [{81881,
        days"locationName": [{
"Beach Office",
           checked"objecttype": false"PROFESSIONAL",
        "professionalId": 81651,
  times: [{     "professionalName": "Titus Bigly",
         active"reasonId": truenull,
        "reasonName": null,
        endTime"resourceId": 1630null,
        "resourceName": null
    }],
   endTimeObj: "2018-06-27 16:30:00""recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    startTime"sat": 1500false,
      "secondWeek": false,
         startTimeObj"startDate": "2018-06-27 15:00:00",
                workScheduleId: 1425109"startDateDate": 1530057600000,
            }]
            workday: 3"sun": false,
        }]
        locationId: 81181"thirdWeek": false,
        locationName"thu": "Beach Office",
  false,
     objecttype: "PROFESSIONAL",
        professionalIdtue": 81651false,
        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
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    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
languagejs
titlePOST /workingHours/save/staff/80891?resume=undefined&preview=false&splitDate=2019-01-01 period object:
linenumberstrue
collapsetrue
[{
    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",
                workScheduleId: 1420756
            }]
            workday: 5
        }]
        locationId: 81353,
        locationName: "Downtown Office",
        objecttype: "PROFESSIONAL",
        professionalId: 80891,
        professionalName: "Mr. Biscuits",
        reasonId: null,
        reasonName: null,
        resourceId: null,
        resourceName: null
    }]
    recurring"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
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2019-05-17",
    "endDateDate": 1558051200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
    repeatInterval: null,     repeatSchedule: null,
    sat: false, "times": [{
    secondWeek: false,     startDate: "2018-08-20",     startDateDate: 1534723200000,
    sun"active": falsetrue,
    thirdWeek: false,     thu: false,     tue"endTime": false1700,
    validDOTW: [],     wed: false
}]

Finally we show the two new period objects that get returned on all subsequent GET calls.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{     endDate"endTimeObj": "2018-12-3108-20 17:00:00",
    endDateDate: 1546214400000,     firstWeek: false,     fourthWeek"roomNumber": falsenull,
    fri: false,     lastWeek: false,     mon"startTime": false1600,
    objects:   [{         days: [{"startTimeObj": "2018-08-20 16:00:00",
            checked: false,   "workScheduleId": 1420755
        times: [{   }],
             active"workday": true,1
        }],
        endTime"locationId": 170081353,
                endTimeObj"locationName": "2018-08-20 17:00:00Downtown Office",
        "objecttype": "PROFESSIONAL",
        startTime"professionalId": 160080891,
                startTimeObj"professionalName": "2018-08-20 16:00:00Mr. Biscuits",
        "reasonId": null,
        workScheduleId: 1420758"reasonName": null,
        "resourceId": null,
   }]     "resourceName": null
    }],
 workday: 1  "recurring": false,
    "repeatInterval": }null,
{    "repeatSchedule": null,
       checked"sat": false,
    "secondWeek": false,
      times: [{"startDate": "2018-08-20",
    "startDateDate": 1534723200000,
    "sun": false,
    active"thirdWeek": truefalse,
    "thu": false,
    "tue": false,
    endTime"wed": 1700,
false
}]

Next we show the request payload of the POST call made to split up the date range.

Code Block
languagejs
titlePOST /workingHours/save/staff/80891?resume=undefined&preview=false&splitDate=2019-01-01 period object:
linenumberstrue
collapsetrue
[{
               endTimeObj"endDate": "20182019-0805-20 17:00:00",
    "endDateDate": 1558051200000,
    "firstWeek": false,
    startTime"fourthWeek": 1600false,
    "fri": false,
    "inEditableRange": true,
    startTimeObj"lastWeek": "2018-08-20 16:00:00"false,
    "lessThanOneWeek": false,
    "mon": false,
    workScheduleId"objects": 1420759[{
        "days": [{
  }]             workday: 3
        },
{"checked": false,
             checked"inEditableRange": false,
            "times": [{
                "active": true,
                "endTime": 1700,
                "endTimeObj": "2018-08-20 17:00:00",
                "roomNumber": null,
                "startTime": 1600,
                "startTimeObj": "2018-08-20 16:00:00",
                "workScheduleId": 14207601420754
            }],
            "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": "2018-08-20",
    "startDateDate": 1534723200000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "validDOTW": [],
    "wed": false
},

}]

Finally we show the two new period objects that get returned on all subsequent GET calls.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "endDate": "20192018-0512-1731",
    "endDateDate": 15463008000001546214400000,
    "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",
                "roomNumber": null,
                "startTime": 1600,
                "startTimeObj": "2018-08-20 16:00:00",
                "workScheduleId": 14207621420758
            }],
            "workday": 1
        }],
{             checked"locationId": false81353,
            times"locationName": [{
"Downtown Office",
               active: true,
                endTime: 1700,"objecttype": "PROFESSIONAL",
        "professionalId": 80891,
        endTimeObj"professionalName": "2019-01-01 17:00:00Mr. Biscuits",
        "reasonId": null,
        startTime"reasonName": 1600null,
        "resourceId": null,
        startTimeObj"resourceName": "2019-01-01 16:00:00" null
    }],
    "recurring": false,
    "repeatInterval": null,
    workScheduleId"repeatSchedule": 1420763null,
    "sat": false,
    "secondWeek": false,
}]    "startDate": "2018-08-20",
    "startDateDate": 1534723200000,
 workday: 3  "sun": false,
    "thirdWeek": }false,
{
    "thu": false,
      checked"tue": false,
    "wed": false
},
{
    times"endDate": [{"2019-05-17",
    "endDateDate": 1546300800000,
    "firstWeek": false,
    active"fourthWeek": truefalse,
    "fri": false,
    "lastWeek": false,
    endTime"mon": 1700false,
    "objects": [{
          endTimeObj: "2019-01-01 17:00:00","days": [{
            "checked": false,
   startTime: 1600,        "times": [{
       startTimeObj: "2019-01-01 16:00:00",       "active": true,
        workScheduleId: 1420764       "endTime": 1700,
    }]             workday"endTimeObj": 5
"2018-08-20 17:00:00",
       }]         locationId"roomNumber": 81353null,
   
    locationName: "Downtown Office",         objecttype: "PROFESSIONALstartTime": 1600,
        professionalId: 80891,         professionalName"startTimeObj": "Mr. Biscuits2018-08-20 16:00:00",
        reasonId: null,         reasonName"workScheduleId": null,1420762
        resourceId: null,   }],
     resourceName: null     }] "workday": 1
  recurring: false,     repeatInterval: null}],
    repeatSchedule: null,     sat"locationId": false81353,
    secondWeek: false,     startDate"locationName": "2019-01-01Downtown Office",
    startDateDate: 1546300800000,     sun"objecttype": false"PROFESSIONAL",
    thirdWeek: false,     thu"professionalId": false80891,
    tue: false,     wed: false
}]

Example 6:
How to add a staff member to the service availability for a location

Say your employee Master J has service availability at your beach office from 10 am until noon on Thursday, June 14. You want to add your employee Dr. J to the service availability, but you want to make him available in the evenings for those customers who cannot make it to the morning session. Here is what you would do:

First we show the initial period object as returned in the GET call.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    endDate: "2018-06-14""professionalName": "Mr. Biscuits",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
    endDateDate: 1528934400000    "resourceName": null
    }],
    firstWeek"recurring": false,
    "repeatInterval": null,
    fourthWeek"repeatSchedule": falsenull,
    fri"sat": false,
    lastWeek"secondWeek": false,
    mon"startDate": false"2019-01-01",
    objects"startDateDate": [{1546300800000,
    "sun": false,
  days: [{ "thirdWeek": false,
    "thu": false,
    checked"tue": false,
            times: "wed": false
}]

Example 6:
How to add a staff member to the service availability for a location

Say your employee Master J has service availability at your beach office from 10 am until noon on Thursday, June 14. You want to add your employee Dr. J to the service availability, but you want to make him available in the evening for those customers who cannot make it to the morning session. Here is what you would do:

First we show the initial period object as returned in the GET call.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
                active: true,
                endTime: 1200,
                endTimeObj"endDate": "2018-06-14 12:00:00",
                startTime: 1000,

               startTimeObj: "2018-06-14 10:00:00""endDateDate": 1528934400000,
    "firstWeek": false,
    "fourthWeek": false,
    workScheduleId"fri": 1389497false,
    "lastWeek": false,
    "mon": false,
 }]   "objects": [{
        workday"days": 4[{
        }]    "checked": false,
   locationId: 81129,
        locationName: "Beach Officetimes",: [{
       objecttype: "PROFESSIONAL",         professionalId"active": 82275true,
        professionalName: "Master J",         reasonId"endTime": null1200,
        reasonName: null,       "endTimeObj":  resourceId: null,"2018-06-14 12:00:00",
          resourceName: null     }]"roomNumber": null,
    recurring: false,     repeatInterval: null,     repeatSchedule"startTime": null1000,
    sat: false,     secondWeek: false,     startDate"startTimeObj": "2018-06-14",
    startDateDate: 1528934400000 10:00:00",
    sun: false,     thirdWeek: false,     thu"workScheduleId": false,1389497
    tue: false,     wed: false }]

Next we show the request payload of the POST call that is made to add the staff member.

Code Block
languagejs
titlePOST /workingHours/save/location/81129?resume=0&preview=false&splitDate=undefined period object:
linenumberstrue
collapsetrue
[{
    endDate: "2018-06-14",,
      endDateDate: 1528934400000,     firstWeek"workday": false,4
    fourthWeek: false,   }],
 fri:  false,     inEditableRange"locationId": false81129,
        lastWeek"locationName": false"Beach Office",
     lessThanOneWeek   "objecttype": true"PROFESSIONAL",
    mon: false,     objects"professionalId": [{82275,
        days"professionalName": [{
"Master J",
        "reasonId": null,
 checked: false,      "reasonName": null,
     times: [{  "resourceId": null,
        "resourceName": null
   active: true}],
    "recurring": false,
    "repeatInterval": null,
    endTime"repeatSchedule": 1200null,
    "sat": false,
    "secondWeek": false,
     endTimeObj"startDate": "2018-06-14 12:00:00",
    "startDateDate": 1528934400000,
    "sun": false,
    startTime"thirdWeek": 1000false,
    "thu": false,
    "tue": false,
    startTimeObj"wed": "2018-06-14 10:00:00",
         false
}]

Next we show the request payload of the POST call that is made to add the staff member.

Code Block
languagejs
titlePOST /workingHours/save/location/81129?resume=0&preview=false&splitDate=undefined period object:
linenumberstrue
collapsetrue
[{
      workScheduleId: 1389497"endDate": "2018-06-14",
    "endDateDate": 1528934400000,
      }]
            workday: 4"firstWeek": false,
        }]
        locationId: 81129"fourthWeek": false,
        locationName"fri": "Beach Office"false,
        objecttype: "PROFESSIONAL",
        professionalId: 82275,
  "inEditableRange": false,
     professionalName: "Master J",
        reasonId: null"lastWeek": false,
        reasonName: null,
  "lessThanOneWeek": true,
     resourceId"mon": nullfalse,
        resourceName"noActiveTimes": nullfalse,
    },
"objects": [{
        "days": [{
            "checked": false,
            "times": [{
                active: true,
                endTime: 1900"endTime": 1200,
                "endTimeObj": "2018-06-14 1912:00:00",
                "startTime": 18001000,
                "startTimeObj": "2018-06-14 1810:00:00",
            }],
            "workday": 4
        }],
        "locationId": 81129,
        "locationName": "Beach Office",
        "objecttype": "PROFESSIONAL",
        "professionalId": 8198882275,
        "professionalName": "Dr.Master J",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
        "resourceName": null
    }],
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "resumeBreakTimeAfterBreakStarts": false,
    "sat": false,
    "secondWeek": false,
    "startDate": "2018-06-14",
    "startDateDate": 1528934400000,
    "startTimeAfterEndTime": false,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue: false": false,
    "validDOTW": [3],
    "wed": false
}]

Finally we show the period object that gets returned on all subsequent GET calls.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-06-14",
    "endDateDate": 1528934400000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1200,
                "endTimeObj": "2018-06-14 12:00:00",
                "roomNumber": null,
                "startTime": 1000,
                "startTimeObj": "2018-06-14 10:00:00",
                "workScheduleId": 1389497
            }],
            "workday": 4
        }],
        "locationId": 81129,
        "locationName": "Beach Office",
        "objecttype": "PROFESSIONAL",
        "professionalId": 82275,
        "professionalName": "Master J",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
        "resourceName": null
    },
{
         "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1900,
                "endTimeObj": "2018-06-14 19:00:00",
                "roomNumber": null,
                "startTime": 1800,
                "startTimeObj": "2018-06-14 18:00:00",
                "workScheduleId": 1416875
            }],
            "workday": 4
        }],
        "locationId": 81129,
        "locationName": "Beach Office",
        "objecttype": "PROFESSIONAL",
        "professionalId": 81988,
        "professionalName": "Dr. J",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
        "resourceName": null
    }],
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "sat": false,
    "secondWeek": false,
    "startDate": "2018-06-14",
    "startDateDate": 1528934400000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "wed": false
}]

Example 7:
How to remove the working hours of service availability for one staff person at one location from one date

...

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-06-21",
    "endDateDate": 1529539200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1400,
                "endTimeObj": "2018-06-19 14:00:00",
                "roomNumber": null,
                "startTime": 1300,
                "startTimeObj": "2018-06-19 13:00:00",
                "workScheduleId": 1429327
            }],
            "workday": 2
        },
{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1400,
                "endTimeObj": "2018-06-20 14:00:00",
               endTimeObj: "2018-06-20 14:00:00"roomNumber": null,
                "startTime": 1300,
                "startTimeObj": "2018-06-20 13:00:00",
                "workScheduleId": 1429328
            }],
            "workday": 3
        },
{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1400,
                "endTimeObj": "2018-06-21 14:00:00",
                "roomNumber": null,
                "startTime": 1000,
                "startTimeObj": "2018-06-21 13:00:00",
                "workScheduleId": 1429329
            }],
            "workday": 4
        }],
        "locationId": 81129,
        "locationName": "Beach Office",
        "objecttype": "PROFESSIONAL",
        "professionalId": 82275,
        "professionalName": "Mr. Biscuits",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
        "resourceName": null
    }],
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "sat": false,
    "secondWeek": false,
    "startDate": "2018-06-19",
    "startDateDate": 1529366400000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "wed": false
}]

Next we show the request payload of the POST call that is made to delete this availability.

Code Block
languagejs
titlePOST /workingHours/delete period object:payload
linenumberstrue
collapsetrue
[{
    "endDate": "2018-06-21",
    "endDateDate": 1529539200000,
    "firstWeek": false,
    fourthWeek "fourthWeek": false,
    "fri": false,
    fri"inEditableRange": false,
    "lastWeek": false,
    "lessThanOneWeek": true
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
            "inEditableRange": false
            "times": [],
            "workday": 2
        },
{
        "days": [{
            "checked": false,
            "inEditableRange": false
            "times": [{
                "active": true,
                "endTime": 1400,
                "endTimeObj": "2018-06-19 14:00:00",
                "roomNumber": null,
                "startTime": 1300,
                "startTimeObj": "2018-06-19 13:00:00",
                "workScheduleId": 1429328
            }],
            "workday": 3
        },
{
        "days": [{
            "checked": false,
            "inEditableRange": false
            "times": [],
            "workday": 4
        }],
        "locationId": 81181,
        "locationName": "Beach Office",
        "objecttype": "PROFESSIONAL",
        "professionalId": 80891,
        "professionalName": "Mr. Biscuits",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
        "resourceName": null,
        "validDayCounter": 3
    }],
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "sat": false,
    "secondWeek": false,
    "startDate": "2018-06-19",
    "startDateDate": 1529366400000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "validDOTW": [2, 3, 4],
    "wed": false
}]

Finally we show the period object that get returned on all subsequent GET calls.

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-06-21",
    "endDateDate": 1529539200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1400,
                "endTimeObj": "2018-06-19 14:00:00",
                "roomNumber": null,
                "startTime": 1300,
                "startTimeObj": "2018-06-19 13:00:00",
                "workScheduleId": 1429327
            }],
            "workday": 2
        },
{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1400,
                "endTimeObj": "2018-06-21 14:00:00",
                "roomNumber": null,
                "startTime": 1000,
                "startTimeObj": "2018-06-21 13:00:00",
                "workScheduleId": 1429329
            }],
            "workday": 4
        }],
        "locationId": 81129,
        "locationName": "Beach Office",
        "objecttype": "PROFESSIONAL",
        "professionalId": 82275,
        "professionalName": "Mr. Biscuits",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
        "resourceName": null
    }],
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "sat": false,
    "secondWeek": false,
    "startDate": "2018-06-19",
    "startDateDate": 1529366400000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "wed": false
}]