Update a Calendar View

Purpose

Use this API to update the details of calendar views.

Endpoints

  • PUT /settings/calendar
  • PUT /settings/calendar/{id}

Request Details

Request URL

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

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

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

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/calendar/554023000006088013"
-X PUT
-d "@input.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Request JSON Keys

  • namestring, mandatory

    Represents the name of the calendar view. Accepts alphanumeric characters.

  • usersJSON array, mandatory if you do not include "user_groups"

    Each JSON object in this array represents the record ID and name of the users you want to add to this calendar view. Use the Get Users API to get the name and ID of the users in your org. Note that you can include either "users" or "user_groups" array in the input.

  • user_groupsJSON array, mandatory if you do not include "users"

    Each JSON object in this array represents the record ID and name of the user groups you want to add to this calendar view. Use the Get User Groups API to get the name and ID of the user groups in your org. Note that you can include either "users" or "user_groups" array in the input.

  • last_accessedBoolean, optional

    Boolean key that represents if you want to make this view the one that was last accessed. If you had marked any other view as last_accessed=true, this API call will reset that value to false and mark this view the last accessed one.

Note
 

You can modify only name, users, user_groups, and last_accessed keys using this API.

Sample Input

Copied{
    "calendar": [
        {
            "id": "554023000006088013",
            "name": "Calendartest_New"
        }
    ]
}

Possible Errors

  • INVALID_DATAHTTP 400

    The input has a value of an invalid JSON data type.
    Resolution: Refer to the "details" key in the response for the exact error. Refer to the Request JSON section for the accepted keys and their data types.

  • MANDATORY_NOT_FOUNDHTTP 400

    You have not specified one or more mandatory fields in the input.
    Resolution: Refer to the Request JSON section for all the mandatory keys in the input.

  • AMBIGUITY_DURING_PROCESSINGHTTP 400

    You have included both "users" and "user_groups" in the input.
    Resolution: It is sufficient to input either of these keys in the input.

  • EXPECTED_FIELD_MISSINGHTTP 400

    You have not included users or user_groups in the input.
    Resolution: You must include either of these keys.

  • MANDATORY_NOT_FOUNDHTTP 400

    You have not include the "name" key in the input.
    Resolution: The "name" key is mandatory in the input. Refer to the "Request JSON section for the mandatory keys.

  • INVALID_REQUEST_METHODHTTP 400

    The request method is incorrect.
    Resolution: Use the HTTP POST 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 add calendar views.
    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 ZohoCRM.settings.calendar.UPDATE or ZohoCRM.settings.calendar.ALL.

  • NO_PERMISSIONHTTP 403

    You do not have permission to update calendar views.
    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{
    "calendar": [
        {
            "code": "SUCCESS",
            "status": "success",
            "message": "calendar view updated succesfully",
            "details": {
                "id": "554023000006088013"
            }
        }
    ]
}