Transfer and Delete a Pipeline
Purpose
To delete a pipeline and transfer the associated stages to another pipeline.
Endpoints
- POST /settings/pipeline/actions/transfer?layout_id={layout_ID}
Request Details
Request URL
{api-domain}/crm/{version}/settings/pipeline/actions/transfer?layout_id={layout_id}
Header
Authorization: Zoho-oauthtoken <access_token>
Scope
scope=ZohoCRM.settings.pipeline.CREATE
(or)
scope=ZohoCRM.settings.pipeline.ALL
Parameters
- layout_idstring, mandatoryThe unique ID of the layout that the pipeline was created in. 
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/pipeline/actions/transfer?layout_id=3652397000000091023"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@input.json"Request JSON
- pipelineJSON object, mandatoryThe IDs of the pipelines that you want to transfer the deals from and to, respectively. This object contains the following keys: - from - string, mandatory - The ID of the pipeline you want to delete and transfer the associated deals from.
- to - string, mandatory - The ID of the pipeline you want to transfer deals to from another pipeline.
 
- stagesJSON array, mandatoryThe stages in the pipeline you want to map to the new one. This array contains the following keys: - from - string, mandatory - The ID of the stage in the pipeline you want to delete.
- to - string, mandatory - The ID of the stage in the new pipeline you want to map the old one with.
 
Sample Input
Copied{
    "transfer_pipeline": [
        {
            "pipeline": {
                "from": "3652397000003712004",
                "to": "3652397000003097007"
            },
            "stages": [
                {
                    "from": "3652397000000006817",
                    "to": "3652397000000006819"
                }
            ]
        }
    ]
}Possible Errors
- MANDATORY_NOT_FOUNDHTTP 400You have not included either the JSON object "pipeline" or the "stages" array in the input. 
 Resolution: Include the "pipeline" JSON object and the "stages" array with the required keys and their values.
- INVALID_DATAHTTP 400The ID of the layout is invalid. 
 Resolution: Provide a valid layout ID.
- INVALID_DATAHTTP 400Either the "from" or "to" ID is invalid in the input. 
 Resolution: Refer to the "details" key int he response for the API name of the invalid key, and provide a valid input.
- REQUIRED_PARAM_MISSINGHTTP 400You have not included the mandatory parameter "layout_id" in your request. 
 Resolution: Specify valid layout ID in the request.
Sample Response
Copied{
    "transfer_pipeline": [
        {
            "code": "SUCCESS",
            "details": {
                "job_id": "3652397000003737002"
            },
            "message": "transfer pipeline scheduled successfully",
            "status": "success"
        }
    ]
}