Zoho CRM Map Dependency

The 'map_dependency' API allows users to manage dependencies between picklist fields in a module layout. It supports operations to retrieve, create, update, and delete field dependencies. These dependencies are used to define relationships between parent and child fields, ensuring that the values in the child field are dynamically filtered based on the selected value in the parent field.

OpenAPI Specification

zoho-crm-map-dependency-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Map Dependency",
    "description": "The 'map_dependency' API allows users to manage dependencies between picklist fields in a module layout. It supports operations to retrieve, create, update, and delete field dependencies. These dependencies are used to define relationships between parent and child fields, ensuring that the values in the child field are dynamically filtered based on the selected value in the parent field.",
    "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"
        }
      }
    }
  ],
  "paths": {
    "/settings/layouts/{layoutId}/map_dependency": {
      "get": {
        "summary": "Retrieve field dependencies for a layout",
        "operationId": "getMapDependency",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.map_dependency.read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LayoutId"
          },
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Filters"
          }
        ],
        "description": "Retrieves the list of field dependencies for a specific layout in a module. The response includes parent and child field relationships and its additional metadata.",
        "responses": {
          "200": {
            "description": "Successful response containing the list of field dependencies for the specified layout.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response containing field dependencies and pagination information.",
                  "additionalProperties": false,
                  "properties": {
                    "map_dependency": {
                      "type": "array",
                      "description": "An array of field dependencies.",
                      "maxItems": 200,
                      "items": {
                        "type": "object",
                        "description": "Field dependency object containing parent and child field relationships.",
                        "additionalProperties": false,
                        "properties": {
                          "parent": {
                            "$ref": "#/components/schemas/FieldReference",
                            "description": "Details of the parent field."
                          },
                          "child": {
                            "$ref": "#/components/schemas/FieldReference",
                            "description": "Details of the child field."
                          },
                          "sub_module": {
                            "oneOf": [
                              {
                                "type": "null",
                                "description": "Null when there is no sub-module association."
                              },
                              {
                                "type": "object",
                                "description": "Details for sub form if incase of sub form field dependency.",
                                "additionalProperties": false,
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "The unique identifier of subform module",
                                    "format": "int64"
                                  },
                                  "api_name": {
                                    "type": "string",
                                    "description": "The API name of subform module",
                                    "maxLength": 50
                                  }
                                },
                                "required": [
                                  "id",
                                  "api_name"
                                ]
                              }
                            ]
                          },
                          "internal": {
                            "type": "boolean",
                            "description": "Indicates whether the dependency is system defined or created by user.",
                            "enum": [
                              true,
                              false
                            ]
                          },
                          "active": {
                            "type": "boolean",
                            "description": "Indicates whether the dependency is active in layout or not.",
                            "enum": [
                              true,
                              false
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "The unique identifier of the dependency.",
                            "format": "int64"
                          },
                          "source": {
                            "type": "integer",
                            "format": "int32",
                            "description": "Source through which dependency is created. `1` represents the source as CRM.",
                            "enum": [
                              1
                            ]
                          },
                          "category": {
                            "type": "integer",
                            "format": "int32",
                            "description": "The category of the dependency. `0` represents the default category.",
                            "enum": [
                              0,
                              1
                            ]
                          }
                        },
                        "required": [
                          "parent",
                          "child",
                          "sub_module",
                          "internal",
                          "active",
                          "id",
                          "source",
                          "category"
                        ]
                      }
                    },
                    "info": {
                      "type": "object",
                      "description": "Pagination details for the response.",
                      "additionalProperties": false,
                      "properties": {
                        "page": {
                          "type": "integer",
                          "format": "int32",
                          "description": "The current page number."
                        },
                        "per_page": {
                          "type": "integer",
                          "format": "int32",
                          "description": "The number of records per page."
                        },
                        "count": {
                          "type": "integer",
                          "format": "int32",
                          "description": "The number of records in the current page."
                        },
                        "more_records": {
                          "type": "boolean",
                          "description": "Indicates whether there are more records to fetch."
                        }
                      },
                      "required": [
                        "page",
                        "per_page",
                        "count",
                        "more_records"
                      ]
                    }
                  },
                  "required": [
                    "map_dependency",
                    "info"
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No content. No field dependencies were found for the specified layout."
          },
          "400": {
            "description": "Bad request. The request contains invalid parameters or data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response for bad requests",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the response",
                      "enum": [
                        "error"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code indicating the type of error",
                      "enum": [
                        "REQUIRED_PARAM_MISSING",
                        "INVALID_MODULE",
                        "NOT_SUPPORTED",
                        "INVALID_DATA",
                        "DEPENDENT_FIELD_MISSING",
                        "MANDATORY_NOT_FOUND"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message",
                      "maxLength": 500
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the error",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Create a new field dependency for a layout",
        "description": "Creates a new field dependency mapping between parent and child fields in a specific layout. The dependency defines how child field values are controlled based on parent field selections.",
        "operationId": "createMapDependency",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.map_dependency.create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/LayoutId"
          },
          {
            "$ref": "#/components/parameters/XZcsrfToken"
          }
        ],
        "requestBody": {
          "description": "Field dependency configuration to create",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body for creating a field dependency",
                "additionalProperties": false,
                "properties": {
                  "map_dependency": {
                    "type": "array",
                    "description": "Array containing the field dependency to create. Only one dependency can be created per request.",
                    "maxItems": 1,
                    "items": {
                      "type": "object",
                      "description": "Field dependency configuration",
                      "additionalProperties": false,
                      "properties": {
                        "parent": {
                          "$ref": "#/components/schemas/FieldReference",
                          "description": "Parent field details"
                        },
                        "child": {
                          "$ref": "#/components/schemas/FieldReference",
                          "description": "Child field details"
                        },
                        "pick_list_values": {
                          "type": "array",
                          "description": "Mapping between parent picklist values and child picklist values",
                          "maxItems": 2000,
                          "items": {
                            "$ref": "#/components/schemas/PicklistMappingCreate"
                          }
                        },
                        "internal": {
                          "type": "boolean",
                          "description": "Indicates whether the dependency is system defined or created by user"
                        },
                        "active": {
                          "type": "boolean",
                          "description": "Indicates whether the dependency is active in the layout"
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique identifier of the dependency (for updates)",
                          "format": "int64"
                        },
                        "source": {
                          "type": "integer",
                          "format": "int32",
                          "description": "Source through which dependency is created. 1 represents CRM.",
                          "enum": [
                            1
                          ]
                        },
                        "category": {
                          "type": "integer",
                          "format": "int32",
                          "description": "The category of the dependency",
                          "enum": [
                            0,
                            1
                          ]
                        }
                      },
                      "required": [
                        "parent",
                        "child",
                        "pick_list_values"
                      ]
                    }
                  }
                },
                "required": [
                  "map_dependency"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created. The field dependency was successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Success response for creating a field dependency",
                  "additionalProperties": false,
                  "properties": {
                    "map_dependency": {
                      "type": "array",
                      "description": "Array containing the creation result",
                      "maxItems": 1,
                      "items": {
                        "$ref": "#/components/schemas/SuccessResponse"
                      }
                    }
                  },
                  "required": [
                    "map_dependency"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request. The request contains invalid parameters, data, or violates dependency rules.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Root-level error response",
                      "additionalProperties": false,
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "Status of the response",
                          "enum": [
                            "error"
                          ]
                        },
                        "code": {
                          "type": "string",
                          "description": "Error code",
                          "enum": [
                            "REQUIRED_PARAM_MISSING",
                            "INVALID_MODULE",
                            "NOT_SUPPORTED",
                            "INVALID_DATA",
                            "NOT_ALLOWED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message",
                          "maxLength": 500
                        },
                        "details": {
                          "type": "object",
                          "description": "Error details",
                          "additionalProperties": true
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Field-level error response wrapped in map_dependency array",
                      "additionalProperties": false,
                      "properties": {
                        "map_dependency": {
                          "type": "array",
                          "description": "Array containing field-level errors",
                          "maxItems": 1,
                          "items": {
                            "type": "object",
                            "description": "Field-level error details",
                            "additionalProperties": false,
                            "properties": {
                              "status": {
                                "type": "string",
                                "description": "Status of the response",
                                "enum": [
                                  "error"
                                ]
                              },
                              "code": {
                                "type": "string",
                                "description": "Error code",
                                "enum": [
                                  "MANDATORY_NOT_FOUND",
                                  "INVALID_DATA",
                                  "MAPPING_ALREADY_EXISTS",
                                  "NOT_ALLOWED",
                                  "AMBIGUITY_DURING_PROCESSING"
                                ]
                              },
                              "message": {
                                "type": "string",
                                "description": "Error message",
                                "maxLength": 500
                              },
                              "details": {
                                "type": "object",
                                "description": "Error details with field-specific information",
                                "additionalProperties": true
                              }
                            },
                            "required": [
                              "status",
                              "code",
                              "message",
                              "details"
                            ]
                          }
                        }
                      },
                      "required": [
                        "map_dependency"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/settings/layouts/{layoutId}/map_dependency/{dependencyId}": {
      "get": {
        "summary": "Retrieve a specific field dependency by ID",
        "description": "Retrieves detailed information about a specific field dependency including parent and child field relationships with picklist value mappings.",
        "operationId": "getMapDependencyById",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.map_dependency.read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/LayoutId"
          },
          {
            "$ref": "#/components/parameters/DependencyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response containing the field dependency details with complete picklist mappings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response containing a specific field dependency with detailed picklist mappings",
                  "additionalProperties": false,
                  "properties": {
                    "map_dependency": {
                      "type": "array",
                      "description": "An array containing the field dependency (single item)",
                      "maxItems": 1,
                      "items": {
                        "type": "object",
                        "description": "Field dependency object with complete picklist value mappings",
                        "additionalProperties": false,
                        "properties": {
                          "parent": {
                            "$ref": "#/components/schemas/FieldReference",
                            "description": "Parent field details"
                          },
                          "child": {
                            "$ref": "#/components/schemas/FieldReference",
                            "description": "Details of the child field"
                          },
                          "pick_list_values": {
                            "type": "array",
                            "description": "Complete mapping between parent and child picklist values",
                            "maxItems": 2000,
                            "items": {
                              "$ref": "#/components/schemas/PicklistMappingRead"
                            }
                          },
                          "internal": {
                            "type": "boolean",
                            "description": "Indicates whether the dependency is system defined or created by user",
                            "enum": [
                              true,
                              false
                            ]
                          },
                          "active": {
                            "type": "boolean",
                            "description": "Indicates whether the dependency is active in layout or not",
                            "enum": [
                              true,
                              false
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "The unique identifier of the dependency",
                            "format": "int64"
                          },
                          "source": {
                            "type": "integer",
                            "format": "int32",
                            "description": "Source through which dependency is created. 1 represents CRM",
                            "enum": [
                              1
                            ]
                          },
                          "category": {
                            "type": "integer",
                            "format": "int32",
                            "description": "The category of the dependency",
                            "enum": [
                              0,
                              1
                            ]
                          }
                        },
                        "required": [
                          "parent",
                          "child",
                          "pick_list_values",
                          "internal",
                          "active",
                          "id",
                          "source",
                          "category"
                        ]
                      }
                    }
                  },
                  "required": [
                    "map_dependency"
                  ]
                }
              }
            }
          },
          "204": {
            "description": "No content. The specified dependency was not found."
          },
          "400": {
            "description": "Bad request. The request contains invalid parameters or data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Error response for bad requests",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the response",
                      "enum": [
                        "error"
                      ]
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code indicating the type of error",
                      "enum": [
                        "REQUIRED_PARAM_MISSING",
                        "INVALID_MODULE",
                        "NOT_SUPPORTED"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message",
                      "maxLength": 500
                    },
                    "details": {
                      "type": "object",
                      "description": "Additional details about the error",
                      "additionalProperties": true
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "message",
                    "details"
                  ]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "summary": "Update an existing field dependency",
        "description": "Updates the picklist value mappings for an existing field dependency. Use \"_delete\": null to remove specific mappings.",
        "operationId": "updateMapDependency",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.map_dependency.update"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Module"
          },
          {
            "$ref": "#/components/parameters/LayoutId"
          },
          {
            "$ref": "#/components/parameters/DependencyId"
          }
        ],
        "requestBody": {
          "description": "Updated field dependency configuration",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request body for updating a field dependency",
                "additionalProperties": false,
                "properties": {
                  "map_dependency": {
                    "type": "array",
                    "description": "Array containing the field dependency to update. Only one dependency can be updated per request.",
                    "maxItems": 1,
                    "items": {
                      "type": "object",
                      "description": "Field dependency configuration with updated mappings",
                      "additionalProperties": false,
                      "properties": {
                        "parent": {
                          "$ref": "#/components/schemas/FieldReference",
                          "description": "Parent field details"
                        },
                        "child": {
                          "$ref": "#/components/schemas/FieldReference",
                          "description": "Child field details"
                        },
                        "pick_list_values": {
                          "type": "array",
                          "description": "Updated mapping between parent picklist values and child picklist values",
                          "maxItems": 2000,
                          "items": {
                            "$ref": "#/components/schemas/PicklistMappingUpdate"
                          }
                        },
                        "internal": {
                          "type": "boolean",
                          "description": "Indicates whether the dependency is system defined or created by user"
                        },
                        "active": {
                          "type": "boolean",
                          "description": "Indicates whether the dependency is active in the layout"
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique identifier of the dependency",
                          "format": "int64"
                        },
                        "source": {
                          "type": "integer",
                          "format": "int32",
                          "description": "Source through which dependency is created. 1 represents CRM.",
                          "enum": [
                            1
                          ]
                        },
                        "category": {
                          "type": "integer",
                          "format": "int32",
                          "description": "The category of the dependency",
                          "enum": [
                            0,
                            1
                          ]
                        }
                      },
                      "required": [
                        "parent",
                        "child",
                        "pick_list_values"
                      ]
                    }
                  }
                },
                "required": [
                  "map_dependency"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success. The field dependency was successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Success response for updating a field dependency",
                  "additionalProperties": false,
                  "properties": {
                    "map_dependency": {
                      "type": "array",
                      "description": "Array containing the update result",
                      "maxItems": 1,
                      "items": {
                        "$ref": "#/components/schemas/SuccessResponse"
                      }
                    }
                  },
                  "r

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