Versions Compared

Key

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

...

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-09-19",
    "endDateDate": 1537315200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1100,
                "endTimeObj": "2018-09-05 11:00:00",
                "roomNumber": null,
                "startTime": 900,
                "startTimeObj": "2018-09-05 09:00:00",
                "workScheduleId": 1418311
            }],
            "workday": 3
        }],
        "locationId": 81125,
        "locationName": "Second Office",
        "objecttype": "PROFESSIONAL",
        "professionalId": 82275,
        "professionalName": "Major Hay",
        "reasonId": null,
        "reasonName": null,
        "resourceId": null,
        "resourceName": null
    }],
    "recurring": false,
    "repeatInterval": null,
    "repeatSchedule": null,
    "sat": false,
    "secondWeek": false,
    "startDate": "2018-09-05",
    "startDateDate": 1536105600000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    "wed": false
}]

...

Code Block
languagejs
titleGET /workingHours period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-07-08",
    "endDateDate": 1531008000000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1100,
                "endTimeObj": "2018-07-01 13:00:00",
                "roomNumber": null,
                "startTime": 900,
                "startTimeObj": "2018-07-01 12:00:00",
                "workScheduleId": 1390854
            }],
            "workday": 1
        }{],
        "locationId": 81125,
     checked: false,  "locationName": "Second Office",
        times: [{"objecttype": "PROFESSIONAL",
        "professionalId": 81651,
        active"professionalName": true"Titus Bigly",
        "reasonId": null,
        endTime"reasonName": 1300null,
        "resourceId": null,
        endTimeObj"resourceName": "2018-07-01 13:00:00" null
    }],
    "recurring": false,
    "repeatInterval": null,
    startTime"repeatSchedule": 1200null,
    "sat": false,
    "secondWeek": false,
    startTimeObj"startDate": "2018-07-01 12:00:00",
                workScheduleId: 1390855
            }]
            workday: 3
       }{
            checked: false,
            times: [{
                active: true,
                endTime: 1300,
                endTimeObj: "2018-07-01 13:00:00",
                startTime: 1200,
                startTimeObj: "2018-07-01 12:00:00",
                workScheduleId: 1390856
            }]
            workday: 5
        }]
        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-01",
    startDateDate: 1530403200000,
    sun: false,
    thirdWeek: false,
    thu: false,
    tue: false,
    wed: false
}]

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

Code Block
languagejs
titlePOST /workingHours/save/staff/81651?resume=0&preview=false&splitDate=undefined period object:
linenumberstrue
collapsetrue
[{
    endDate: "2018-09-09",
    endDateDate: 1536364800000,
    firstWeek: false,
    fourthWeek: false,
    fri: false,
    inEditableRange: true,
    lastWeek: false,
    mon: false,
    objects: [{
        days: [{
            checked: false,
            inEditableRange: false,
            times: [{
                active: true,
                endTime: 1300,
                endTimeObj: "2018-07-01 13:00:00",
                startTime: 1200,
                startTimeObj: "2018-07-01 12:00:00",
            }]
            workday: 1
        },
{
            checked: false,
            inEditableRange: false,
            times: [{
                active: true,
                endTime: 1300,
                endTimeObj: "2018-07-01 13:00:00",
                startTime: 1200,
                startTimeObj: "2018-07-01 12:00:00",
            }]
            workday: 3
       },
{
            checked: false,
            inEditableRange: false,
            times: [{
                active: true,
                endTime: 1300,
                endTimeObj: "2018-07-01 13:00:00",
                startTime: 1200,
                startTimeObj: "2018-07-01 12:00:00",
            }]
            workday: 5
        }]
        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",
    "startDateDate": 1530403200000,
    "sun": false,
    "thirdWeek": false,
    "thu": false,
    "tue": false,
    validDOTW: [],
    wed"wed": false
}]

...

Next we show the

...

request payload of the POST call that is made to clone this service availability.

Code Block
languagejs
titleGET POST /workingHours/save/staff/81651?resume=0&preview=false&splitDate=undefined period object:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-09-09",
    "endDateDate": 15364512000001536364800000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": false,
    "inEditableRange": true,
    "lastWeek": false,
    "mon": false,
    "objects": [{
        "days": [{
            "checked": false,
            "inEditableRange": false,
            "times": [{
                "active": true,
                "endTime": 1300,
                "endTimeObj": true "2018-07-01 13:00:00",
                endTime"startTime": 13001200,
                endTimeObj"startTimeObj": "2018-07-0901 1312:00:00",
            }],
            startTime"workday": 1200,1
        }],
       startTimeObj: "2018-07-09 12:00:00"locationId": 81125,
        "locationName": "Second Office",
        workScheduleId"objecttype": 1415156"PROFESSIONAL",
        "professionalId": 81651,
  }]      "professionalName": "Titus Bigly",
    workday: 1   "reasonId": null,
    }, {   "reasonName": null,
        checked"resourceId": falsenull,
        "resourceName": null
  times: [{  }],
    "recurring": false,
    "repeatInterval": null,
    active"repeatSchedule": truenull,
    "sat": false,
    "secondWeek": false,
    endTime"startDate": 1300"2018-07-09",
    "startDateDate": 1530403200000,
    "sun": false,
    endTimeObj"thirdWeek": "2018-07-09 13:00:00"false,
    "thu": false,
    "tue": false,
    startTime"validDOTW": 1200[],
    "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
[{    
     startTimeObj"endDate": "2018-0709-09 12:00:00",
    "endDateDate": 1536451200000,
    "firstWeek": false,
    workScheduleId"fourthWeek": 1415157false,
    "fri": false,
    "lastWeek": false,
}]    "mon": false,
    "objects": [{
 workday: 3        },
"days": [{
            "checked": false,
            "times": [{
                "active": true,
                "endTime": 1300,
                "endTimeObj": "2018-07-09 13:00:00",
                "roomNumber": null,
                "startTime": 1200,
                "startTimeObj": "2018-07-09 12:00:00",
                "workScheduleId": 14151581415156
            }],
            "workday": 51,
        }],
        "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
}]

Example 4:
How to add a location to an existing period object of service availability for a staff person

...