Kaizen #47 Handling Notes through Zoho CRM API (Part 2/2)

Kaizen #47 Handling Notes through Zoho CRM API (Part 2/2)

Hello everyone!
Welcome back to yet another post in the Kaizen series! 

In our last post, we started our discussion with Notes APIs in Zoho CRM. 
This week, we will discuss the following: 
  1. Notes as related lists
  2. Attaching files to notes via API
1. Notes as Related Lists
Notes API allows you to manipulate all the notes in all the modules, or specific notes based on their note IDs. Zoho CRM API also allows you to handle notes of a specific record using the related lists API.

The request URL will differ when you read/add/update/delete a note, as a related list. The structure of the URL would be:
To manipulate all the notes of a record: {{api-domain}}/crm/v2/{module_api_name}/{record_id}/Notes
(or)
To manipulate a specific note: {{api-domain}}/crm/v2/{module_api_name}/{record_id}/Notes/{note_id}

Sample Response to add note to a record: 


Things of note:
2. Attaching files to notes
You can attach files (images, audio, video, and so on) to notes via API. To attach files, you must first upload them to ZFS, and use the ID received to attach them to notes.

To get and update the attachment details of notes, you can use the Get Notes and Update Notes API respectively. You will get the details in the "$attachments" JSON array where each object in the array represents the unique ID of the attachment. 

2a. Attaching files to notes while note creation
Specify the ZFS file ID in the "id" key in the "$attachments" JSON array. 

"$attachments": [
                {
                    "id": "9943645bd4411e51145e0515bd77e380385aef2ab242da01182fae5958fc3018"
                }
            ]



2b. To add an attachment to an existing note

Request URL: {{api-domain}}/crm/v2/Notes/{note_id}/Attachments
Request Method: POST

Add the attachment file in the request body as form-data


Note: 
  1. You can attach more than one attachment to a note. 
  2. Ensure that size of each attachment file does not exceed 20 MB.

2c. To delete attachments from notes

Request URL: {{api-domain}}/crm/v2/Notes/{note_id}/Attachments/{attachment_id}
Request Method: DELETE

Sample Response


Note: 
  1. You can delete only one attachment per API call. 
We hope you found this post useful. 
Write to us at support@zohocrm.com if you have any questions, or let us know in the comment section.

Cheers!














                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • Functions

                                                                      Functions

                                                                    • Meetups

                                                                      Meetups

                                                                    • Kbase

                                                                      Kbase

                                                                    • Resources

                                                                      Resources

                                                                    • Digest

                                                                      Digest

                                                                    • CRM Marketplace

                                                                      CRM Marketplace

                                                                    • MVP Corner

                                                                      MVP Corner

                                                                    





                                                                    




                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now