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",
    "endDatDate": 1702339200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": true,
            "editable": true,
            "inEditableRange": false,
            "noActiveTimes": false,
            "resumeDayTimeAfterBreakStarts": false,
            "times": [{
                "active": true,
                "endTime": 1300,
                "endTimeObj": "2018-07-01 13:00:00",
                "id": 0,
                "resumeDayTimeAfterBreakStarts": false,
                "roomNumber": null,
                "startTime": 1200,
                "startTimeAfterEndTime": false,
                "startTimeObj": "2018-07-01 12:00:00",
                "workScheduleId": null
            }],
            "workday": 1
        }],
        "locationId": 81125,
        "locationName": "Second Office",
        "objecttype": "PROFESSIONAL",
        "professionalId": 81651,
        "professionalName": "Titus Bigly",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
        "resourceName": null
    }],
    "recurringoriginalEndDate": false"2018-07-08",
    "orginalStartDate": "2018-07-01",
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "sat": false,
    "secondWeek": false,
    "showAddLocation": true,
    "startDate": "2018-07-09",
    "startDateDate": 1701734400000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "updating": true,
    "validDOTW": [],
    "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-09-09",
    "endDateDate": 1536451200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1100,
                "endTimeObj": "2018-07-09 13:00:00",
                "roomNumber": null,
                "startTime": 900,
                "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-0901",
    "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
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,
    "objectsnoActiveTimes": [{false,
        "daysobjects": [{
            "checkeddays": false,[{
            "inEditableRangechecked": 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,
        "validDayCounter": 1
    }],
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "resumeDayTimeAfterBreakStarts": false,
    "sat": false,
    "secondWeek": false,
    "showAddLocation": true,
    "startDate": "2018-06-27",
    "startDateDate": 1530057600000,
    "startTimeAfterEndTime": false,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "validDOTW": [3],
    "wed": false
}]

...

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": 1630,
                "endTimeObj": "2018-06-27 16:30:00",
                "roomNumber": null,
                "startTime": 1500,
                "startTimeObj": "2018-06-27 15:00:00",
                "workScheduleId": 1425109
            }],
            "workday": 3
        }],
        "locationId": 8118181881,
        "locationName": "Beach 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-06-27",
    "startDateDate": 1530057600000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "wed": false
}]

...

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",
                "roomNumber": null,
                "startTime": 1600,
                "startTimeObj": "2018-08-20 16:00:00",
                "workScheduleId": 1420754
            }],
            "workday": 1
        }],
        "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
}]

...

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-12-31",
    "endDateDate": 1546214400000,
    "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": 1420758
            }],
            "workday": 1
        }],
        "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
},
{
    "endDate": "2019-05-17",
    "endDateDate": 1546300800000,
    "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": 1420762
            }],
            "workday": 1
        }],
        "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
}]

...

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 evening for those customers who cannot make it to the morning session. Here is what you would do:

...

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
    }],
    "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
}]

...

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": false,
    "fourthWeek": false,
    "fri": false,
    "inEditableRange": false,
    "lastWeek": false,
    "lessThanOneWeek": true,
    "mon": false,
    "objectsnoActiveTimes": [{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1200,
                "endTimeObj": "2018-06-14 12:00:00",
                "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,
   
    "resourceNameobjects": null
    },[{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 19001200,
                "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,
    "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
}]

...

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",
                "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
}]

...

Code Block
languagejs
titlePOST /workingHours/delete period object:payload
linenumberstrue
collapsetrue
[{
    "endDate": "2018-06-21",
    "endDateDate": 1529539200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "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
}]

...

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
}]

...