Sample Codes

All of Zoho CRM's APIs can be used through the C# 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

ConstructorDescription
AttachmentsOperations(string moduleAPIName, string recordId)Creates an AttachmentsOperations class instance with the moduleAPIName and recordId.
MethodDescription
GetAttachmentsTo fetch the list of attachments of a record.
UploadAttachmentsTo upload attachments to a record.
DeleteAttachmentsTo delete the attachments that were added to a record.
DeleteAttachmentTo delete an attachment that was added to a record.
DownloadAttachmentTo download an attachment that was uploaded to a record.
UploadLinkAttachmentsTo upload a link as an attachment to a record.

Blueprint Operations

ConstructorDescription
BluePrintOperations(string recordId, string moduleAPIName)Creates a BluePrintOperations class instance with the recordId and moduleAPIName.
MethodDescription
GetBlueprintTo get the next available transitions for that record, fields available for each transition, current value of each field, and validation(if any).
UpdateBlueprintTo update a single transition at a time.

Bulk Read Operations

MethodDescription
CreateBulkReadJobTo schedule a bulk read job to export records that match the criteria.
GetBulkReadJobDetailsTo know the status of the bulk read job scheduled previously.
DownloadResultTo 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

MethodDescription
UploadFileTo upload a CSV file in ZIP format. The response contains the "file_id". Use this ID while making the bulk write request.
CreateBulkWriteJobTo 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.
GetBulkWriteJobDetailsTo know the status of the bulk write job scheduled previously.
DownloadResultTo 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 job

Contact Roles Operations

MethodDescription
GetContactRolesTo get the list of all contact roles.
CreateContactRolesTo create contact roles.
UpdateContactRolesTo update contact roles.
DeleteContactRolesTo delete contact roles.
GetContactRoleTo get specific contact role.
UpdateContactRoleTo update specific contact role.
DeleteContactRoleTo delete specific contact role.
GetAllContactRolesOfDealTo get all contact roles of deal.
GetContactRoleOfDealTo get contact role of deal.
AddContactRoleToDealTo add contact role to deal.
RemoveContactRoleFromDealTo remove specific contact role from deal.

Currencies Operations

MethodDescription
GetCurrenciesTo get the list of all currencies available for your org.
AddCurrenciesTo add new currencies to your org.
UpdateCurrenciesTo update the currencies' details of your org.
EnableMultipleCurrenciesTo enable multiple currencies for your org.
UpdateBaseCurrencyTo update the base currency details of your org.
GetCurrencyTo get the details of specific currency.
UpdateCurrencyTo update the details of specific currency.

Custom View Operations

ConstructorDescription
CustomViewsOperations(string module)Creates a CustomViewsOperations class instance with the moduleAPIName.
MethodDescription
GetCustomViewsTo get the list of all custom views in a module.
GetCustomViewTo get the details of specific custom view in a module.

Fields Metadata Operations

ConstructorDescription
FieldsOperations(string module)Creates a FieldsOperations class instance with the module.
MethodDescription
GetFieldsTo get the meta details of all fields in a module.
GetFieldTo get the meta details of specific field in a module.

Files Operations

MethodDescription
UploadFilesTo upload files and get their encrypted IDs.
GetFileTo get the uploaded file through its encrypted ID.

Layouts Operations

ConstructorDescription
LayoutsOperations(string module)Creates a LayoutsOperations class instance with the moduleAPIName.
MethodDescription
GetLayoutsTo get the details of all the layouts in a module.
GetLayoutTo get the details (metadata) of a specific layout in a module.

Modules Operations

MethodDescription
GetModulesTo get the details of all the modules.
GetModuleTo get the details (metadata) of a specific module.
UpdateModuleByAPINameTo update the details of a module by its module API name.
UpdateModuleByIdTo update the details of a module by its ID.

Notes Operations

MethodDescription
GetNotesTo get the list of notes of a record.
CreateNotesTo add new notes to a record.
UpdateNotesTo update the details of the notes of a record.
DeleteNotesTo delete the notes of a record.
GetNoteTo get the details of a specific note.
UpdateNoteTo update the details of an existing note.
DeleteNoteTo delete a specific note.

Notification Operations

MethodDescription
EnableNotificationsTo enable instant notifications of actions performed on a module.
GetNotificationDetailsTo get the details of the notifications enabled by the user.
UpdateNotificationsTo 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.
UpdateNotificationTo 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.
DisableNotificationsTo stop all the instant notifications enabled by the user for a channel.
DisableNotificationTo disable notifications for the specified events in a channel.

Organization Operations

MethodDescription
GetOrganizationTo get the details of your organization.
UploadOrganizationPhotoTo upload a photo of your organization.

Profile Operations

ConstructorDescription
ProfilesOperations(OffsetDateTime ifModifiedSince)Creates a ProfilesOperations class instance with the value of the If-Modified-Since header.
MethodDescription
GetProfilesTo get the list of profiles available for your organization.
GetProfileTo get the details of a specific profile.

Query (COQL) Operation

MethodDescription
getRecordsTo get the records from a module through a COQL query.

Records Operations

