Get Free or Busy Information

    Gets “Free/Busy” information of users. It only gets Free/Busy information of default calendars.

    API Type

    Service API

    Request URL

    https://apis.worksmobile.com/r/{API_ID}/calendar/v2/users/me/freeBusy

    HTTP Method

    GET

    Query Parameters

    Parameter Type Required Description
    accountIdList List<String> Y Account ID list to get free and busy information for.
    It can have up to 30 account IDs.
    date String N Date on which you want to get free and busy information (yyyyMMdd).
    If it is empty, today’s date is set.
    freeBusyType String N Type (in uppercase)
    ● FREE: Returns free time (default).
    ● BUSY: Returns busy time.

    Response

    Property Type Required Description
    result String Y API request result
    code Integer Y HTTP status code
    returnValue List Y List of free and busy information objects
    accountId String Y accountId
    freeBusyMask Object Y Object that contains free and busy information.
      freeBusyMask.fbType.name String Y FBTYPE’s enum name (fixed value)
      freeBusyMask.fbType.value String Y FBTYPE's enum value. FREE or BUSY
      ranges List Y List of time ranges during which the calendar is specified as FREE or BUSY.
      ranges.from.epochSecond Long Y Start time of the FREE or BUSY period. It is shown in Unix time, and the unit is seconds.
      ranges.from.nano Long Y Start time of the FREE or BUSY period. It is shown in Unix time, and the unit is nanoseconds.
      ranges.until.epochSecond Long Y End time of the FREE or BUSY period. It is shown in Unix time, and the unit is seconds.
      ranges.until.nano Long Y End time of the FREE or BUSY period. It is shown in Unix time, and the unit is nanoseconds.
      viewRange Object Y Time ranges for which you want to view FREE or BUSY information.
      viewRange.from.epochSecond Long Y Start time of the period for which you want to view FREE or BUSY information. It is shown in Unix time, and the unit is seconds.
      viewRange.from.nano Long Y Start time of the period for which you want to view FREE or BUSY information. It is shown in Unix time, and the unit is nanoseconds.
      viewRange.until.epochSecond Long Y End time of the period for which you want to view FREE or BUSY information. It is shown in Unix time, and the unit is seconds.
      viewRange.until.nano Long Y End time of the period for which you want to view FREE or BUSY information. It is shown in Unix time, and the unit is nanoseconds.

    Response Example

    {
        "result": "success",
        "code": 200,
        "returnValue": [
            {
                "accountId": "99152397210@individual.com",
                "freeBusyMask": {
                    "fbType": {
                        "value": "FREE",
                        "name": "FBTYPE",
                        "factory": {
                            "supportedNames": [
                                "FBTYPE"
                            ]
                        }
                    },
                    "ranges": [
                        {
                            "from": {
                                "seconds": 1546354800,
                                "nanos": 0
                            },
                            "until": {
                                "seconds": 1546441200,
                                "nanos": 0
                            }
                        }
                    ],
                    "viewRange": {
                        "from": {
                            "seconds": 1546354800,
                            "nanos": 0
                        },
                        "until": {
                            "seconds": 1546441200,
                            "nanos": 0
                        }
                    }
                }
            }
        ]
    }