Kaizen 173: A Comparison of Zoho CRM REST APIs and GraphQL APIs.

Kaizen 173: A Comparison of Zoho CRM REST APIs and GraphQL APIs.


Hello everyone!
Welcome back to another week of Kaizen!

Zoho CRM offers two API architectures for its users: REST API and GraphQL API. Each of these API architectures has its own strengths and ideal use cases. In this post, we will discuss the difference between REST API and GraphQL API.

REST APIs, or RESTful APIs, allow clients to interact with server resources using standard HTTP methods such as GET, POST, PUT, PATCH, and DELETE. GraphQL is a query language that provides a more flexible and efficient way to access data and metadata within your Zoho CRM. Unlike REST APIs that return fixed datasets, GraphQL allows you to request specific resources, fields of the resources and relationships of the resources, reducing redundant data and streamlining your development process.

Endpoints

REST APIs access information through dedicated endpoints. 

REST APIs: Multiple endpoints for different resources

In contrast, GraphQL APIs operate through a single endpoint. In Zoho CRM, it is {api-domain}/crm/graphql

GraphQL APIs: Single endpoint for different resources

Over-fetching and under-fetching of data

REST APIs use Unique Resource Identifiers (URIs) for identifying resources. This approach allows clients to access specific data, but it can also lead to inefficiencies such as over-fetching or under-fetching of information. Over-fetching occurs when the client receives much more data than it requires. Under-fetching occurs when the client requires to send multiple requests to fetch all the data it requires.
In GraphQL APIs, the client controls the structure of the response by specifying the exact information they need.  This enables the clients to have precise data control and avoids over-fetching and under-fetching of data. It fetches required data from different resources and provides it as a single resource.

Schema Introspection

GraphQL APIs have a schema that outlines the different types of data that can be queried in the server. This is like a blueprint for the API and serves as a contract between the server and client for data exchange. Refer to this post on Interpreting Zoho CRM GraphQL schema for more details.

Editions supported

REST APIs are available across all versions of Zoho CRM, including trial versions. GraphQL APIs are supported for Enterprise, Zoho One Enterprise, CRM Plus and Ultimate edition orgs. Please note that GraphQL APIs are not available for trial edition of these editions.

Status Codes

Zoho CRM GraphQL APIs mostly return 200 status code except for a few errors that return 400 status code. Refer to this page on GraphQL error and status code for details.
Zoho CRM REST APIs return different status codes. Refer to this page on REST API status code for more details.

Credits Consumption

   API rate limiting is crucial to ensure fair resource distribution, maintain optimal service quality for all users, and safeguard our system from potential security threats.
Both Zoho CRM REST APIs and Zoho CRM GraphQL API calls are associated with credits. Number of credits consumed depends on the intensity of the API call. 
Additionally, Zoho CRM REST APIs have Concurrency and Sub-concurrency limits. Concurrency limits the number of API calls that can be active at one time instance. It varies across different editions of Zoho CRM. For a few APIs that are more resource-intensive, there is an additional limit called sub-concurrency, The APIs that will fall under the sub-concurrency limit are
  • Get Records with cvid or sort_by parameters
  • Convert Lead
  • Insert, Update, or Upsert records (when the record count is greater than 10)
  • Send Mail
  • Search records API invoked from function
  • Query API
  • Composite API
Sub-concurrency limit across different editions is 10. 
 In GraphQL APIs, we have different concepts called Complexity, and Depth. Query Complexity refers to the workload imposed on servers by a specific query. This complexity increases with the number of fields requested and the depth of the query structure. Query Depth refers to the nesting level of a field that is being queried. In Zoho CRM GraphQL APIs it is limited to seven.

Suitable scenarios for GraphQL APIs and REST APIs

Let’s explore a scenario - the case of Zylker Manufacturing, an industrial equipment manufacturer. Their sales team uses Zoho CRM to enhance their sales operations and manage customer relationships effectively. Meanwhile, their sales support team relies on a legacy system to oversee their activities. 
The support team needs to retrieve comprehensive information about one account and its associated contacts to track all support tickets related to that account. They also need associated deals of the account for contextual information.
With GraphQL APIs they can use a single API call to fetch all required information to create a unified view. The below query fetches specific data related to Accounts and their Contacts and Deals, as well as metadata about the fields in the Accounts , Contacts and Deals modules.

