Lock Records
Purpose
To lock a record of a module.
Endpoints
- POST /{module_API_name}/{record_id}/Locking_Information__s
Request Details
Request URL
{api-domain}/crm/{version}/{module_API_name}/{record_id}/Locking_Information__s
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.modules.lockinginformation.Create
(and)
scope=ZohoCRM.modules.All (or) scope=ZohoCRM.modules.{module_name}.{operation_type}
Possible module names
leads, accounts, contacts, deals, tasks, cases, solutions, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices and custom
Possible operation types
All - Full access to the record
READ - Create records for the module
Note
- For custom modules, only those created by users will support record locking. Custom modules created through extensions, integrations, or other means are not supported.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/5843104000000425565/Locking_Information__s"
-X POST
-d "@lockrecord.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Request JSON Keys
- Locked_Reason__s string,mandatorySpecify the reason the records are locked. 
Sample Input
Copied{
    "data": [
        {
               "Locked_Reason__s": "deal in progress"
        }
    ]
}Possible Errors
- INVALID_MODULEHTTP 400The module name given seems to be invalid. 
 Resolution: Specify a valid module API name.
- NOT_ALLOWEDHTTP 403Record is already locked. 
 Resolution: You can lock a record that is not already locked.
- INVALID_REQUEST_METHODHTTP 403The http request method type is not a valid one. 
 Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above.
- NO_PERMISSIONHTTP 403Permission denied to customize record lock configurations. The user does not have permission. 
 Resolution: Contact your system administrator.
- INTERNAL_ERRORHTTP 500Internal Server Error 
 Resolution: Unexpected and unhandled exception in the server. Contact support team.
Sample Response
Copied{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "Modified_Time": "2023-09-05T08:54:49-04:00",
                "Modified_By": {
                    "name": "Patricia Boyle",
                    "id": "5843104000000424672"
                },
                "Created_Time": "2023-09-05T08:54:49-04:00",
                "id": "5843104000000804020",
                "Created_By": {
                    "name": "Patricia Boyle",
                    "id": "5843104000000424672"
                }
            },
            "message": "record added",
            "status": "success"
        }
    ]
}