Lets you retrieve availability slots for multiple users by passing their email addresses.
- Pass a “FromDate” and “ToDate” within which you want to retrieve user availability slots. The difference between the from and to date cannot be more than 100 days.
- Pass one or more user email addresses in the “Users” parameter.
- If you want to retrieve slots that have conflicting tasks, pass the “IncludeAllowedConflictSlots” parameter as true. Otherwise pass it as false.
The API response returns –
- Available slots, break timings, busy slots and workday template timezone for each user.
- A “NoSlotsReason” parameter as either “Holiday”, “Leave”, “NotScheduled” or “WorkDayTemplateNotDefined”.
API URL
Request
JSON Body/Payload
Content-Type: application/json
{
"FromDate": "2018-08-25",
"ToDate": "2018-09-25",
"Users": [
"bobdoe@gmail.com",
"jackdoes@gmail.com"
],
"IncludeAllowedConflictSlots": false,
"Paging": {
"PageIndex": 1,
"PageSize": 100
}
}
JSON Properties
{ "FromDate": "2018-08-25", "ToDate": "2018-09-25", "Users": [ "bobdoe@gmail.com", "jackdoes@gmail.com" ], "IncludeAllowedConflictSlots": false, "Paging": { "PageIndex": 1, "PageSize": 100 } }
JSON Properties
Parameter | Description |
---|---|
FromDate | Starting date to retrieve user availability slots from. |
ToDate | End date to retrieve user availability slots till. |
Users | You can pass multiple user email addresses here. |
IncludeAllowedConflictSlots | Pass true to include availability slots with conflicting appointments. Pass false to exclude conflicting appointment slots. |
Paging | Use “PageIndex” to specify the number of pages to return and “PageSize” to indicate the number of records you want returned per page. |
Response
200 OK
Content-Type: application/json
{ "RecordCount": 2, "List": [ { "Date": "2018-09-25", "UserSlots": [ { "UserId": "477aec30-bfee-11e8-a43f-02742c1c8abe", "EmailAddress": "zoo@lsqdev.in", "UserTimeZone": "Asia/Kolkata", "AvailableSlots": [ { "StartTime": "22:15:00", "EndTime": "00:00:00" } ], "Breaks": [ { "StartTime": "22:15:00", "EndTime": "22:30:00" } ], "BusySlots": [ { "StartTime": "2018-09-25 06:00:00", "EndTime": "2018-09-25 06:30:00" }, { "StartTime": "2018-09-25 06:30:00", "EndTime": "2018-09-25 07:00:00" }, { "StartTime": "2018-09-25 06:30:00", "EndTime": "2018-09-25 07:00:00" } ], "WorkDayTemplateTimeZone": "Pacific/Tongatapu", "NoSlotsReason": null }, { "UserId": "8371b49f-a465-11e8-aa96-0258598489d8", "EmailAddress": "Bhargavi.tasknew14@mailinator.com", "UserTimeZone": "Asia/Kolkata", "AvailableSlots": null, "Breaks": null, "BusySlots": [ { "StartTime": "2018-09-25 06:30:00", "EndTime": "2018-09-25 07:00:00" }, { "StartTime": "2018-09-25 06:30:00", "EndTime": "2018-09-25 07:00:00" } ], "WorkDayTemplateTimeZone": null, "NoSlotsReason": "WorkDayTemplateNotDefined" } ] } ] }
HTTP Response Code
Code | Description |
---|---|
200 OK | This is the status code for successful API call. |
401 Unauthorized | The API call was made with invalid access credentials. Check your AccessKey and SecretKey. |
400 Bad Request | The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure. |
404 Not Found | The API could not be found. Please check the API signature. |
429 Too Many Requests | API calls exceeded the limit of 25 in 5 second(s) |
500 Internal Server Error | The API called failed. There could be many reasons for it. Check the exception message to get more details. |