1.根据模板创建文件(云单开具协议) {{url}}/v1/files/createByTemplate 请求参数: { "name":"云单开具协议1.0版本.pdf", "simpleFormFields":{ "710e9467a9b54f67b365c1f48c605709":"核心企业001", "e1a68a01def04ac8b8deea8f1547b1c6":"一级供应商2104309956", "a03d37be3d6946a0b4fe744a43465d3f":"资方001", "8bac9c16f7fa45bf84dda9090c33d252":"核心企业001", "d613ba17c8a94af5a5a84b0ea9bb5b61":"一级供应商2104309956", "2af5407bfd284ef7943b683e38a92aec":"资方001", "0c7c1bce71004fb9b2e71e350b8506f3":"4fe39230734247a9bc0a846b15a36ad3", "c94b5ec2361546a7a49f3d7cc19ea223":"308eb731a8694b6cb8dd517b60040ea1", "d2d076b81efc4882af6d084306edcd93":"5f1d21c69ad642ab81ab2b579e4e9616" }, "templateId":"10287ffa80dd46f58bc4de4617d5568f" } 响应结果: { "code": 0, "message": "成功", "data": { "fileId": "959772bad706494b8495e5e3d8824870", "fileName": "云单开具协议1.0版本.pdf", "downloadUrl": "https://esignoss.esign.cn/1111564182/2babb9b7-02da-44b4-bf18-a23c1e4d68bf/%E4%BA%91%E5%8D%95%E5%BC%80%E5%85%B7%E5%8D%8F%E8%AE%AE1.0%E7%89%88%E6%9C%AC.pdf?Expires=1623398085&OSSAccessKeyId=LTAI4G23YViiKnxTC28ygQzF&Signature=1cmGAokVppGLzM1JqsCxNaA4qBM%3D" } } 2.根据模板创建文件(付款承诺函) {{url}}/v1/files/createByTemplate 请求参数: { "name":"付款承诺函.pdf", "simpleFormFields":{ "287753a13f4541e9a1b60abe907f4a2e":"FKCN89862106100002", "ebd0581f391048baa95af0301e4b3d88":"一级供应商2104309956", "543740bceed74a429804dafe394f81ba":"捌佰捌拾柒元", "a4be37903b7245c6b8fc9f055251502b":"YD89862106100002", "f43f1bac003a4975911ce7493413f8d1":"核心企业001", "585ccf122cdf498aa16c823f849f2cd6":"4fe39230734247a9bc0a846b15a36ad3" }, "templateId":"6891fdfe57d54ac0a485cd49b72764f8" } 响应结果: { "code": 0, "message": "成功", "data": { "fileId": "25a33843358642948912aa909ea256a9", "fileName": "付款承诺函.pdf", "downloadUrl": "https://esignoss.esign.cn/1111564182/867967b3-6c15-46d6-b691-4f1c2e232fb0/%E4%BB%98%E6%AC%BE%E6%89%BF%E8%AF%BA%E5%87%BD.pdf?Expires=1623398102&OSSAccessKeyId=LTAI4G23YViiKnxTC28ygQzF&Signature=lyaFfQY5N%2BmQCqSBF7Yu9%2FUsuWY%3D" } } 3.创建签署流程 {{url}}/v1/signflows 请求参数: { "autoArchive":true, "businessScene":"创建签署流程", "configInfo":{ "noticeDeveloperUrl":"http://hdzl.natapp1.cc/common/ecSign/signerFinishCallBack", "noticeType":"1", "redirectUrl":"", "signPlatform":"1", "willTypes":["CODE_SMS"], "personAvailableAuthTypes":["PSN_FACEAUTH_BYURL"], "batchDropSeal":true, "orgAvailableAuthTypes":["ORG_BANK_TRANSFER"], "personAuthAdvancedEnabled":["PSN_FACEAUTH_BYURL"] }, "initiatorAccountId":"b3650465d3954e7ab553a725a5db4ed7", "initiatorAuthorizedAccountId":"4fe39230734247a9bc0a846b15a36ad3" } 响应结果: { "code": 0, "message": "成功", "data": { "flowId": "052fd452482042d3a509bdd140b5615e" } } 4.添加流程文档 {{url}}/v1/signflows/052fd452482042d3a509bdd140b5615e/documents 请求参数: { "docs":[ { "encryption":0, "fileId":"959772bad706494b8495e5e3d8824870", "fileName":"云单开具协议1.0版本.pdf", "filePassword":"" },{ "encryption":0, "fileId":"25a33843358642948912aa909ea256a9", "fileName":"付款承诺函.pdf", "filePassword":"" } ] } 响应结果: { "code": 0, "message": "成功", "data": {} } 5.添加签署区 {{url}}/v1/signflows/052fd452482042d3a509bdd140b5615e/signfields/handSign 请求参数: { "signfields":[ { "signerAccountId":"b3650465d3954e7ab553a725a5db4ed7", "authorizedAccountId":"4fe39230734247a9bc0a846b15a36ad3", "actorIndentityType":2, "fileId":"959772bad706494b8495e5e3d8824870", "order":1, "assignedPosbean":true, "posBean":{ "posPage":"10", "posX":310, "posY":767 }, "sealType":"", "sealId":"", "signType":1, "thirdOrderNo":"1002" },{ "signerAccountId":"b3650465d3954e7ab553a725a5db4ed7", "authorizedAccountId":"4fe39230734247a9bc0a846b15a36ad3", "actorIndentityType":2, "fileId":"25a33843358642948912aa909ea256a9", "order":1, "assignedPosbean":true, "posBean":{ "posPage":"2", "posX":198, "posY":437 }, "sealType":"", "sealId":"", "signType":1, "thirdOrderNo":"1002" } ] } 响应结果: { "code": 0, "message": "成功", "data": { "signfieldBeans": [ { "signfieldId": "af9a0d35dbac427ea07d61b022bbae60", "fileId": "959772bad706494b8495e5e3d8824870", "accountId": "b3650465d3954e7ab553a725a5db4ed7" }, { "signfieldId": "229b67bb7f71460389591678d08daf13", "fileId": "25a33843358642948912aa909ea256a9", "accountId": "b3650465d3954e7ab553a725a5db4ed7" } ] } } 6.开启流程 {{url}}/v1/signflows/052fd452482042d3a509bdd140b5615e/start 响应结果: { "code": 0, "message": "成功", "data": {} } 7.获取签署地址 {{url}}/v1/signflows/052fd452482042d3a509bdd140b5615e/executeUrl?accountId=b3650465d3954e7ab553a725a5db4ed7&organizeId=0 响应结果: { "code": 0, "message": "成功", "data": { "url": "https://smlh5.esign.cn/guide?context=z3K8AT76iheB&flowId=052fd452482042d3a509bdd140b5615e&organ=true&appId=7438857361&linkSource=1&bizType=1&tsign_source_type=SIGN_LINK_WUKONG&tsign_source_detail=16R2mv%2F27h2Y5CkM9bwhboKizIoTJcngNSvGNjNIknMzUKEREssGXXnD%2BnzhlKwLNxMyjwwFz4b7sTpZoe6Y4adXTMEAavqIrxG6s3rJDSSlqV0ZTH71lChl0dK310ggHxL3Ib4hPYGxmv2ZpSdaqX7nuV0tqPqOVSPJtiaZWK6707MhcRrk5GQaGaI61YwC%2Fujqa8bASw9EiM%2BDNvfJczuoulnsG1%2FXA5L178Setr1sbxfSyfufZLLkwj%2Bu0mcS2", "shortUrl": "https://smlt.esign.cn/DuvtZqTZSSLG" } }