MethodDescription
GetRecordTo get a specific record from a module.
UpdateRecordTo update a specific record in a module.
DeleteRecordTo delete a specific record from a module.
GetRecordsUsingExternalIDTo get records using external ID.
UpdateRecordsUsingExternalIDTo update records using external ID.
DeleteRecordsUsingExternalIDTo delete records using external ID.
GetRecordsTo get all records from a module.
CreateRecordsTo insert records in a module.
UpdateRecordsTo update records in a module.
DeleteRecordsTo delete records from a module.
UpsertRecordsTo insert/update records in a module.
GetDeletedRecordsTo get the deleted records from a module.
SearchRecordsTo search for records in a module that match certain criteria, email, phone number, or a word.
ConvertLeadTo convert records(Leads to Contacts/Deals).
GetPhotoTo get the photo of a record.
UploadPhotoTo upload a photo to a record.
DeletePhotoTo delete the photo of a record.
MassUpdateRecordsTo update the same field for multiple records in a module.
GetMassUpdateStatusTo get the status of the mass update job scheduled previously.

Related List Operations

ConstructorDescription
RelatedListsOperations(string module)Creates a RelatedListsOperations class instance with the moduleAPIName.
MethodDescription
GetRelatedListsTo get the details of all the related lists of a module.
GetRelatedListTo get the details of a specific related list of a module.

Related Records Operations

ConstructorDescription
RelatedRecordsOperations(string relatedListAPIName, long recordId, string moduleAPIName)Creates a RelatedRecordsOperations class instance with the relatedListAPIName, recordId, and moduleAPIName.
MethodDescription
GetRelatedRecordsTo get list of records from the related list of a module.
UpdateRelatedRecordsTo update the association/relation between the records.
DelinkRecordsTo delete the association between the records.
GetRelatedRecordsUsingExternalIdTo get the records using External ID.
UpdateRelatedRecordsUsingExternalIdTo update the association/relation between the records using External ID.
DeletedRelatedRecordsUsingExternalIdTo delete the association between the records using External ID.
GetRelatedRecordTo get the records from a specific related list of a module.
UpdateRelatedRecordTo update the details of a specific record of a related list in a module.
Delink RecordTo delete a specific record from the related list of a module.
GetRelatedRecordUsingExternalIdTo get the record using External ID.
UpdateRelatedRecordUsingExternalIdTo update the association/relation between the record using External ID.
DeleteRelatedRecordsUsingExternalIdTo delete the association between the record using External ID.

Role Operations

MethodDescription
GetRolesTo get the list of all roles available in your organization.
GetRoleTo get the details of a specific role.

Shared Records Operations

ConstructorDescription
ShareRecordsOperations(long recordId, string moduleAPIName)Creates a ShareRecordsOperations class instance with the recordId and moduleAPIName.
MethodDescription
GetSharedRecordDetailsTo get the details of a record shared with other users.
ShareRecordTo share a record with other users in the organization.
UpdateSharePermissionsTo
  • Update the sharing permissions of a record granted to users as Read-Write, Read-only, or grant full access.

  • Revoke access given to users to a shared record.

  • Update the access permission to the related lists of the record that was shared with the user.

RevokeSharedRecordTo revoke access to a shared record.

Tags Operations

MethodDescription
GetTagsTo get the list of all tags in your organization.
CreateTagsTo create tags.
UpdateTagsTo update multiple tags.
UpdateTagTo update a specific tag.
DeleteTagTo delete a specific tag from the module.
MergeTagsTo merge two tags.
AddTagsToRecordTo add tags to a specific record.
RemoveTagsFromRecordTo remove tags from a record.
AddTagsToMultipleRecordsTo add tags to multiple records.
RemoveTagsFromMultipleRecordsTo remove tags from multiple records.
GetRecordCountForTagTo get the record count for a tag.

Taxes Operations

MethodDescription
GetTaxesTo get the taxes of your organization.
CreateTaxesTo add taxes to your organization.
UpdateTaxesTo update the existing taxes of your organization.
DeleteTaxesTo delete multiple taxes from your organization.
GetTaxTo get the details of a specific tax.
DeleteTaxTo delete a specific tax from your organization.

Territory Operations

MethodReturn TypeDescription
GetTerritoriesAPIResponse<ResponseHandler>To get the list of all territories.
GetTerritoryAPIResponse<ResponseHandler>To get the details of a specific territory.

Users Operations

MethodDescription
GetUsersTo get the list of users in your organization.
CreateUserTo add a user to your organization.
UpdateUsersTo update the existing users of your organization.
GetUserTo get the details of a specific user.
UpdateUserTo update the details of a specific user.
DeleteUserTo delete a specific user from your organization.

Variable Groups Operations

MethodDescription
GetVariableGroupsTo get the list of all variable groups available for your organization.
GetVariableGroupByIdTo get the details of a variable group by its group ID.
GetVariableGroupByAPINameTo get the details of a specific variable group by its API name.

Variables Operations

MethodDescription
GetVariablesTo get the list of variables available for your organization.
CreateVariablesTo add new variables to your organization.
UpdateVariablesTo update the details of variables.
DeleteVariablesTo delete multiple variables.
GetVariableByIdTo get the details of a specific variable by its unique ID.
UpdateVariableByIdTo update the details of a specific variable by its unique ID.
DeleteVariableTo delete a specific variable.
GetVariableForAPINameTo get the details of a variable by its API name.
UpdateVariableByAPINameTo update the details of a variable by its API name.