Zoho CRM Mass Change Owner

API for mass changing the owner of records in a module based on a custom view. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 2 operation(s).

OpenAPI Specification

zoho-crm-mass-change-owner-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Mass Change Owner",
    "description": "API for mass changing the owner of records in a module based on a custom view.",
    "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.change_owner.ALL"
      ]
    }
  ],
  "paths": {
    "/{module}/actions/mass_change_owner": {
      "post": {
        "summary": "Mass change owner of records",
        "description": "Mass change the owner of records in a module based on a custom view",
        "operationId": "massChangeOwner",
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body for mass changing owner of records",
                "additionalProperties": false,
                "properties": {
                  "cvid": {
                    "type": "string",
                    "description": "Custom view ID",
                    "maxLength": 19
                  },
                  "owner": {
                    "type": "object",
                    "description": "New owner information",
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Owner ID",
                        "maxLength": 19
                      }
                    },
                    "required": [
                      "id"
                    ]
                  },
                  "territory": {
                    "type": "object",
                    "description": "Territory information",
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Territory ID",
                        "maxLength": 19
                      },
                      "include_child": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Whether to include child territories in the mass change operation"
                      }
                    },
                    "required": [
                      "id"
                    ]
                  },
                  "criteria": {
                    "oneOf": [
                      {
                        "description": "Value-based criteria",
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field to filter on",
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "api_name": {
                                "description": "API name of the field",
                                "type": "string",
                                "maxLength": 255
                              },
                              "id": {
                                "description": "ID of the field",
                                "type": "string",
                                "maxLength": 19
                              }
                            },
                            "required": [
                              "api_name"
                            ]
                          },
                          "comparator": {
                            "description": "Comparison operator",
                            "type": "string",
                            "enum": [
                              "equal",
                              "ends_with",
                              "not_equal",
                              "greater_than",
                              "less_than",
                              "not_between",
                              "starts_with",
                              "between",
                              "less_equal",
                              "greater_equal"
                            ]
                          },
                          "value": {
                            "description": "Value to compare against",
                            "type": "string",
                            "maxLength": 255
                          }
                        },
                        "required": [
                          "field",
                          "comparator",
                          "value"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "cvid",
                  "owner"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Mass change owner request accepted and scheduled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response containing the scheduled job details",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "description": "Array of response data",
                      "maxItems": 1,
                      "items": {
                        "type": "object",
                        "description": "Job scheduling details",
                        "additionalProperties": false,
                        "properties": {
                          "status": {
                            "type": "string",
                            "description": "Status of the operation",
                            "enum": [
                              "success"
                            ]
                          },
                          "code": {
                            "type": "string",
                            "description": "Response code",
                            "enum": [
                              "SCHEDULED"
                            ]
                          },
                          "message": {
                            "type": "string",
                            "description": "Response message",
                            "enum": [
                              "change owner is successfully scheduled"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Additional details about the scheduled job",
                            "additionalProperties": false,
                            "properties": {
                              "job_id": {
                                "type": "string",
                                "description": "Unique identifier for the scheduled job",
                                "maxLength": 19
                              }
                            },
                            "required": [
                              "job_id"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "code",
                          "message",
                          "details"
                        ]
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input parameters or data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Error response for missing mandatory fields (cvid or owner id)",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code indicating mandatory field is missing",
                          "enum": [
                            "MANDATORY_NOT_FOUND"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the missing field",
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the response",
                          "enum": [
                            "error"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the missing field",
                          "additionalProperties": false,
                          "properties": {
                            "api_name": {
                              "type": "string",
                              "description": "API name of the missing field",
                              "maxLength": 255
                            },
                            "json_path": {
                              "type": "string",
                              "description": "JSON path to the missing field",
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "api_name",
                            "json_path"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response for invalid data or module",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code indicating invalid data or module",
                          "enum": [
                            "INVALID_DATA",
                            "NOT_SUPPORTED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the invalid data or module",
                          "maxLength": 255
                        },
                        "details": {
                          "oneOf": [
                            {
                              "type": "object",
                              "description": "Details about the invalid field",
                              "additionalProperties": false,
                              "properties": {
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the invalid field",
                                  "maxLength": 255
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the invalid field",
                                  "maxLength": 255
                                }
                              },
                              "anyOf": [
                                {
                                  "type": "object",
                                  "description": "Requires api_name",
                                  "additionalProperties": false,
                                  "required": [
                                    "api_name"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "description": "Requires json_path",
                                  "additionalProperties": false,
                                  "required": [
                                    "json_path"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "description": "Details about invalid resource path",
                              "additionalProperties": false,
                              "properties": {
                                "resource_path_index": {
                                  "type": "integer",
                                  "description": "Index of the invalid resource path",
                                  "format": "int32"
                                }
                              },
                              "required": [
                                "resource_path_index"
                              ]
                            },
                            {
                              "type": "object",
                              "description": "When the given owner id is not valid (not_crm_user/deleted/inactive)",
                              "additionalProperties": false,
                              "properties": {
                                "owner_status": {
                                  "type": "string",
                                  "description": "Status of the owner",
                                  "enum": [
                                    "not_crm_user",
                                    "deleted",
                                    "inactive"
                                  ]
                                },
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the field",
                                  "maxLength": 255
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the field",
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "owner_status",
                                "api_name",
                                "json_path"
                              ]
                            },
                            {
                              "type": "object",
                              "description": "Details about expected data type mismatch",
                              "additionalProperties": false,
                              "properties": {
                                "expected_data_type": {
                                  "type": "string",
                                  "description": "Expected data type of the field",
                                  "maxLength": 255
                                },
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the field",
                                  "maxLength": 255
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the field",
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "expected_data_type",
                                "api_name",
                                "json_path"
                              ]
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the response",
                          "enum": [
                            "error"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "details",
                        "status"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response when record limit is exceeded",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Status of the response",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code indicating record limit exceeded",
                          "enum": [
                            "RECORD_LIMIT_EXCEEDED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the limit exceeded",
                          "maxLength": 255
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the exceeded limit",
                          "additionalProperties": false,
                          "properties": {
                            "limit": {
                              "type": "string",
                              "description": "The record limit that was exceeded",
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "limit"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response when expected fields are missing in criteria",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code indicating expected field is missing",
                          "enum": [
                            "EXPECTED_FIELD_MISSING"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the missing field",
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the response",
                          "enum": [
                            "error"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the missing field",
                          "additionalProperties": false,
                          "properties": {
                            "expected_fields": {
                              "type": "array",
                              "description": "List of missing expected fields",
                              "maxItems": 2,
                              "items": {
                                "type": "object",
                                "description": "Details of a missing expected field",
                                "additionalProperties": false,
                                "properties": {
                                  "api_name": {
                                    "type": "string",
                                    "description": "API name of the missing field",
                                    "maxLength": 255
                                  },
                                  "json_path": {
                                    "type": "string",
                                    "description": "JSON path to the missing field",
                                    "maxLength": 255
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "expected_fields"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response when ambiguous fields are provided",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code indicating ambiguity in field specification",
                          "enum": [
                            "AMBIGUITY_DURING_PROCESSING"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the missing field",
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the response",
                          "enum": [
                            "error"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the ambiguous fields",
                          "additionalProperties": false,
                          "properties": {
                            "ambiguity_due_to": {
                              "type": "array",
                              "description": "List of fields causing ambiguity",
                              "maxItems": 2,
                              "items": {
                                "type": "object",
                                "description": "Details of an ambiguous field",
                                "additionalProperties": false,
                                "properties": {
                                  "api_name": {
                                    "type": "string",
                                    "description": "API name of the ambiguous field",
                                    "maxLength": 255
                                  },
                                  "json_path": {
                                    "type": "string",
                                    "description": "JSON path to the ambiguous field",
                                    "maxLength": 255
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "ambiguity_due_to"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Error response for missing dependent fields",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code indicating dependent field is missing or mismatched",
                          "enum": [
                            "DEPENDENT_FIELD_MISSING",
                            "DEPENDENT_MISMATCH"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the missing field",
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the response",
                          "enum": [
                            "error"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the missing field",
                          "additionalProperties": false,
                          "properties": {
                            "dependee": {
                              "type": "object",
                              "description": "Details about the dependee field",
                              "additionalProperties": false,
                              "properties": {
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the dependee field",
                                  "maxLength": 255
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the dependee field",
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "api_name",
                                "json_path"
                              ]
                            },
                            "api_name": {
                              "type": "string",
                              "description": "API name of the missing field",
                              "maxLength": 255
                            },
                            "json_path": {
                              "type": "string",
                              "description": "JSON path to the missing field",
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "api_name",
                            "json_path",
                            "dependee"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status",
                        "details"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.change_owner.CREATE"
            ]
          }
        ]
      },
      "get": {
        "summary": "Check mass change owner job status",
        "description": "Check the status of a mass change owner job using the job ID",
        "operationId": "checkStatus",
        "parameters": [
          {
            "name": "module",
            "in": "path",
            "description": "The API name of the module",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved mass change owner job status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response containing the job status details",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "description": "Array of job status data",
                      "maxItems": 1,
                      "items": {
                        "type": "object",
                        "description": "Job status details",
                        "additionalProperties": false,
                        "properties": {
                          "Status": {
                            "type": "string",
                            "description": "Current status of the job",
                            "enum": [
                              "COMPLETED"
                            ]
                          },
                          "Failed_Count": {
                            "type": "integer",
                            "description": "Number of records that failed to update",
                            "format": "int32"
                          },
                          "Not_Updated_Count": {
                            "type": "integer",
                            "description": "Number of records that were not updated",
                            "format": "int32"
                          },
                          "Updated_Count": {
                            "type": "integer",
                            "description": "Number of records successfully updated",
                            "format": "int32"
                          },
                          "Total_Count": {
                            "type": "integer",
                            "description": "Total number of records processed",
                            "format": "int32"
                          }
                        },
                        "required": [
                          "Status",
                          "Failed_Count",
                          "Not_Updated_Count",
                          "Updated_Count",
                          "Total_Count"
                        ]
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "204": {
            "description": "Job details not found"
          },
          "400": {
            "description": "Bad Request - Invalid input parameters or data",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "

# --- truncated at 32 KB (35 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zoho-crm/refs/heads/main/openapi/zoho-crm-mass-change-owner-openapi.json