Skip to main content

GET - Get user's free/ busy details

Purpose

This API is used to get the free/busy details of the user from all the calendars.

Request URL

https://calendar.zoho.com/api/v1/calendars/freebusy

OAuth Scope

scope=ZohoCalendar.freebusy.ALL

(or)

scope=ZohoCalendar.freebusy.READ

 

ALL - Full access to free/ busy details

READ - Gets free/ busy details

Parameters

  • uemailstring, mandatory
    • uemail is the email address of the user, whose free/ busy schedule should be fetched.
    • The email should be in the format xyz@domain.com.
  • sdateiso8601basic, mandatory
    • sdate is the start date and time from which the free/busy details should be retrieved.
    • The supported format for sdate parameter is yyyyMMdd'T'HHmmss.
    • (yyyy - Year, MM - Month, dd - Date, HH - Hours, mm - Minutes, ss - Seconds.)
    • Example: 20170419T080000
  • edateiso8601basic, mandatory
    • edate is the end date and time up to which the free/busy details should be retrieved.
    • The supported format for edate parameter is yyyyMMdd'T'HHmmss.
    • (yyyy - Year, MM - Month, dd - Date, HH - Hours, mm - Minutes, ss - Seconds.)
    • Example: 20170419T080000
  • ftypestring, optional
    • The free/ busy details can be fetched either based on events or time.
    • If the ftype=eventbased, then the response will list the date and time of the events when the user is busy.
    • If the ftype=timebased, then the response will list the time at which the user is busy on a particular day. The time will be listed in a 24 hours format. If the user has an all-day event then the response will have the value "allday": true, if not the value will be given as "null".
    • Example:
      • The response for a user having both an all-day event and time-based events.
        • "20211215": [ { "allday": true }, [ "02:30-03:50", "12:30-14:00", "20:00-20:30" ] ]
      • The response for a user having time-based events but not an all-day event.
        • "20211214": [ null, [ "00:30-01:00" ]​ ]

    Note: If the ftype parameter is not given then the response will be given for event-based free/ busy data by default for the given time period.

Sample Request

Copiedhttps://calendar.zoho.com/api/v1/calendars/freebusy?uemail=paula@zylker.com&sdate=20170419T080000&edate=20170420T180000&ftype=eventbased

Sample Response: Event based

Copied{
  "freebusy": [
    {
      "startTime": "20170419T190000Z",
      "endTime": "20170419T193000Z",
      "fbtype": "busy"
    },
   ]
}

Sample Response: Time based

Copied{
  "20211201": [],
  "20211202": [],
  "20211203": [],
  "20211204": [],
  "20211205": [],
  "20211206": [],
  "20211207": [],
  "20211208": [],
  "20211209": [],
  "20211210": [],
  "20211211": [],
  "20211212": [],
  "20211213": [],
  "20211214": [
    null,
    [
      "00:30-01:00"
    ]
  ],
  "20211215": [
    {
      "allday": true
    },
    [
      "02:30-03:50",
      "12:30-14:00",
      "20:00-20:30"
    ]
  ],
  "20211216": [
    {
      "allday": true
    }
  ],
  "20211217": [],
  "20211218": [],
  "20211219": [],
  "20211220": [],
  "20211221": [],
  "20211222": [],
  "20211223": [],
  "20211224": []
}