サンプルコード - Python SDK
Python SDKを通じて、すべてのZoho CRM APIを使用し、カスタムアプリケーションでデータ同期を実行できます。Python SDKで利用できるAPIメソッドのサンプルコードを紹介します。
RESTクライアントの演算
これらのメソッドには、Zoho CRMのデータにアクセスするために、アプリケーション内に含める認証手順が含まれます。
メソッド | 説明 |
---|---|
get_org_details | To fetch information about your CRM account organization. |
get_current_user | To fetch information about the user who is currently accessing Zoho CRM's data through your application. |
get_all_modules | To fetch information about all modules in your CRM account. |
get_module | To fetch information about a particular module in your CRM account. |
組織の演算
これらのメソッドには、Zoho CRMの組織のデータを取得するために、アプリケーション内で実行できる処理が含まれます。たとえば、組織内のすべてのユーザー(従業員)の一覧をいつでも取得できます。
メソッド | 説明 |
---|---|
get_user | To fetch information about a specific user in your CRM account. |
get_all_users | To fetch the list of all the users from your CRM account. |
get_all_active_users | To fetch the list of all the active users in your CRM account. |
get_all_deactive_users | To fetch the list of all the non-active users in your CRM account. |
get_all_active_confirmed_users | To fetch the list of all the active and confirmed users in your CRM account. |
get_all_confirmed_users | To fetch the list of all the confirmed users in your CRM account. |
get_all_not_confirmed_users | To fetch the list of all the users who are not confirmed in your CRM account. |
get_all_deleted_users | To fetch the list of all the users who were deleted from your CRM account. |
get_all_admin_users | To fetch the list of all the users who have admin level permissions in your CRM account. |
get_all_active_confirmed_admin_users | To fetch the list of all the active and confirmed users who have admin level permissions in your CRM account. |
create_user | To create a new user in your CRM account. |
update_user | To update details of an existing user in your CRM account. |
delete_user | To delete a user from your CRM account. |
get_current_user | To fetch information on the user who is currently accessing Zoho CRM's data through your app. |
get_profiles | To fetch the list of all the profiles that were created in your CRM account. |
get_profile | To fetch information about a particular profile in your CRM account. |
get_all_roles | To fetch information about a particular role in your CRM account. |
get_role | To fetch information about a particular role in your CRM account. |
get_variable_groups | To get the details of any variable group. |
get_variables | To retrieve all the available variables for your organization. |
create_variables | To create new variables in CRM. |
update_variables | To update the details of variables in CRM. |
get_organization_taxes | To fetch the list of all organization taxes. |
get_organization_tax | To fetch information about a particular organization tax. |
create_organization_taxes | To create a new organization tax. |
update_organization_taxes | To update the details of a particular organization tax. |
delete_organization_taxes | To delete all the taxes associated to the organization. |
delete_organization_tax | To delete a particular tax associated to the organization. |
タブの演算
これらのメソッドには、Zoho CRM内でタブ単位でデータを修正するために、アプリケーション内で実行できる処理が含まれます。たとえば、タブからすべてのデータを取得したり、特定のデータを検索したり、データを削除したりなどができます。
メソッド | 説明 |
---|---|
get_fields | To fetch the list of all the fields that are available in a module. |
get_field | To fetch information about a particular field available in a module. |
get_layout | To fetch information about a particular layout of a module. |
get_all_layouts | To fetch the list of all the layouts that are available for a module. |
get_customview | To fetch information about a particular custom view of a module. |
get_all_customviews | To fetch the list of all the custom views that are available for a module. |
get_all_relatedlists | To fetch the list of all the related lists that are available for a module. |
get_relatedlist | To fetch the list of all the related lists that are available for a module. |
update_module_settings | To update the settings of a module. Ex: territory, custom view, etc. |
get_records | To fetch the list of all the records that are available in a module. |
search_records | To search for records in a module based on a Word(text). |
search_records_by_phone | To search for records in a module based on the Phone number. |
search_record_email | To search for records in a module based on Email address. |
search_records_by_criteria | To search for records in a module based on a criteria specified by the user. |
update_records | To update details of multiple records in a module. |
create_records | To create a new record in a module. |
delete_records | To delete existing records from a module. |
get_deleted_records | To fetch the list of all the records that were deleted from a module. |
get_recyclebin_records | To fetch the list of all the records that were deleted from a module and stored in the recycle bin. |
get_permanently_deleted_records | To fetch the list of all the records that were permanently deleted from a module. |
upsert_records | To insert/update records in a module. |
mass_update_records | To update single field value for multiple records. Same value will get updated for all the mentioned records. |
get_tags | To fetch the list of all the tags that were created for a module. |
get_tag_count | To fetch the total count of tags that were created for a module. |
create_tags | To create new tags for a module. |
update_tags | To update the details of existing tags for a module. |
add_tags_to_multiple_records | To associate tags to records in a module. |
remove_tags_from_multiple_records | To disassociate tags from records in a module. |
データの演算
これらのメソッドには、特定のデータ内に保管されている詳細情報にアクセスしたり、詳細情報を修正したりするために、アプリケーション内で実行できる処理が含まれます。たとえば、データの詳細情報の取得、新しいデータの作成、既存データの更新、メモ/添付ファイル/写真のアップロードなどが可能です。
メソッド | 説明 |
---|---|
create_record | To create a new record. |
update_record | To update an existing record. |
delete_record | To delete an existing record. |
convert_record | To convert a record (Leads to Contacts/Deals). |
get_notes | To fetch the notes that were attached to a record. |
add_note | To add a note to a record. |
update_note | To update a note that was previously added to a record. |
delete_note | To delete a note from a record. |
get_attachments | To fetch the list of attachments of a record. |
upload_attachment | To upload an attachment to a record. |
upload_link_as_attachment | To upload a link as an attachment to a record. |
download_attachment | To download an attachment that was uploaded to a record. |
delete_attachment | To delete an attachment that was added to a record. |
upload_photo | To upload a photo to a record. |
download_photo | To download a photo that was added to a record. |
delete_photo | To delete a photo that was added to a record. |
add_relation | To make a relation between two records. |
remove_relation | To remove a relation between two records. |
get_related_records | To fetch the list of records in a related list. |
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. |
get_variable_group | To get the details of a specific variable group. |
get_variable | To get the details of a specific variable. |
update_variable | To update the details of a specific variable. |
delete_variable | To delete a specific variable. |
add_tags | To add tags to a record. |
remove_tags | To remove tags from a record. |
delete_tag | To remove tags from a record. |
merge_tag | To merge two tags. |
メモの演算
Tこれらのメソッドには、Zoho CRM内のデータのメモにアクセスしたり、修正したりするために、アプリケーション内で実行できる処理が含まれます。
メソッド | 説明 |
---|---|
note_get_attachments | To fetch all attachments of a note. |
note_upload_attachment | To upload a note attachment to a record. |
note_download_attachment | To download an attachment that was attached to a record. |
note_delete_attachment | To delete an attachment that was attached to a record. |