Update

Modify a draft workflow owned by the user’s organization.

Request

POST https://api.cloudplan.biz/api/workflow/update

{
    "cp_id": "5F2C26A0097F3A503FFF857062AFA1C2",
    "project_name": "qqq", // (Optional)
    "project_description": "...", // (Optional)
    "project_message_signer": "...", // (Optional)
    "project_runtime": int(259200), // (Optional)
    "project_remind_freq": int(86400), // (Optional)
    "target_folder_cp_id": "5E58D529AC4CCEFC31E8AAC9E32BCH77", // (Optional)
}

Reply

{
    "status": 200,
    "result": true,
    "params": {
        "cp_id": "5E58D529AC4CCEFC31E8AAC9E32BCD46",
        "project_name": "qqq"
    },
    "data": {
        "project_name": "qqq",
        "project_description": "sdfgdsfg",
        "project_deadline": 1583484780,
        "project_message_signer": "dfgdfgdfgsdfg",
        "project_runtime": "",
        "project_remind_freq": 86400,
        "cp_id": "5E58D529AC4CCEFC31E8AAC9E32BCD46",
        "project_type": "contract",
        "created": 1582880041,
        "status": "draft",
        "creator_cp_id": "56A23E83C9A4AA62AAE4DC6055F7893B",
        "start_time": "",
        "starter_cp_id": "",
        "starter_email": "",
        "target_folder_cp_id": "5E58D529AC4CCEFC31E8AAC9E32BCH77",
        "signing_steps": [
            [
                {
                    "group_cp_id": "5F2BE9D8139E3C108775E690319D2E5B",
                    "token": "5F3D3C25A59952B168DDB5950C6CB4ED",
                    "name": "YO",
                    "rule": "must_sign"
                }
            ]
        ],
        "documents": [
            {
                "file_cp_id": "VGVZDGZPBGUTMTQ5",
                "file_name": "Testfile-149Loremipsumdolorsitametconsect.pdf",
                "folder_cp_id": "5ECE77176D70DAF6EFA685DBDA719957",
                "file_options": []
            },
            {
                "file_cp_id": "5F1AB1FD371382D05B88FD3FB0BBBA9D",
                "file_name": "File-1",
                "folder_cp_id": "plain",
                "file_options": []
            }
        ]
    }
}

Error Codes

workflow_not_found
workflow_not_owned
workflow_not_a_draft
invalid_cp_id