Responses & Exceptions - Python SDK

Responses & Exceptions - Python SDK

APIResponseBulkAPIResponse and FileAPIResponse are the wrapper objects for Zoho CRM APIs’ responses. All API calling methods would return one of these three objects.
  • A method-seeking entity would return APIResponse object, whereas a method-seeking list of entities would return BulkAPIResponse object.
  • Use the instance variable "data" to get the entity data alone from the response wrapper objects. APIResponse.data would return a single Zoho CRM entity object, while BulkAPIResponse.data would return a list of Zoho CRM entity objects.
  • FileAPIResponse will be returned for file download APIs to download a photo or an attachment from a record or note such as record.download_photo()record.download_attachment(attachment_id) etc.
Other than data, these response wrapper objects have the following properties.

response_headers - remaining API counts for the present day/window and time elapsed for the present window reset.

info - any other information, if provided by the API, in addition to the actual data.

bulk_entity_response (list of EntityResponse instances) - status of individual entities in a bulk API. For example: an insert records API may partially fail because of a few records. This dictionary gives the individual records’ creation status.

Start the App

The SDK requires the following line of code being invoked every time your app gets started.
  1. ZCRMRestClient.initialize()
This method should be called from the main class of your python application to start the application. It needs to be invoked without any exception.

Check Exceptions

All unexpected behaviors like faulty API responses, SDK anomalies are handled by the SDK and are thrown only as a single exception — ZCRMException. Hence, it's enough to catch this exception alone in the client app code.


Release Notes
    • Related Articles

    • Installation - Python SDK

      The SDK can be installed for your client application through Pip. Pip is a tool for dependency management in Python. Installing Pip Please refer the document below to install pip https://pip.pypa.io/en/stable/installing/ Installing the SDK Run the ...
    • Python SDK - An Overview

      Python SDK offers a way to create client python applications that can be integrated with Zoho CRM. This SDK makes the access and use of necessary CRM APIs with ease. In other words, it serves as a wrapper for the REST APIs, making it easier to use ...
    • Configuration - Python SDK

      Before you get started with creating your python application, you need to first authenticate the app with Zoho. And to do that there are some configuration procedures that need to be in place. There are two methods in which you can authenticate your ...
    • Release Notes - Python SDK

      ZCRMSDK -VERSION 1.0.8 Install command pip install zcrmsdk==1.0.8 Notes Enhancement: Duplicate check fields can be ignored if not necessary in upsert record method . ZCRMSDK -VERSION 1.0.7 Install command pip install zcrmsdk==1.0.7 Notes Enhancement: ...
    • Errors and Solutions - Python SDK

      In case you receive an error message when you access the Python SDK, use the links below to understand and figure out how to fix them. No OAuth and Configuration Properties Invalid Code KeyError: 'Email' Exception while fetching oauthtoken from DB ...