Request Details

Request URL

{api-domain}/crm/{version}/settings/layouts/{layout_id_to_deactivate}/actions/activate

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope = ZohoCRM.settings.layouts.DELETE (or)
scope = ZohoCRM.settings.layouts.ALL (or)
scope = ZohoCRM.settings.ALL 

Parameter

  • modulestring, mandatory

    Specify the module API name where you want to deactivate a 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 the records before deactivating the current layout. Use the GET Layout Metadata API to get the layout IDs.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v7/settings/layouts/5725767000002256361/actions/activate?module=Testings&transfer_to=5725767000002234002"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Possible Errors

  • INVALID_DATAHTTP 400
    The transfer_to layout ID provided seems to be invalid. 
    Resolution: Specify a valid layout ID. Use the GET Layout Metadata API to retrieve 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. Use the GET Layout Metadata API to retrieve unique layout IDs. The status key in the response from the Layout Metadata API indicates whether the layout is active or inactive.
  • ALREADY_DEACTIVATEDHTTP 400
    Given layout ID has already been deactivated
    Resolution: Specify an active layout ID. Use the GET Layout Metadata API to retrieve unique layout IDs. Use status in the fields parameter to know the list of active layouts.

Sample Response

Copied{
    "layouts": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "5725767000002256361"
            },
            "message": "layout deactivated",
            "status": "success"
        }
    ]
}