Skip to main content

GetUserScheduleExceptions()

Returns an object with user's exception objects

Written by Erik
Updated today

GetUserScheduleExceptions(user_id, date_from, date_to) : retrieves an array of Exception objects whose date range overlaps with the requested date range—all fields including exception id.

Use this function to retrieve the schedule exceptions information about a given user or multiple users, such as working hours, start and finish coordinates, and break information.

Input

mapslyUserId: ID of a user for whom you want to retrieve information.
OR

mapslyUserId[]: array of IDs of users for whom you want to retrieve information

date_from: string, starting date for which you want to retrieve the exceptions

date_to: string, ending date for which you want to retrieve the exceptions

Example:

{{ GetUserScheduleExceptions(currentMapslyUser.userId.system, "2026-41-01", "2026-05-30") }}

Output

An object containing the following information about the specified user's schedule exceptions:

[
{
"id": "89b41b89-bb6a-471e-94ef-b8ab833ce8b9",
"periodFrom": "2026-04-27T20:00:00.000Z",
"periodTo": "2026-04-30T19:59:59.999Z",
"workingHours": {
"monday": null,
"tuesday": {
"start": {
"hours": 9,
"minutes": 0
},
"end": {
"hours": 14,
"minutes": 0
}
},
"wednesday": { },
"thursday": { },
"friday": null,
"saturday": null,
"sunday": null
},
"allowedOvertime": null,
"breakType": null,
"breakDuration": null,
"breakEarliestTime": null,
"breakLatestTime": null,
"breakMaxDrivingTime": null,
"startPoint": null,
"endPoint": null
},
{
"id": "4b6b5cb9-5c3f-47f7-9c31-c3b78ce4c4b4",
"periodFrom": "2026-05-10T20:00:00.000Z",
"periodTo": "2026-05-18T19:59:59.999Z",
"workingHours": {
"monday": null,
"tuesday": null,
"wednesday": null,
"thursday": null,
"friday": null,
"saturday": null,
"sunday": null
},
"allowedOvertime": null,
"breakType": null,
"breakDuration": null,
"breakEarliestTime": null,
"breakLatestTime": null,
"breakMaxDrivingTime": null,
"startPoint": null,
"endPoint": null
}
]
Did this answer your question?