Get Calendar Preferences

Purpose

To retrieve the user’s calendar configuration settings such as the working hours, holiday settings, week start preference, default activity durations, reminder configurations, notification channels, meeting preferences, etc.

Endpoints

  • GET /settings/calendar/user_calendar_preferences

Request Details

Request URL

{api-domain}/crm/{version}/settings/calendar/user_calendar_preferences

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.calendar.ALL 
(or)
ZohoCRM.settings.calendar.READ

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/calendar/user_calendar_preferences"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Response JSON

  • activity_typeJSON array

    The type of activity such as calls, meetings, appointments, etc.

  • caldav_detailsJSON object

    The status of CalDav synchronization. True indicates that the calendar preference is synced with the CalDav server.

  • day_end_atstring

    Represents the time at which the user's day ends.

  • day_start_atstring

    Represents the time at which the user's day starts.

  • default_call_durationJSON object

    The default duration of the call(when it is created by this user in the calendar) with the period(minutes, hours, etc) along with the unit. for example, if the period is minutes and the unit is 30, it indicates that the default call duration is set for 30 minutes at the time of creation.

  • default_event_durationJSON object

    The default duration of the event(when it is created by this user) with the period(minutes, hours, etc) along with the unit. For example, if the period is minutes and the unit is 30, it indicates that the default event duration is 30 minutes at the time of creation.

  • hide_declined_eventsBoolean

    Boolean key that represents whether you want to hide the declined events on the calendar.

  • hide_eventsJSON object

    is_enabled represents if the declined events are hidden on the calendar and duration represents the duration of the declined event.

  • holiday_1string

    The primary holiday of the week.

  • holiday_2string

    The secondary holiday of the week.

  • invitation_countinteger

    The number of pending invitations for the user.

  • is_shiftBoolean

    Represents whether the user follows a shift-based work schedule.

  • meeting_preferencesJSON array

    Represents the meeting service provider configuration for the user.

  • remindersJSON object

    Represents the complete reminder configuration including timing rules for different event types and notification channel settings.

    • notificationsJSON array

      Represents the notification channel configuration for calendar reminders.
       

      • isChatLink - Boolean - Represents whether the notification includes a direct chat link(read-only)
      • isExtensionInstalled - Boolean - Represents whether the integration extension is installed for this notification channel(read-only)
      • turn_off_reminder - Boolean - Represents whether reminders are disabled for this notification channel
      • type - string - Represents the notification channel type such as 'cliq', 'cisco', 'slack', 'google_chat', 'microsoft_teams', 'sms', 'email'.
    • remind_atJSON object

      Represents the reminder timing configuration for different activity types such as appointments, events, all-day events.
       

      • is_available - Boolean - Represents whether reminders are enabled for appointments and events/p>
      • reminder - JSON object - Represents the reminder configuration for notifications, events with the period(minutes, hours, etc) and the unit
      • all_day_events - JSON object - Represents the reminder configuration specifically for all-day calendar events. Includes the "is_available" and "reminder" keys similar to "appointments" and "events" JSON objects.
  • send_notification_appointmentBoolean

    Represents whether you want to send notifications for appointment reminders.

  • send_notification_eventBoolean

    Represents whether you want to send notifications for event reminders.

  • show_week_numberBoolean

    Represents whether you want to display ISO week numbers in the calendar view.

  • week_include_holidaysBoolean

    Represents whether you want to include holidays when calculating weekly working hours.

  • week_starts_onstring

    Represents the day the calendar week starts on.

Possible Errors

  • NO_CONTENTHTTP 204

    No user found for the specified user ID in the request.
    Resolution: Use the Get Users API to get the list of users and their IDs.

  • INVALID_DATAHTTP 400

    You have specified an invalid input to one of the parameters.
    Resolution: Refer to the "details" key in the error response for the exact error and specify valid values to the parameters. Refer to the Parameters section for the list of accepted parameters, their data types, and the accepted values.

  • INVALID_REQUEST_METHODHTTP 400

    The request method is incorrect.
    Resolution: Use the HTTP GET method to make this API call. Any other request method will result in this error.

  • AUTHORIZATION_FAILEDHTTP 400

    You do not have sufficient permission to view the calendar activities of the user(s).
    Resolution: Contact your system administrator.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    The access token you have used to make this API call does not have the required scope.
    Resolution: Generate a new access token with the scope mentioned in the Scopes section.

  • NO_PERMISSIONHTTP 403

    The user does not have permission to view calendar preferences.
    Resolution: Contact your system administrator.

  • INVALID_URL_PATTERNHTTP 404

    The request URL is incorrect.
    Resolution: Specify a valid request URL. Refer to the Request URL section for the right URL.

  • INTERNAL_ERRORHTTP 500

    Unexpected and unhandled exception in the server. 
    Resolution: Contact the support team at support@zohocrm.com.

Sample Response

Copied{
    "user_calendar_preferences": [
        {
            "reminders": {
                "remind_at": {
                    "appointments": null,
                    "events": {
                        "reminder": {
                            "unit": 30,
                            "period": "minutes"
                        },
                        "is_available": true
                    },
                    "all_day_events": {
                        "reminder": {
                            "unit": 2,
                            "period": "days"
                        },
                        "is_available": true
                    }
                },
                "notifications": [
                    {
                        "isExtensionInstalled": false,
                        "type": "cliq",
                        "isChatLink": false,
                        "turn_off_reminder": true
                    },
                    {
                        "type": "email",
                        "turn_off_reminder": true
                    }
                ]
            },
            "is_shift": false,
            "show_week_number": false,
            "holiday_1": "monday",
            "holiday_2": "tuesday",
            "hide_events": {
                "is_enabled": false,
                "duration": null
            },
            "day_end_at": "19:00:00",
            "invitation_count": 0,
            "hide_declined_events": true,
            "default_call_duration": {
                "unit": 30,
                "period": "minutes"
            },
            "meeting_preferences": [
                {
                    "conference_details": "",
                    "toolname": "ZohoMeeting",
                    "type": "built_in_audio"
                },
                {
                    "conference_details": "",
                    "toolname": "ZohoMeeting",
                    "type": "built_in_audio"
                }
            ],
            "week_include_holidays": true,
            "day_start_at": "11:00:00",
            "activity_type": [
                "calls"
            ],
            "caldav_details": {
                "caldav_status": false
            },
            "send_notification_event": true,
            "week_starts_on": "wednesday",
            "default_event_duration": {
                "unit": 30,
                "period": "minutes"
            },
            "send_notification_appointment": null
        }
    ]
}