LeadSquared Developer Centre


Get Available Slots of Users by Id

Lets you retrieve availability slots for multiple users by passing user Ids.

  • 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 Ids 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.
  • “NoSlotsReason” parameter as either “Holiday”“Leave”“NotScheduled” or “WorkDayTemplateNotDefined”.

* Note that users can create multiple tasks at the same time. The API returns slot as busy if and only if the task type of the task in the conflicting slot has the “Allow Conflicts” setting is set to false.


POST https://{host}/v2/Task.svc/RetrieveAvailableSlots/ByUserId? accessKey=AccessKey&secretKey=SecretKey


Content-Type: application/json
JSON Body/Payload Icon

Request Parameters

Parameter Description

Starting date to retrieve user availability slots from.

End date to retrieve user availability slots till.

You can pass multiple user Ids here.


Pass true to include availability slots with conflicting appointments. Pass false to exclude conflicting appointment slots.


Use “PageIndex” to specify the number of pages to return and “PageSize” to indicate the number of records you want returned per page.


200 OK
Content-Type: application/json

HTTP Response Codes

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.

On this page

© 2022 by MarketXpander Services Pvt Ltd. All Rights Reserved.