Update Notes

Purpose

To update an existing note.

Request URL

https://www.zohoapis.com/crm/v2/{module_api_name}/{record_id}/Notes/{note_id}

module_api_name - The API name of the module

record_id - The unique ID of a record

note_id - The unique ID of a note

Modules supported in Get a Specific Note are supported here.

Request Method

PUT

Scope

scope=ZohoCRM.modules.all
(or)
scope=ZohoCRM.modules.{module_name}.{operation_type}

 
Possible module namesPossible operation types
leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, and customALL - Full access to notes
WRITE - Edit note data
UPDATE - Update note data
Note:

You must use only Field API names in the input. You can obtain the field API names from Fields metadata API (the value for the key “api_name” for every field).

Sample Request

In the request, "@updatenote.json" contains the sample input data.


				curl "https://www.zohoapis.com/crm/v2/Leads/410888000000645234/Notes/410888000000643123"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@updatenote.json"
-X PUT			

Sample Input

In the input, specify the field API names of the Notes module along with the corresponding values.


				{
    "data": [
       {
            "Note_Title": "Contacted",
            "Note_Content": "Tracking done. Happy with the customer"
        }
    ]
}			

Sample Response


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "created_time": "2016-07-05T17:13:24+05:30",
                "modified_time": "2016-08-08T11:28:41+05:30",
                "modified_by": {
                    "name": "Patricia Boyle",
                    "id": "4108880000086001"
                },
                "id": "410888000000643123",
                "created_by": {
                    "name": "Patricia Boyle",
                    "id": "4108880000086001"
                }
            },
            "message": "record updated",
            "status": "success"
        }
    ]
}			

Sample Request


				ZCRMRecord record = ZCRMRecord.getInstance("Products",23857634545l);//module api name with record id
ZCRMNote note = ZCRMNote.getInstance(record,374968745l);// notesID
note.setContent("update message");
APIResponse response = record.updateNote(note);
ZCRMNote updatedNote = (ZCRMNote) response.getData();
String recStatus =response.getStatus();			

Sample Input

In the input, specify the field API names of the Notes module along with the corresponding values.


				{
    "data": [
       {
            "Note_Title": "Contacted",
            "Note_Content": "Tracking done. Happy with the customer"
        }
    ]
}			

Sample Response


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "created_time": "2016-07-05T17:13:24+05:30",
                "modified_time": "2016-08-08T11:28:41+05:30",
                "modified_by": {
                    "name": "Patricia Boyle",
                    "id": "4108880000086001"
                },
                "id": "410888000000643123",
                "created_by": {
                    "name": "Patricia Boyle",
                    "id": "4108880000086001"
                }
            },
            "message": "record updated",
            "status": "success"
        }
    ]
}			

Sample Request


				try{
$record=ZCRMRecord::getInstance('Accounts',410405000000497012); // 410405000000497012 - Account ID.
$noteIns=ZCRMNote::getInstance($record,410405000000498056); // , 410405000000498056 - Note ID
$noteIns->setTitle("Title_API22..");
$noteIns->setContent("This is test content");
$responseIns=$record->updateNote($noteIns);
$zcrmNote=$responseIns->getData();
echo "HTTP Status Code:".$responseIns->getHttpStatusCode();
echo "Status:".$responseIns->getStatus();
echo "Message:".$responseIns->getMessage();
echo "Code:".$responseIns->getCode();
echo "Details:".$responseIns->getDetails()['id'];
echo "Entity Id:".$zcrmNote->getId();
}
catch (ZCRMException $e)
{
echo $e->getCode();
echo $e->getMessage();
echo $e->getExceptionCode();
}			

Sample Input

In the input, specify the field API names of the Notes module along with the corresponding values.


				{
    "data": [
       {
            "Note_Title": "Contacted",
            "Note_Content": "Tracking done. Happy with the customer"
        }
    ]
}			

Sample Response


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "created_time": "2016-07-05T17:13:24+05:30",
                "modified_time": "2016-08-08T11:28:41+05:30",
                "modified_by": {
                    "name": "Patricia Boyle",
                    "id": "4108880000086001"
                },
                "id": "410888000000643123",
                "created_by": {
                    "name": "Patricia Boyle",
                    "id": "4108880000086001"
                }
            },
            "message": "record updated",
            "status": "success"
        }
    ]
}			

Sample Request


				def update_note(self):
        try:
            record = ZCRMRecord.get_instance('Leads', 3719520000000326007)  # module API Name, entityId
            note_ins = ZCRMNote.get_instance(record, 3719520000000512001)  # note ID
            note_ins.title = "title2 updated"
            note_ins.content = 'content2 updated...'
            resp = record.update_note(note_ins)
            print(resp.status_code)
            print(resp.code)
            print(resp.data.modified_by.id)
            print(resp.data.modified_by.name)
            print(resp.message)
            print(resp.status)
        except ZCRMException as ex:
            print(ex.status_code)
            print(ex.error_message)
            print(ex.error_code)
            print(ex.error_details)
            print(ex.error_content)			

Sample Input

In the input, specify the field API names of the Notes module along with the corresponding values.


				{
    "data": [
       {
            "Note_Title": "Contacted",
            "Note_Content": "Tracking done. Happy with the customer"
        }
    ]
}			

Sample Response


				{
    "data": [
       {
            "code": "SUCCESS",
            "details": {
                "created_time": "2016-07-05T17:13:24+05:30",
                "modified_time": "2016-08-08T11:28:41+05:30",
                "modified_by": {
                    "name": "Patricia Boyle",
                    "id": "4108880000086001"
                },
                "id": "410888000000643123",
                "created_by": {
                    "name": "Patricia Boyle",
                    "id": "4108880000086001"
                }
            },
            "message": "record updated",
            "status": "success"
        }
    ]
}