Zoho CRM Call Preferences

Preference to show From Number / To Number fields in CRM User can enable the respective preference in order to have the field in CRM. i.e. If user needs From Number field, show_fromnumber preference is send as true in API If the account has any active telephony integration, the user is not allowed to disable any of the preference. If the account has active calendar booking for calls, user is not allowed to disable show_to_number preference.

OpenAPI Specification

zoho-crm-call-preferences-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Call Preferences",
    "description": "Preference to show From Number / To Number fields in CRM User can enable the respective preference in order to have the field in CRM. i.e. If user needs From Number field, show_fromnumber preference is send as true in API If the account has any active telephony integration, the user is not allowed to disable any of the preference. If the account has active calendar booking for calls, user is not allowed to disable show_to_number preference.",
    "version": "8.0"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        },
        "version": {
          "default": "v8",
          "description": "API Version"
        }
      }
    }
  ],
  "security": [
    {
      "iam-oauth2-schema": [
        "ZohoCRM.settings.modules.read",
        "ZohoCRM.settings.modules.update"
      ]
    }
  ],
  "paths": {
    "/settings/call_preferences": {
      "get": {
        "operationId": "getCallPreferences",
        "summary": "To get the Call preferences of the user",
        "description": "This will return the user preferred Call preference details that is used to display the from number / to number field in CRM",
        "responses": {
          "200": {
            "description": "The call preference detail is fectched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Response schema providing the Call preferences detail upon the successful GET request",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "call_preferences": {
                      "description": "Call preference configuration.",
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "show_from_number": {
                          "type": "boolean",
                          "description": "Whether the 'from number' field should be visible or not."
                        },
                        "show_to_number": {
                          "type": "boolean",
                          "description": "Whether the 'to number' field should be visible or not."
                        }
                      },
                      "required": [
                        "show_from_number",
                        "show_to_number"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The get operation is failed due to reasons like Invalid data, Not authorized",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "The user does not have permission to perform this action.",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code representing an authorization failure",
                          "enum": [
                            "NO_PERMISSION"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "description": "Error Status",
                          "enum": [
                            "error"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Error details with validation information",
                          "properties": {
                            "permissions": {
                              "type": "array",
                              "description": "Detail field: permissions",
                              "maxItems": 10,
                              "items": {
                                "type": "string",
                                "description": "Refers to the current user's permission",
                                "maxLength": 255
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.modules.read"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateCallPreferences",
        "summary": "Updating Call preference",
        "description": "This will update the user's Call preference",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "These properties will decide whether the show_from_number and show_to_number need to visible or not ",
                "additionalProperties": false,
                "properties": {
                  "call_preferences": {
                    "type": "object",
                    "description": "Based on these properties the call preference is updated",
                    "additionalProperties": false,
                    "properties": {
                      "show_from_number": {
                        "type": "boolean",
                        "description": "Indicating show_from_number need to visible or not"
                      },
                      "show_to_number": {
                        "type": "boolean",
                        "description": "Indicating show_to_number need to visible or not"
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Call preference is updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "description": "The response object properties",
                  "properties": {
                    "call_preferences": {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Success Response Properties",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Success code",
                          "enum": [
                            "SUCCESS"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Success message",
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "description": "Success status",
                          "enum": [
                            "success"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Response Details"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Auto-generated from ApiDefinition for INVALID_DATA",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Possible errors",
                      "properties": {
                        "call_preferences": {
                          "oneOf": [
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "If the value is anything other than a boolean (true or false), the request will be rejected with a 400 Invalid Data error.",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "description": "Error code",
                                  "enum": [
                                    "INVALID_DATA"
                                  ]
                                },
                                "message": {
                                  "type": "string",
                                  "description": "Error message",
                                  "maxLength": 255
                                },
                                "status": {
                                  "type": "string",
                                  "description": "Error Status",
                                  "enum": [
                                    "error"
                                  ]
                                },
                                "details": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "Error details with validation information",
                                  "properties": {
                                    "expected_data_type": {
                                      "type": "string",
                                      "description": "Detail field: expected_data_type",
                                      "enum": [
                                        "boolean"
                                      ]
                                    },
                                    "api_name": {
                                      "type": "string",
                                      "description": "Detail field: api_name",
                                      "maxLength": 255
                                    },
                                    "json_path": {
                                      "type": "string",
                                      "description": "Detail field: json_path",
                                      "maxLength": 255
                                    }
                                  },
                                  "required": [
                                    "expected_data_type",
                                    "api_name",
                                    "json_path"
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "status",
                                "details"
                              ]
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "when trying to disable show_from_number or show_to_number, but the field is configured in places like blueprint, WorkFlow, Layout Rule, Validation Rule or telephony integrations is enabled",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "description": "Error code",
                                  "enum": [
                                    "NOT_ALLOWED"
                                  ]
                                },
                                "message": {
                                  "type": "string",
                                  "description": "Error message",
                                  "maxLength": 255
                                },
                                "status": {
                                  "type": "string",
                                  "description": "Error Status",
                                  "enum": [
                                    "error"
                                  ]
                                },
                                "details": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "Error details with validation information",
                                  "properties": {
                                    "api_name": {
                                      "type": "string",
                                      "description": "Detail field: api_name",
                                      "enum": [
                                        "show_from_number",
                                        "show_to_number"
                                      ]
                                    },
                                    "json_path": {
                                      "type": "string",
                                      "description": "Detail field: json_path",
                                      "maxLength": 255
                                    }
                                  },
                                  "required": [
                                    "api_name",
                                    "json_path"
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "status",
                                "details"
                              ]
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "when trying to disable show_from_number or show_to_number, but the field is marked as mandatory",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "description": "Error code",
                                  "enum": [
                                    "NOT_ALLOWED"
                                  ]
                                },
                                "message": {
                                  "type": "string",
                                  "description": "Error message",
                                  "maxLength": 255
                                },
                                "status": {
                                  "type": "string",
                                  "description": "Error Status",
                                  "enum": [
                                    "error"
                                  ]
                                },
                                "details": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "Error details with validation information",
                                  "properties": {
                                    "api_name": {
                                      "type": "string",
                                      "description": "Detail field: api_name",
                                      "enum": [
                                        "show_from_number",
                                        "show_to_number"
                                      ]
                                    },
                                    "json_path": {
                                      "type": "string",
                                      "description": "Detail field: json_path",
                                      "maxLength": 255
                                    }
                                  },
                                  "required": [
                                    "api_name",
                                    "json_path"
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "status",
                                "details"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "call_preferences"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Invalid HTTP method to access the API URL.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "enum": [
                            "INVALID_REQUEST_METHOD"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "description": "Error Status",
                          "enum": [
                            "error"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Details of the error response"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.modules.update"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "iam-oauth2-schema": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
            "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
            "refreshUrl": "https://accounts.zoho.com/oauth/v2/token",
            "scopes": {
              "ZohoCRM.settings.modules.read": "read call_preferences",
              "ZohoCRM.settings.modules.update": "update call_preferences"
            }
          }
        }
      }
    }
  }
}