Get User's Work Places
Overview
Request for User Work Places based on date and time.
This will return the user's Work Places based on a date and time frame.
Details
Type
POST
Endpoint
{{url}}/api/Users/GetWorkPlaces
Request
The request will have five valid parameters.
The Id
or EmailAddress
can be used; at least one is required.
Date
- optional, the user's Work Place information should be returned only for the specified day.
StartDateTime
& EndDateTime
- optional, used to get a user's Work Place information based on a specific date & time range.
If either the Date
or StartDateTime/EndDateTime
are not included the status should be returned based on the current day.
Example
{
"Id": int,
"EmailAddress": "string (email address)",
"Date": "dd/MM/yyyy",
"StartDateTime": "dd/MM/yyyy HH:mm",
"EndDateTime": "dd/MM/yyyy HH:mm"
}
Response
The response will include the user's status and working location based on the requested time range.
If the user has a booking during the requested time frame then information about that booking should also be returned.
The Work Locations should be returned based on the requested time frame.DefaultWorkPlaces
should also be included which is the default weekly schedule the user has defined.
WorkPlaceExceptions
will be dates and times that the user has specified as differing from their default schedule. This will only show future events.
Example
{
"Id": int,
"EmailAddress": "string (email address)",
"Date": "dd/MM/yyyy",
"StartDateTime": "dd/MM/yyyy HH:mm",
"EndDateTime": "dd/MM/yyyy HH:mm",
"CurrentWorkPlace": "string",
"ActiveBooking": int, // if in a booking include booking ID
"DefaultWorkPlaces": Object{
"Monday": Array[
Object{"StartTime": "09:00", "EndTime": "17:00", "Place": "string"}
],
"Tuesday": Array[
Object{"StartTime": "09:00", "EndTime": "17:00", "Place": "string"}
],
"Wednesday": Array[
Object{"StartTime": "09:00", "EndTime": "17:00", "Place": "string"}
],
"Thursday": Array[
Object{"StartTime": "09:00", "EndTime": "17:00", "Place": "string"}
],
"Friday": Array[
Object{"StartTime": "09:00", "EndTime": "17:00", "Place": "string"}
],
"Saturday": Array[],
"Sunday": Array[],
}
"WorkPlaceExceptions": Array[
Object{
"Id": int,
"Date": "dd/MM/yyyy",
"StartTime": "HH:mm",
"EndTime": "HH:mm",
"WorkPlace": "string"
}
]
}