Zoho CRM Service Preference

Service Preference. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 2 operation(s).

OpenAPI Specification

zoho-crm-service-preference-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Service Preference",
    "description": "Service Preference",
    "version": "8.0"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        },
        "version": {
          "default": "v8",
          "description": "API version"
        }
      }
    }
  ],
  "security": [
    {
      "iam-oauth2-schema": [
        "ZohoCRM.settings.modules.ALL"
      ]
    }
  ],
  "paths": {
    "/settings/service_preferences": {
      "get": {
        "operationId": "getServicePreference",
        "summary": "Retrieve service preference settings for the organization",
        "description": "Fetch service preference configuration for the organization.",
        "responses": {
          "200": {
            "description": "Successfully retrieved the service preference settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response object containing the organization's service preferences.",
                  "properties": {
                    "service_preferences": {
                      "type": "object",
                      "description": "Service preferences configuration for the organization.",
                      "properties": {
                        "job_sheet_enabled": {
                          "type": "boolean",
                          "description": "Indicates whether job sheet information is required for services. When set to true, a job sheet can be generated upon appointment completion."
                        }
                      },
                      "required": [
                        "job_sheet_enabled"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "service_preferences"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.modules.READ"
            ]
          }
        ]
      },
      "put": {
        "operationId": "updateServicePreference",
        "summary": "Update service preference settings for the organization",
        "description": "Update the service preference configuration for the organization.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Request object to update the organization's service preferences.",
                "properties": {
                  "service_preferences": {
                    "type": "object",
                    "description": "Service preferences configuration to be updated.",
                    "properties": {
                      "job_sheet_enabled": {
                        "type": "boolean",
                        "description": "Indicates whether job sheet information is required for services. When set to true, a job sheet can be generated upon appointment completion."
                      }
                    },
                    "required": [
                      "job_sheet_enabled"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "service_preferences"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Service preferences updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response object confirming the update of service preferences.",
                  "properties": {
                    "service_preferences": {
                      "type": "object",
                      "description": "Updated service preferences status.",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "success"
                          ],
                          "description": "Status of the update operation."
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "SUCCESS"
                          ],
                          "description": "Code representing the result of the update operation."
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Services preferences updated successfully"
                          ],
                          "description": "Human-readable message describing the update result."
                        },
                        "details": {
                          "type": "object",
                          "description": "Additional details about the update operation.",
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "service_preferences"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad request — missing or invalid data in service preferences.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Error response for missing mandatory fields.",
                      "properties": {
                        "service_preferences": {
                          "oneOf": [
                            {
                              "type": "object",
                              "description": "Error details for missing mandatory fields in service preferences.",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "error"
                                  ],
                                  "description": "Error status."
                                },
                                "code": {
                                  "type": "string",
                                  "enum": [
                                    "MANDATORY_NOT_FOUND"
                                  ],
                                  "description": "Error code for missing mandatory fields."
                                },
                                "message": {
                                  "type": "string",
                                  "description": "Error message describing the issue.",
                                  "maxLength": 1000
                                },
                                "details": {
                                  "type": "object",
                                  "description": "Details about the missing field.",
                                  "properties": {
                                    "api_name": {
                                      "type": "string",
                                      "description": "API name of the missing field.",
                                      "maxLength": 100
                                    },
                                    "json_path": {
                                      "type": "string",
                                      "description": "JSON path to the missing field.",
                                      "maxLength": 1000
                                    }
                                  },
                                  "required": [
                                    "api_name",
                                    "json_path"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "status",
                                "code",
                                "message",
                                "details"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "description": "Error details for invalid data in service preferences.",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "error"
                                  ],
                                  "description": "Error status."
                                },
                                "code": {
                                  "type": "string",
                                  "enum": [
                                    "INVALID_DATA"
                                  ],
                                  "description": "Error code for invalid data."
                                },
                                "message": {
                                  "type": "string",
                                  "description": "Error message describing the issue.",
                                  "maxLength": 1000
                                },
                                "details": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "description": "Details about the invalid field.",
                                      "properties": {
                                        "api_name": {
                                          "type": "string",
                                          "description": "API name of the invalid field.",
                                          "maxLength": 100
                                        },
                                        "json_path": {
                                          "type": "string",
                                          "description": "JSON path to the invalid field.",
                                          "maxLength": 1000
                                        }
                                      },
                                      "required": [
                                        "api_name",
                                        "json_path"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "description": "Details about the invalid field and expected data type.",
                                      "properties": {
                                        "api_name": {
                                          "type": "string",
                                          "description": "API name of the invalid field.",
                                          "maxLength": 100
                                        },
                                        "json_path": {
                                          "type": "string",
                                          "description": "JSON path to the invalid field.",
                                          "maxLength": 1000
                                        },
                                        "expected_data_type": {
                                          "type": "string",
                                          "description": "Expected data type for the field.",
                                          "enum": [
                                            "boolean"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "api_name",
                                        "json_path",
                                        "expected_data_type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "status",
                                "code",
                                "message",
                                "details"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [],
                      "additionalProperties": true
                    },
                    {
                      "type": "object",
                      "description": "Error response for invalid data.",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "error"
                          ],
                          "description": "Error status."
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_DATA"
                          ],
                          "description": "Error code for invalid data."
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message describing the issue.",
                          "maxLength": 1000
                        },
                        "details": {
                          "oneOf": [
                            {
                              "type": "object",
                              "description": "Details about the invalid field.",
                              "properties": {
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the invalid field.",
                                  "maxLength": 100
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the invalid field.",
                                  "maxLength": 1000
                                }
                              },
                              "required": [
                                "api_name",
                                "json_path"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "description": "Details about the invalid field and expected data type.",
                              "properties": {
                                "api_name": {
                                  "type": "string",
                                  "description": "API name of the invalid field.",
                                  "maxLength": 100
                                },
                                "json_path": {
                                  "type": "string",
                                  "description": "JSON path to the invalid field.",
                                  "maxLength": 1000
                                },
                                "expected_data_type": {
                                  "type": "string",
                                  "description": "Expected data type for the field.",
                                  "enum": [
                                    "boolean"
                                  ]
                                }
                              },
                              "required": [
                                "api_name",
                                "json_path",
                                "expected_data_type"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message",
                        "details"
                      ],
                      "additionalProperties": true
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.settings.modules.UPDATE"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "iam-oauth2-schema": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
            "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
            "refreshUrl": "https://accounts.zoho.com/oauth/v2/token",
            "scopes": {
              "ZohoCRM.settings.modules.ALL": "Perform read, update operation for a service preference in org",
              "ZohoCRM.settings.modules.UPDATE": "Perform update operation for a service preference in org",
              "ZohoCRM.settings.modules.READ": "Perform read operation for a service preference in org"
            }
          }
        }
      }
    }
  }
}