Sample Codes
All of Zoho CRM's APIs can be used through the Python SDK, to enable your custom application to perform data sync to the best degree. Here are the sample codes for all the API methods available in our SDK.
Attachment Operations
Constructor | Description |
---|---|
AttachmentsOperations(module_api_name, record_id) | Creates an AttachmentsOperations class instance with the moduleAPIName and recordId. |
Method | Description |
---|---|
get_attachments | To fetch the list of attachments of a record. |
upload_attachments | To upload attachments to a record. |
delete_attachments | To delete the attachments that were added to a record. |
delete_attachment | To delete an attachment that was added to a record. |
download_attachment | To download an attachment that was uploaded to a record. |
uploadLink_attachments | To upload a link as an attachment to a record. |
Blueprint Operations
Constructor | Description |
---|---|
BluePrintOperations(record_id, module_api_name) | Creates a BluePrintOperations class instance with the recordId and moduleAPIName. |
Method | Description |
---|---|
get_blueprint | To get the next available transitions for that record, fields available for each transition, current value of each field, and validation(if any). |
update_blueprint | To update a single transition at a time. |
Bulk Read Operations
Method | Description |
---|---|
create_bulk_read_job | To schedule a bulk read job to export records that match the criteria. |
get_bulk_read_job_details | To know the status of the bulk read job scheduled previously. |
download_result | To download the result of the bulk read job. The response contains a zip file. Extract it to get the CSV or ICS file depending on the "file_type" you specified while creating the bulk read job |
Bulk Write Operations
Method | Description |
---|---|
upload_file | To upload a CSV file in ZIP format. The response contains the "file_id". Use this ID while making the bulk write request. |
create_bulk_write_job | To create a bulk write job to insert, update, or upsert records. The response contains the "job_id". Use this ID while getting the status of the scheduled bulk write job. |
get_bulk_write_job_details | To know the status of the bulk write job scheduled previously. |
download_result | To download the result of the bulk write job. The response contains a zip file. Extract it to get the CSV or ICS file depending on the "file_type" you specified while creating the write read job |
Contact Roles Operations
Method | Description |
---|---|
get_contact_roles | To get the list of all contact roles. |
create_contact_roles | To create contact roles. |
update_contact_roles | To update contact roles. |
delete_contact_roles | To delete contact roles. |
get_contact_role | To get specific contact role. |
update_contact_role | To update specific contact role. |
delete_contact_role | To delete specific contact role. |
get_all_contact_roles_of_deal | To get all contact roles of a deal. |
get_contact_role_of_deal | To get specific contact role of a deal. |
add_contact_role_to_deal | To add contact role to deal. |
remove_contact_role_from_deal | To remove contact role from deal. |
Currencies Operations
Method | Description |
---|---|
get_currencies | To get the list of all currencies available for your org. |
add_currencies | To add new currencies to your org. |
update_currencies | To update the currencies' details of your org. |
enable_multiple_currencies | To enable multiple currencies for your org. |
update_base_currency | To update the base currency details of your org. |
get_currency | To get the details of specific currency. |
update_currency | To update the details of specific currency. |
Custom View Operations
Constructor | Description |
---|---|
CustomViewsOperations(module) | Creates a CustomViewsOperations class instance with the moduleAPIName. |
Method | Description |
---|---|
get_custom_views | To get the list of all custom views in a module. |
get_custom_view | To get the details of specific custom view in a module. |
Fields Metadata Operations
Constructor | Description |
---|---|
FieldsOperations(module) | Creates a FieldsOperations class instance with the module. |
Method | Description |
---|---|
get_fields | To get the meta details of all fields in a module. |
get_field | To get the meta details of specific field in a module. |
Files Operations
Method | Description |
---|---|
upload_files | To upload files and get their encrypted IDs. |
get_file | To get the uploaded file through its encrypted ID. |
Layouts Operations
Constructor | Description |
---|---|
LayoutsOperations(module) | Creates a LayoutsOperations class instance with the moduleAPIName. |
Method | Description |
---|---|
get_layouts | To get the details of all the layouts in a module. |
get_layout | To get the details (metadata) of a specific layout in a module. |
Modules Operations
Method | Description |
---|---|
get_modules | To get the details of all the modules. |
get_module | To get the details (metadata) of a specific module. |
update_module_by_api_name | To update the details of a module by its module API name. |
update_module_by_id | To update the details of a module by its ID. |
Notes Operations
Method | Description |
---|---|
get_notes | To get the list of notes of a record. |
create_notes | To add new notes to a record. |
update_notes | To update the details of the notes of a record. |
delete_notes | To delete the notes of a record. |
get_note | To get the details of a specific note. |
update_note | To update the details of an existing note. |
delete_note | To delete a specific note. |
Notification Operations
Method | Description |
---|---|
enable_notifications | To enable instant notifications of actions performed on a module. |
get_notification_details | To get the details of the notifications enabled by the user. |
update_notifications | To update the details of the notifications enabled by a user. All the provided details would be persisted and rest of the details would be removed. |
update_notification | To update only specific details of a specific notification enabled by the user. All the provided details would be persisted and rest of the details will not be removed. |
disable_notifications | To stop all the instant notifications enabled by the user for a channel. |
disable_notification | To disable notifications for the specified events in a channel. |
Organization Operations
Method | Description |
---|---|
get_organization | To get the details of your organization. |
upload_organization_photo | To upload a photo of your organization. |
Profile Operations
Constructor | Description |
---|---|
ProfilesOperations(if_modified_since) | Creates a ProfilesOperations class instance with the value of the If-Modified-Since header. |
Method | Description |
---|---|
get_profiles | To get the list of profiles available for your organization. |
get_profile | To get the details of a specific profile. |
Query (COQL) Operation
Method | Description |
---|---|
get_records | To get the records from a module through a COQL query. |
Records Operations
Method | Description |
---|---|
get_record | To get a specific record from a module. |
update_record | To update a specific record in a module. |
delete_record | To delete a specific record from a module. |
get_record_using_external_id | To get a record using External ID |
update_record_using_external_id | To update a record using External ID. |
delete_record_using_external_id | To delete a record using External ID |
get_records | To get all records from a module. |
create_records | To insert records in a module. |
update_records | To update records in a module. |
delete_records | To delete records from a module. |
upsert_records | To insert/update records in a module. |
get_deleted_records | To get the deleted records from a module. |
search_records | To search for records in a module that match certain criteria, email, phone number, or a word. |
convert_lead | To convert records(Leads to Contacts/Deals). |
get_photo | To get the photo of a record. |
upload_photo | To upload a photo to a record. |
delete_photo | To delete the photo of a record. |
mass_update_records | To update the same field for multiple records in a module. |
get_mass_update_status | To get the status of the mass update job scheduled previously. |
Related List Operations
Constructor | Description |
---|---|
RelatedListsOperations(module) | Creates a RelatedListsOperations class instance with the moduleAPIName. |
Method | Description |
---|---|
get_related_lists | To get the details of all the related lists of a module. |
get_related_list | To get the details of a specific related list of a module. |
Related Records Operations
Constructor | Description |
---|---|
RelatedRecordsOperations(related_list_api_name, record_id, module_api_name) | Creates a RelatedRecordsOperations class instance with the relatedListAPIName, recordId, and moduleAPIName. |
Method | Description |
---|---|
get_related_records | To get list of records from the related list of a module. |
update_related_records | To update the association/relation between the records. |
delink_records | To delete the association between the records. |
get_related_record | To get the records from a specific related list of a module. |
update_related_record | To update the details of a specific record of a related list in a module. |
delink_record | To delete a specific record from the related list of a module. |
get_related_records_using_external_id | To get all related records using External ID. |
update_related_records_using_external_id | To update related records using External ID. |
delete_related_records_using_external_id | To delete records using External ID |
get_related_record_using_external_id | To get related record using External ID. |
update_related_record_using_external_id | To update related record using External ID. |
delete_related_record_using_external_id | To delete related record using External ID. |
Role Operations
Shared Records Operations
Constructor | Description |
---|---|
ShareRecordsOperations(record_id, module_api_name) | Creates a ShareRecordsOperations class instance with the recordId and moduleAPIName. |
Method | Description |
---|---|
get_shared_record_details | To get the details of a record shared with other users. |
share_record | To share a record with other users in the organization. |
update_share_permissions | To
|
revoke_shared_record | To revoke access to a shared record. |
Tags Operations
Method | Description |
---|---|
get_tags | To get the list of all tags in your organization. |
create_tags | To create tags. |
update_tags | To update multiple tags. |
update_tag | To update a specific tag. |
delete_tag | To delete a specific tag from the module. |
merge_tags | To merge two tags. |
add_tags_to_record | To add tags to a specific record. |
remove_tags_from_record | To remove tags from a record. |
add_tags_to_multiple_records | To add tags to multiple records. |
remove_tags_from_multiple_records | To remove tags from multiple records. |
get_record_count_for_tag | To get the record count for a tag. |
Taxes Operations
Method | Description |
---|---|
get_taxes | To get the taxes of your organization. |
create_taxes | To add taxes to your organization. |
update_taxes | To update the existing taxes of your organization. |
delete_taxes | To delete multiple taxes from your organization. |
get_tax | To get the details of a specific tax. |
delete_tax | To delete a specific tax from your organization. |
Territory Operations
Method | Description |
---|---|
get_territories | To get the list of all territories. |
get_territory | To get the details of a specific territory. |
Users Operations
Method | Description |
---|---|
get_users | To get the list of users in your organization. |
create_user | To add a user to your organization. |
update_users | To update the existing users of your organization. |
get_user | To get the details of a specific user. |
update_user | To update the details of a specific user. |
delete_user | To delete a specific user from your organization. |
Variable Groups Operations
Method | Description |
---|---|
get_variable_groups | To get the list of all variable groups available for your organization. |
get_variable_group_by_id | To get the details of a variable group by its group ID. |
get_variable_group_by_api_name | To get the details of a specific variable group by its API name. |
Variables Operations
Method | Description |
---|---|
get_variables | To get the list of variables available for your organization. |
create_variables | To add new variables to your organization. |
update_variables | To update the details of variables. |
delete_variables | To delete multiple variables. |
get_variable_by_id | To get the details of a specific variable by its unique ID. |
update_variable_by_id | To update the details of a specific variable by its unique ID. |
delete_variable | To delete a specific variable. |
get_variable_for_api_name | To get the details of a variable by its API name. |
update_variable_by_api_name | To update the details of a variable by its API name. |