{
    Records {
        Accounts(where: { Account_Name: { like: "%King%" } }) {
            _data {
                Account_Name {
                    value
                }
                Contacts__r {
                    _data {
                        Email {
                            value
                        }
                        Full_Name {
                            value
                        }
                    }
                }
                Deals__r {
                    _data {
                        Expected_Revenue {
                            value
                        }
                        Deal_Name {
                            value
                        }
                        Stage {
                            value
                        }
                    }
                }
            }
        }
    }
    account_meta: Meta {
        Modules(filter: { api_name: "Accounts" }) {
            _data {
                plural_label
                id
                api_name
                module_name
                description
                singular_label
                fields(filter: { api_names: "Account_Name" }) {
                    _data {
                        id
                        api_name
                        display_label
                        json_type
                        data_type
                    }
                }
            }
        }
    }
    contact_meta: Meta {
        Modules(filter: { api_name: "Contacts" }) {
            _data {
                plural_label
                id
                api_name
                module_name
                description
                singular_label
                fields(filter: { api_names: ["Email", "Full_Name"] }) {
                    _data {
                        id
                        api_name
                        display_label
                        json_type
                        data_type
                    }
                }
            }
        }
    }
    deals_meta: Meta {
        Modules(filter: { api_name: "Deals" }) {
            _data {
                plural_label
                id
                api_name
                module_name
                description
                singular_label
                fields(filter: { api_names: ["Expected_Revenue", "Deal_Name", "Stage"] }) {
                    _data {
                        id
                        api_name
                        display_label
                        json_type
                        data_type
                    }
                }
            }
        }
    }
}


Using REST APIs in this scenario will require multiple API calls to the following APIs
  • Query API
  • Related Records API
  • Modules meta API, and 
  • Fields meta API.
We had explored another scenario involving Zylker Manufacturing in detail in an earlier Kaizen post where their sales support team needed the below details from Zoho CRM
  • details of the contact, such as email, phone, and Account details
  • details of the ongoing deals of the contact, including potential revenue and stages. 

GraphQL APIs are beneficial in these cases as they can fetch the required data in a single data query.  

Conversely, in simpler use cases, REST APIs may be more suitable. Let’s examine a second scenario involving an inventory management system. Zenith Products needs to manage its product catalog. The inventory management system requires the ability to:
  • Fetch Details of a Single Product
  • Fetch Details of Multiple Products
  • Update Product Information
 Each product can be accessed via a unique URL (endpoint), allowing for straightforward requests. For example:
  • To fetch a single product: GET /crm/{version}/products/{product_id}
  • To fetch multiple products: GET /crm/{version}/products
  • To update a product: PUT /crm/{version}/products/{product_id}
In such cases, REST APIs are preferred due to their simplicity.

Note
Currently, Zoho CRM GraphQL APIs only support queries. Queries allow you to fetch data from the server.

You can choose to use Zoho CRM REST APIs or GraphQL APIs depending on the specific need of your application. REST APIs are suitable for straightforward data retrieval needs whereas GraphQL is useful in situations involving complex queries and need precise data control.
We hope you found this post useful. Stay tuned for more insights in our upcoming Kaizen posts!

Info
More enhancements in the COQL API are now live in Zoho CRM API Version 7. Check out the V7 Changelog for detailed information on these updates.

