Delete Custom Layout
Purpose
To delete a custom layout and transfer its records to another active layout.
Endpoints
- DELETE /settings/layouts/{layout_ID}?module={module_API_name}&transfer_to={target_layout_ID}
Request Details
Request URL
{api-domain}/crm/{version}/settings/layouts/{layout_id}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.layouts.DELETE (or)
ZohoCRM.settings.layouts.ALL (or)
ZohoCRM.settings.ALL
Parameters
- modulestring, mandatory
Specify the module API name from which you want to delete the custom layout. Use the GET Module Metadata API to get the module API names. Supported modules are Leads, Contacts, Accounts, Deals, Products, Quotes, Sales Orders, Purchase, Orders, Invoices, Campaigns, Vendors, Price Books, Cases, Solutions, and Custom.
- transfer_tostring, mandatory
Specify the ID of the layout to which you want to transfer records and profiles from the layout being deleted. Use the GET Layout Metadata API to get the layout IDs.
Note
You can delete one custom layout in a single API call.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/layouts/5725767000002269121?module=Leads&transfer_to=5725767000002256361"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Possible Errors
- INVALID_DATAHTTP 400
Given ID of the layout seems to be invalid
Resolution: Specify a valid layout ID. Use the GET Layout Metadata API to retrieve unique layout IDs. - NOT_ALLOWEDHTTP 400
- Cannot transfer to the deactivated layout
Resolution: The layout ID specified in the "transfer_to" parameter has been deactivated. Specify an active layout ID. The status key in the response from the Layout Metadata API indicates whether the layout is active or inactive. - You cannot delete the system-defined layout
Resolution: Only custom layouts can be deleted. Please specify a custom layout ID. Use the GET Layout Metadata API to retrieve unique layout IDs. For custom layouts, the key "generated_type" will be set to "custom".
- Cannot transfer to the deactivated layout
- NO_PERMISSIONHTTP 400
Permission denied
Resolution: You do not have permission to delete the layout. Contact your system administrator. - REQUIRED_PARAM_MISSINGHTTP 400
Required parameter is missing
Resolution: Specify all the mandatory parameters. See the Parameter section above.
Sample Response
Copied{
"layouts": [
{
"code": "SUCCESS",
"details": {
"id": "5725767000002256447"
},
"message": "layout deleted",
"status": "success"
}
]
}