Zoho CRM Custom Views

To apply CRUD operations of customviews, to pin field and to sort fields of customviews

OpenAPI Specification

zoho-crm-custom-views-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Custom Views",
    "description": "To apply CRUD operations of customviews, to pin field and to sort fields of customviews",
    "version": "8"
  },
  "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"
        }
      }
    }
  ],
  "paths": {
    "/settings/custom_views": {
      "get": {
        "summary": "Get All Custom Views",
        "description": "Get all custom views of a module",
        "operationId": "getCustomViews",
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/Filters"
          }
        ],
        "responses": {
          "200": {
            "description": "Get all custom views response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "Get all custom views of a module",
                  "type": "object",
                  "properties": {
                    "custom_views": {
                      "description": "List of custom views",
                      "maxItems": 200,
                      "type": "array",
                      "items": {
                        "description": "Custom view item",
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/CustomViewGetItem"
                          },
                          {
                            "description": "Custom view item with required fields",
                            "required": [
                              "display_value",
                              "access_type",
                              "category",
                              "system_defined",
                              "default",
                              "module",
                              "created_by",
                              "modified_by",
                              "id"
                            ]
                          }
                        ],
                        "unevaluatedProperties": false
                      }
                    },
                    "info": {
                      "description": "Additional information about the response",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomViewInfo"
                        },
                        {
                          "description": "Custom view info with required fields",
                          "required": [
                            "per_page",
                            "count",
                            "page",
                            "more_records",
                            "default",
                            "translation"
                          ]
                        }
                      ],
                      "unevaluatedProperties": false
                    }
                  },
                  "required": [
                    "custom_views",
                    "info"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error on fetching custom views",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UrlErrorResponseForCustomView"
                    },
                    {
                      "$ref": "#/components/schemas/RequiredParameterMissingResponse"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access token or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response schema when user lacks required permissions to access custom views",
                  "additionalProperties": false,
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "description": "Indicates the response status"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "PERMISSION_DENIED"
                      ],
                      "description": "Application-specific error code"
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Human-readable error message"
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the permission error",
                      "additionalProperties": false,
                      "required": [
                        "permissions"
                      ],
                      "properties": {
                        "permissions": {
                          "type": "array",
                          "description": "List of permission-related error messages",
                          "maxItems": 100,
                          "items": {},
                          "minItems": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Permission denied for the operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleForbiddenErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.custom_views.READ"
            ]
          }
        ]
      }
    },
    "/settings/custom_views/{id}": {
      "get": {
        "summary": "Get Custom View By Id",
        "description": "Get a specific custom view of a module using custom view ID",
        "operationId": "getCustomViewById",
        "parameters": [
          {
            "$ref": "#/components/parameters/Id"
          },
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/Include"
          }
        ],
        "responses": {
          "200": {
            "description": "Get a specific custom view of a module using custom view ID",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get a specific custom view of a module using custom view ID",
                  "additionalProperties": false,
                  "type": "object",
                  "properties": {
                    "custom_views": {
                      "maxItems": 1,
                      "description": "List of custom views",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomViewGetItem"
                      }
                    },
                    "info": {
                      "description": "Additional information about the response",
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomViewInfo"
                        },
                        {
                          "description": "Custom view info with required fields",
                          "required": [
                            "translation"
                          ]
                        }
                      ],
                      "unevaluatedProperties": false
                    }
                  },
                  "required": [
                    "custom_views",
                    "info"
                  ]
                }
              }
            }
          },
          "204": {
            "description": "Given customview id is not found"
          },
          "400": {
            "description": "Error on fetching custom views",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RequiredParameterMissingResponse"
                    },
                    {
                      "$ref": "#/components/schemas/UrlErrorResponseForCustomView"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access token or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response schema when user lacks required permissions to access custom views",
                  "additionalProperties": false,
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "description": "Indicates the response status"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "PERMISSION_DENIED"
                      ],
                      "description": "Application-specific error code"
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 500,
                      "description": "Human-readable error message"
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the permission error",
                      "additionalProperties": false,
                      "required": [
                        "permissions"
                      ],
                      "properties": {
                        "permissions": {
                          "type": "array",
                          "description": "List of permission-related error messages",
                          "maxItems": 100,
                          "items": {},
                          "minItems": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Permission denied for the operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleForbiddenErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.custom_views.READ"
            ]
          }
        ]
      }
    },
    "/settings/custom_views/actions/change_sort": {
      "put": {
        "description": "Change the sort order of a custom view",
        "summary": "Change Sort Order",
        "operationId": "changeSort",
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Request body for changing the sort order of a custom view",
                "additionalProperties": false,
                "type": "object",
                "properties": {
                  "custom_views": {
                    "description": "List of custom views to update sort order",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "description": "Custom view sort order details",
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "sort_by": {
                          "$ref": "#/components/schemas/FieldReference"
                        },
                        "sort_order": {
                          "description": "Order of sorting",
                          "type": "string",
                          "enum": [
                            "asc",
                            "desc"
                          ]
                        },
                        "id": {
                          "maxLength": 25,
                          "description": "ID of the custom view to update",
                          "type": "string"
                        }
                      },
                      "required": [
                        "sort_by",
                        "sort_order"
                      ]
                    }
                  }
                },
                "required": [
                  "custom_views"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "CustomView Sort Updated Successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomViewUpdateSuccessResponse"
                }
              }
            }
          },
          "207": {
            "description": "Multiple status response for customview sort customization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Custom view failure details response schema",
                  "additionalProperties": false,
                  "properties": {
                    "custom_views": {
                      "type": "array",
                      "description": "Array of custom views with failure details",
                      "maxItems": 200,
                      "items": {
                        "description": "Custom view failure item",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/CustomViewUpdateSuccess"
                          },
                          {
                            "$ref": "#/components/schemas/CustomViewSortFailureItem"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error Response for sorting custom views by field",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UrlErrorResponseForCustomView"
                    },
                    {
                      "$ref": "#/components/schemas/RequiredParameterMissingResponse"
                    },
                    {
                      "$ref": "#/components/schemas/CustomViewSortFailureDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Permission denied for the operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleForbiddenErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.custom_views.UPDATE"
            ]
          }
        ]
      }
    },
    "/settings/custom_views/{id}/actions/change_sort": {
      "put": {
        "description": "Change the sort order of a custom view",
        "summary": "Change Sort Order",
        "operationId": "changeSortById",
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Request body for changing the sort order of a custom view",
                "additionalProperties": false,
                "type": "object",
                "properties": {
                  "custom_views": {
                    "description": "List of custom views to update sort order",
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "description": "Custom view sort order details",
                      "additionalProperties": false,
                      "type": "object",
                      "properties": {
                        "sort_by": {
                          "$ref": "#/components/schemas/FieldReference"
                        },
                        "sort_order": {
                          "description": "Order of sorting",
                          "type": "string",
                          "enum": [
                            "asc",
                            "desc"
                          ]
                        }
                      },
                      "required": [
                        "sort_by",
                        "sort_order"
                      ]
                    }
                  }
                },
                "required": [
                  "custom_views"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "CustomView Sort Updated Successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomViewUpdateSuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error Response for sorting custom views by field",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/UrlErrorResponseForCustomView"
                    },
                    {
                      "$ref": "#/components/schemas/RequiredParameterMissingResponse"
                    },
                    {
                      "$ref": "#/components/schemas/CustomViewSortByIdFailureDetails"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Permission denied for the operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModuleForbiddenErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.custom_views.UPDATE"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "Id": {
        "description": "custom view id",
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "maxLength": 25,
          "type": "string"
        }
      },
      "Module": {
        "name": "module",
        "in": "query",
        "description": "module name",
        "required": true,
        "schema": {
          "maxLength": 25,
          "type": "string"
        }
      },
      "Filters": {
        "name": "filters",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/FilterCriterionRequest"
        },
        "description": "Parameter `filters` in `query`."
      },
      "Include": {
        "name": "include_inner_details",
        "in": "query",
        "description": "To include inner details of criteria and cross filters",
        "required": false,
        "schema": {
          "maxLength": 25,
          "type": "string",
          "enum": [
            "$..criteria.field.field_label",
            "$..criteria.field.ui_type"
          ]
        }
      }
    },
    "schemas": {
      "CustomViewInfo": {
        "additionalProperties": false,
        "description": "Info object containing translations",
        "type": "object",
        "properties": {
          "per_page": {
            "description": "number of records per page",
            "type": "integer",
            "format": "int32"
          },
          "count": {
            "description": "total number of records",
            "type": "integer",
            "format": "int32"
          },
          "page": {
            "description": "current page number",
            "type": "integer",
            "format": "int32"
          },
          "more_records": {
            "description": "indicates if more records are available",
            "type": "boolean"
          },
          "default": {
            "maxLength": 255,
            "description": "default view",
            "type": "string"
          },
          "translation": {
            "additionalProperties": false,
            "description": "translations for different view categories",
            "type": "object",
            "properties": {
              "public_views": {
                "maxLength": 255,
                "description": "translation for public views",
                "type": "string"
              },
              "other_users_views": {
                "maxLength": 255,
                "description": "translation for public views",
                "type": "string"
              },
              "shared_with_me": {
                "maxLength": 255,
                "description": "translation for public views",
                "type": "string"
              },
              "created_by_me": {
                "maxLength": 255,
                "description": "translation for public views",
                "type": "string"
              }
            },
            "required": [
              "public_views",
              "other_users_views",
              "shared_with_me",
              "created_by_me"
            ]
          }
        }
      },
      "FieldReference": {
        "description": "field of customview",
        "additionalProperties": false,
        "type": "object",
        "properties": {
          "api_name": {
            "description": "API name of the field",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "field id",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserReference": {
        "additionalProperties": false,
        "description": "user-details object",
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "maxLength": 20,
            "type": "string",
            "description": "Unique user id"
          },
          "name": {
            "maxLength": 255,
            "type": "string",
            "description": "Display name of the user"
          }
        }
      },
      "SharedTo": {
        "description": "Information about users/groups the Custom View is shared with",
        "type": [
          "array",
          "null"
        ],
        "maxItems": 250,
        "items": {
          "description": "Shared To Object",
          "additionalProperties": false,
          "type": "object",
          "properties": {
            "name": {
              "description": "Name of the user/group",
              "type": "string",
              "maxLength": 255
            },
            "id": {
              "description": "ID of the user/group",
              "type": "string",
              "maxLength": 20
            },
            "type": {
              "description": "Type of share (user/group)",
              "type": "string",
              "enum": [
                "territories",
                "roles",
                "groups",
                "users"
              ]
            },
            "subordinates": {
              "type": [
                "boolean",
                "null"
              ],
              "description": "true if subordinates are included, false otherwise"
            }
          },
          "required": [
            "id",
            "type"
          ]
        }
      },
      "CustomViewField": {
        "maxItems": 250,
        "description": "Fields included in the Custom View",
        "type": "array",
        "items": {
          "description": "Field Object",
          "properties": {
            "api_name": {
              "description": "API name of the field",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "description": "field id",
              "type": [
                "string",
                "null"
              ]
            },
            "_pin": {
              "description": "Indicates if the field is pinned",
              "type": "boolean"
            },
            "_width": {
              "format": "int32",
              "type": "integer",
              "description": "Width of the field in pixels"
            },
            "_pin_order": {
              "description": "Pin order of the field",
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "CustomViewGetItem": {
        "description": "Custom View GET Item",
        "additionalProperties": false,
        "type": "object",
        "properties": {
          "wrap_text": {
            "description": "Indicates if the Custom View is wrapped",
            "type": "boolean"
          },
          "name": {
            "maxLength": 255,
            "description": "Name of the Custom View",
            "type": "string"
          },
          "display_value": {
            "description": "Display Value of the Custom View",
            "type": "string",
            "maxLength": 255
          },
          "$modified_criteria": {
            "type": "boolean",
            "description": "Indicates if the criteria has been modified"
          },
          "access_type": {
            "description": "Access Type of the Custom View",
            "type": "string",
            "enum": [
              "shared",
              "public",
              "only_to_me"
            ]
          },
          "created_time": {
            "description": "Creation Time of the Custom View",
            "type": "string",
            "format": "date-time"
          },
          "modified_time": {
            "description": "Modification Time of the Custom View",
            "type": "string",
            "format": "date-time"
          },
          "last_accessed_time": {
            "description": "Last Accessed Time of the Custom View",
            "type": "string",
            "format": "date-time"
          },
          "system_name": {
            "maxLength": 255,
            "description": "System Name of the Custom View",
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "description": "Category of the Custom View",
            "enum": [
              "public_views",
              "other_users_views",
              "shared_with_me",
              "created_by_me"
            ],
            "type": "string"
          },
          "default": {
            "description": "Indicates if the Custom View is set as default",
            "type": "boolean"
          },
          "system_defined": {
            "description": "Indicates if the Custom View is system defined",
            "type": "boolean"
          },
          "locked": {
            "description": "Indicates if the Custom View is locked",
            "type": "boolean"
          },
          "favorite": {
            "description": "Indicates if the Custom View is marked as favorite",
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "offline": {
            "description": "Indicates if the Custom View is available offline",
            "type": "boolean"
          },
          "criteria": {
            "$ref": "#/components/schemas/FilterCriterionResponse"
          },
          "cross_filters": {
            "description": "Cross Filters applied to the Custom View",
            "type": "array",
            "minItems": 0,
            "maxItems": 3,
            "items": {
              "additionalProperties": false,
              "description": "Cross Filter Object",
              "type": "object",
              "properties": {
                "include_objects": {
                  "description": "Indicates if related records are to be included",
                  "type": "boolean"
                },
                "relation": {
                  "description": "Child relationship module information",
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "additionalProperties": false,
                    "api_name": {
                      "description": "API name of the Child relationship module",
                      "maxLength": 255,
                      "type": "string"
                    },
                    "id": {
                      "description": "Id of the Child relationship module",
                      "maxLength": 20,
                      "type": "string"
                    },
                    "$disrupted": {
                      "description": "Display name of the related module",
                      "type": "boolean"
                    }
                  }
                },
                "criteria": {
                  "$ref": "#/components/schemas/FilterCriterionResponse"
                }
              }
            }
          },
          "shared_to": {
            "$ref": "#/components/schemas/SharedTo"
          },
          "module": {
            "$ref": "#/components/schemas/ModuleReference"
          },
          "modified_by": {
            "$ref": "#/components/schemas/UserReference"
          },
          "created_by": {
            "$ref": "#/components/schemas/UserReference"
          },
          "fields": {
            "$ref": "#/components/schemas/CustomViewField"
          },
          "sort_by": {
            "description": "Field used to sort the Custom View",
            "oneOf": [
              {
                "$ref": "#/components/schemas/FieldReference"
              },
              {
                "type": "null",
                "description": "No sort is applied"
              }
            ]
          },
          "sort_order": {
            "description": "Sort order of the Custom View",
            "oneOf": [
              {
                "description": "Ascending or Descending order",
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ]
              },
              {
                "description": "No sort order is applied",
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zoho-crm/refs/heads/main/openapi/zoho-crm-custom-views-openapi.json