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-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",
                "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",
                "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",
                "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:
linenumberstrue
collapsetrue
[{
    "endDate": "2018-06-21",
    "endDateDate": 1529539200000,
    "firstWeek": false,
    "fourthWeek": false,
    "fri": 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",
                "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",
                "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",
                "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
}]