Record Locking APIs
Record Locking APIs allow you to lock records, unlock records, view locking information of locked records and edit locking information of locked records.
GET Record Locking Information
Purpose
To retrieve the locking information details of locked records.
Request Details
Request URL
{api-domain}/crm/{version}/{module_API_name}/{record_id}/Locking_Information__s
To get specific record locking id:
{api-domain}/crm/{version}/{module_API_name}/{record_id}/Locking_Information__s/{record_locking_id}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.modules.lockinginformation.All (or) scope=ZohoCRM.modules.lockinginformation.Read
(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 - Read records from the module
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v3/Leads/5843104000000725170/Locking_Information__s?fields=Locked_For__s,Locked_Reason__s,Lock_Source__s,Locked_Time__s,Locked_By__s,Record_Locking_Rule_Id__s,Record_Locking_Configuration_Id__s,Owner,Parent_Id"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-X GET
Parameters
- fields string, mandatory when record locking id is not specified in the end point.
Specify field names required in the response. You can specify multiple field API names that are separated by comma.
Possible values:
Locked_For__s, Locked_Reason__s, Lock_Source__s, Locked_Time__s, Locked_By__s, Record_Locking_Rule_Id__s, Record_Locking_Configuration_Id__s, Owner, Parent_Id
Response JSON Keys
- Locked_By__sJSON object
Represents the details of the user who locked the record. For automatic record locking, this JSON object will be populated with null.
- namestring
Represents the name of the user who locked the record.
- idlong
Represents the ID of the user who locked the record.
- Locked_For__sJSON object
Represents the details of the locked record.
- moduleJSON object
Represents the details of the module of the locked record.
- api_namestring
Represents the API name of the module of the locked record.
- idlong
Represents the ID of the module of the locked record.
- namestring
Represents the name of the locked record.
- idlong
Represents the ID of the locked record.
- Locked_Reason__sstring
Represents the reason the record is locked. For automatic record locking, this JSON object will be populated with null.
- Lock_Source__sstring
Indicates whether the record was manually locked or automatically locked.
Possible values: Manual, Automatic. - Locked_Time__sstring
Represents the time when the record was locked.
- Record_Locking_Configuration_Id__slong
Represents the ID of the record locking configuration.
- Record_Locking_Rule_Id__slong
Represents the ID of the record locking configuration rule. For manual record locking, this JSON object will be populated with null.
- idlong
Represents the ID of locking information.
Possible Errors
- REQUIRED_PARAM_MISSINGHTTP 400
One of the expected parameters is missing.
Resolution: The "details" key in the response gives the missing param in the request. Ensure that you include the params marked "mandatory" in the "Parameters" section. - NOT_ALLOWEDHTTP 400
Required Record Locking Configuration is not present.
Resolution: Create record lock configuration in your org. - INVALID_DATAHTTP 400
The relation id given seems to be invalid.
Resolution: Provide valid module id. - INVALID_DATAHTTP 400
The related id given seems to be invalid.
Resolution: Provide valid locking information id. - FEATURE_NOT_SUPPORTEDHTTP 400
Record Locking Configuration is not supported in your edition.
Resolution: Contact your administrator. - NO_PERMISSIONHTTP 403
Record Locking Configuration is not supported for the profile of the user.
Resolution: Contact your administrator. - INVALID_REQUEST_METHODHTTP 403
The 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. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in the server. Contact the support team.
Sample Response
Copied {
"data": [
{
"Locked_By__s": {
"name": "Patricia Boyle",
"id": "5843104000000424672"
},
"Locked_For__s": {
"module": {
"api_name": "Leads",
"id": "5843104000000002175"
},
"name": "Theola Frey (Sample)",
"id": "5843104000000425566"
},
"Locked_Reason__s": "deal in progress",
"Record_Locking_Configuration_Id__s": "5843104000000758004",
"Record_Locking_Rule_Id__s": null,
"$editable": true,
"id": "5843104000000804005",
"$sharing_permission": "full_access",
"Lock_Source__s": "Manual",
"Locked_Time__s": "2023-09-05T05:13:36-04:00"
}
],
"info": {
"per_page": 200,
"next_page_token": null,
"count": 1,
"page": 1,
"previous_page_token": null,
"page_token_expiry": null,
"more_records": false
}
}