Cheers!
Mable

      • Recent Topics

      • Custom function inside a CUSTOM BUTTON - BOOKS CUSTOM MODULE

        I am trying to upload the attachment in a custom module(Books) to a work drive. One module is working, but another module(New) is not giving me the desired result as it is also giving an error. Of course, I changed the module name etc. Attaching the script
      • Function to update field in CRM Meetings from Bookings Appointment Status

        Hello, We're creating some reporting in Zoho Analytics using data from CRM and Bookings. Unfortunately it looks like when Bookings Appointments are carried over to CRM Meetings, the Bookings Appointment Status is not recorded in CRM Meetings. We would
      • Nested Sub-forms (Subform within subform)

        Hi Team, Whether there is any possibilities to add sub-form with in another sub-form like Main Form       -> Sub form A             ->Sub form B If we tried this, only one level of sub form only working.  Any one having any idea about this? Thanks Selvamuthukumar R
      • Introducing Bot Filtering for Accurate Email Campaign Analytics

        Update : This feature has been revamped. For the most current information and improved functionalities, please visit the updated version here. Dear Marketers, We're excited to announce a new feature designed to enhance the accuracy of your email campaign
      • Zoho Meeting very bad video quality

        Hello, I need 1080p HD on my Zoho Meeting as explained here: Low Resolution/Quality Video (zoho.com) Currently, video quality is lagging with 400mb internet which is not acceptable for my business. My 1080p 60FPS webcam performs well on platforms like
      • How to Initiate WhatsApp Message on SalesIQ?

        I've just activated a Business WhatsApp phone number through SalesIQ because of its touted omnichannel chat approach. Sounds exciting. I understand that when a customer sends me a WA message, I can reply to it on SalesIQ and keep the chat going, perfect.
      • Multi Day booking for resources

        I have following business-case: Rental for Tablets. Customer should be able to select how many device for how many days he'd like to rent. Same as a car rental for multiple days. Is this possible with Bookings on the current version?
      • How can I make time entry mandatory for tickets?

        Hi guys,  I just want to make a time entry field mandatory for tickets. How can I do that? At this stage of our usage, it's not mandatory and it could be forgotten to input a time for a ticket.  Thanks in advance 
      • Set Mandatory Lookup Fields in Ticket Layout

        I added a custom module called 'Site' in the desk. I also added a lookup field 'Site' in the ticket layout. Now, I want the 'Site' field to be mandatory in the blueprint transition. How can I do that?
      • When converting a lead to an account, the custom mandatory fields in the account are not treated by zoho as mandatory

        In my Account module I have a number of custom fields that I have set as mandatory. When I enter a new customer as a new account they work, I can't save the record without populating them. However when I convert a lead, my CRM users are able to save the
      • Zoho Workplace gets yet another security boost: The addition of Zoho Vault

        Hello Community, Passwords are often the first line of defense, yet they're also one of the most common weak points. We're thrilled to announce that Zoho Vault is now integrated with Zoho Workplace! Zoho Vault Standard is now included at no extra cost
      • Announcing new features in Trident for Windows (v.1.20.4.0)

        Hello Community, Trident for Windows is here with some new features to elevate your work experience. Let's take a quick look at what's new. Export emails. You can now export emails in the .eml file format as compressed zipped files to create a secure
      • Best Carding Forum 2025 | Trusted Hacking Forum | Verified Carder Forum | Carder Forums 2025

        Best Carding Forum 2024 | Trusted Hacking Forum | Verified Carder Forum Welcome to Legitcarding.net , the #1 Trusted Carder Forum of 2024! Whether you're a seasoned carder or just starting out, our platform offers everything you need to succeed in the
      • Automatic Email Alerts for Errors in Zoho Creator Logs

        Hello, We would like to request a feature enhancement in Zoho Creator regarding error notifications. Currently, Zoho Creator allows users to view logs and errors for each application by navigating to Zoho Creator > Operations > Logs. However, there is
      • CASE Module - email function

        HI there, I dont know if this has been asked or answered before as i couldnt find it on the forums. Issue: when a new case is raised, it goes under case tab and everything is captured. Then how do i send emails to the client who raised case with the details
      • Quickbooks Online Customer Creation Code

        Hi! I'm looking for code that will automatically create a quickbooks customer account when clicking on a button located directly within Zoho CRM - Contacts Module. Here's what I have and I can't seem to figure it out. xxxxx is our company id which we
      • Zoho CRM Kiosk Upload Files

        Hello all, We are trying out Kiosks at the moment to see where it can fit best in our business. We are still a bit off in the application but lets say we will sort this out. My question is the following - when I create a Kiosk I can add "File Upload"
      • E-mails to suppliers

        Hi, i want to upload a spread sheet every day and send an e-mail to our suppliers every day (or when triggering a button?) with info from the spreadsheet lines. The supplier e-mail would be on each line. Unfortunately, when creating a scheduled automation,
      • Customers would like to add tips when paying in Client Portal

        I am happy with the clean interface of the Client Portal. However, I am running into a challenge: my customers would like to be able to add tips/gratuities when making payments. Currently, this is very clunky because they have to 1) manually over-pay,
      • Multi-currency in Zoho CRM Forecast and Reports

        As a company we have branches in 4 different countries with as many different currencies. Our Sales Teams would like to work with their local currency as much as possible. The Forecast module using only 1 currency is practically usable only by the sales
      • Change to copy/paste functionality in Deluge code editor

        Recently there was a change to the Deluge code etidor where it now inserts backslashes into strings automatically when copying/pasting strings with double quotes, it's a nightmare to have to go delete all these. Is it possible to toggle this on or off?
      • CRM portal users can now log in using their mobile phone numbers

        Hello everyone! You can now invite portal users using their mobile phone numbers. These portal users will be able to log in using their mobile number and OTP. Templates for these portal-related SMS can be customized as per your needs. This enhancement
      • Clear a date field?

        I've got a date field, let's call it Returned_date.  I'd like to write a script that clears the values from another date field called Expected_date upon a successful entry.  I know where to put the expression, but I'm having trouble building the expression.  Any assistance from anyone for a newb question would be appreciated.  Thanks in advance!
      • Integrating ChatGPT with Zoho Creator for Automated Report Generation: Is It Possible?

        Hi everyone, I’m currently working on an application in Zoho Creator and would like to know if it’s possible to integrate ChatGPT to automate the generation of reports based on the data captured within the application. Has anyone successfully implemented
      • There anyway to change a creator app Back to DEV thats not got a back up?

        As above, is it possible? Thanks.
      • Feature Request: Search in the PC client. Some thoughts about the search.

        Hi all. I'm really excited to start using Zoho Notebook, but I'm missing some of the search capabilities on my desktop. There are also some thoughts on improving search in general. Search is very important to me, without it it is difficult for me to use
      • Issue Saving Workflow Rule – "Unable to Process Your Request" Error

        Dear Zoho Recruit Support Team, I am experiencing an issue while trying to integrate a new rule into a workflow. Specifically, I am setting up a Follow-Up workflow for applicants, where a user is assigned based on specific requirements. However, when
      • Transaction Rules & Customer Payments

        So I have a situation as follows. We have many clients who are all invoiced on the 1st of each month on a recurring invoice for 1 of 10 plans. This means that almost all payment dates are the same (some people pay late) and that a lot of the amounts are
      • Scheduled function not firing workdrive.uploadFile task

        I have a creator app that takes submissions from a published form. I setup a daily scheduled function to send a record template of the form, as well as 3 different uploaded files to workdrive folders. (Initially I intended for this to happen on the submission
      • Cross-Posting to a Telegram Channel

        We don't have a native way to cross-post to Telegram channels. Did anyone find a way around it? I checked Zoho Flow - but Telegram isn't there. Maybe some 3rd party integrations connecting Facebook, IG, etc., bypassing SalesIQ altogether?
      • Marking a Desk ticket as Unread after merge

        We have a custom script that runs against every new ticket and auto-merges it with any existing ticket that matches our criteria. That works fine but there is no functionality that reverts the newly-updated ticket back to an "unread" state. I found the
      • How to connect the Squarespace website with Zoho Thrive

        Our website is created using Squarespace. To boost our sales, I planned to do the affiliate program and I thought to integrate our website store with Thrive. but I don't see the Squarespace platform. if I choose the custom build, I have to generate the
      • Error when trying to categorize bank transactions

        I am trying to categorize my bank transactions. It was going fine, I categorized 50 or so transaction and suddenly I started getting an error that reads: "Transactions cannot be matched as the account you are trying to match it to, is different.". I select
      • Calendar item appears twice for Group Calendar Owner when a group member accepts the invitation

        How to change this behavior? Please see screen recording here: https://workdrive.zohoexternal.com/external/eace5023938b52118ab0246dc28f208de6a091f0f77c023b0beb3862d572c694
      • Possibility of Recording CookieConsent in a Hidden Field in Zoho Forms

        Dear Zoho Forms Team, We are using Zoho Forms on our website and have encountered a technical question related to GDPR compliance. Currently, we have Google Tag Manager installed, along with a script that tracks UTM parameters and GCLID. To comply with
      • Snapshot of totals

        Hi, I'm more familiar with Creator so it's taking me a while to wrap my headaround the CRM. I've been asked to produce a metric that takes a snapshot total of ceratin fields everyday when they meet certain conditions : Total Average Value for example.
      • Bulk change color of selected notes

        When I select several notes, I want to change their color, but there is no such function. I miss it.
      • Notebook does not remember the window size and position

        Hello am using MS store version 3.3.0 It's not a big issue just a bit of annoying. App starts all the time on max size, after resizing, closing and reopening back to same state as the beginning. any way to fix it please?
      • Customize the Date Format based on preference

        Hello Everyone, We have rolled-out a new field called Date Pattern in the user layout under Locale information. Note: If you notice any change in the date format after this roll-out, please select your preferred format from the settings. Previously, the format of the date was automatically set on the basis of the country locale selected by the user. Now, the user will be able to edit the format in which the date is displayed according to their preference.  The Date pattern field has around 40 patterns
      • Simple Deluge Script

        Hi. I'm brand new to functions but I'm trying to create a script to convert a date field in Meetings to a written format. For example, instead of 02/05/2025 8:00AM, I'd like to convert it to Wednesday, February 5, 8:00 AM. My Date field is the API Name
      • Next Page