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:

  • 60 = UTC+1.
  • -120 = UTC-2

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
nameThe print name of the daystring
workedBoolean. True = worked day, False = not workedbool
fromThe minute offset in user/company timezone when work starts in the morning. 0 = 0am, 480 = 8am in user timezone. Disregard if worked = false.int
toThe minute offset on day when work ends. Disregard if worked = false.int
pauseTotal 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