persons/{uid}/calendar/week
Returns the default week days settings for the user:
- Which days are worked and not worked (weekends)
- Per day: When does the user start and end work and duration of pause.
Â
URL
(GET) /persons/{uid}/calendar/week
PARAMETERS
The URL parameters are:
uid | The person ID | int, Mandatory |
Â
RESULTS
A JSON object where each item represents one day. Properties for a day are:Â
timezone | The timezone of the user. This is a string identifier. | string |
offset | The timezone offset in minutes for today and with respect to UTC. Examples:
Note that the timezone offset may vary with summer/winter time. | decimal |
days | An array of the 7 week days, see below. | object[] |
Â
Each element in days has these properties:Â
day | The day index. 0 = Sunday, 1 = Monday... 6 = Saturday | int |
name | The print name of the day | string |
worked | Boolean. True = worked day, False = not worked | bool |
from | The minute offset in user/company timezone when work starts in the morning. 0 = 0am, 480 = 8am in user timezone. Disregard if worked = false. | int |
to | The minute offset on day when work ends. Disregard if worked = false. | int |
pause | Total minutes paused during the day (typically the mid-day pause). Disregard if worked = false. | int |
Â
EXAMPLE
Â
 { "timezone": "Romance Standard Time", "offset": 120.0, "days": [{ "day": 1, "name": "Monday", "worked": true, "from": 480, "to": 1080, "pause": 60 }, { "day": 2, "name": "Tuesday", "worked": true, "from": 480, "to": 1080, "pause": 60 }, { "day": 3, "name": "Wednesday", "worked": true, "from": 480, "to": 1080, "pause": 60 }, { "day": 4, "name": "Thursday", "worked": true, "from": 480, "to": 1080, "pause": 60 }, { "day": 5, "name": "Friday", "worked": true, "from": 480, "to": 1080, "pause": 60 }, { "day": 6, "name": "Saturday", "worked": false, "from": 540, "to": 1080, "pause": 60 }, { "day": 0, "name": "Sunday", "worked": false, "from": 540, "to": 1080, "pause": 60 }] }
Â
Â
Â
Â
Copyright Wordbee - Buzzin' Outside the Box since 2008