Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docusignapi Docusign:restapi:BulkSendRecipients使用CSV/Text_Docusignapi - Fatal编程技术网

Docusignapi Docusign:restapi:BulkSendRecipients使用CSV/Text

Docusignapi Docusign:restapi:BulkSendRecipients使用CSV/Text,docusignapi,Docusignapi,我需要在fillabe.pdf中填写一些字段,将我们的Docusign模板应用到其中,并对2个角色进行批量发送,因此我的方法如下: 1-我根据预填充的.pdf文件创建了一个信封草稿,并使用模板创建信封: 职位 “{accountId}/信封” 正文: 2-然后我将批量csv上载到信封批量收件人: PUT "https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/"+{envelopeId}+"/recipient

我需要在fillabe.pdf中填写一些字段,将我们的Docusign模板应用到其中,并对2个角色进行批量发送,因此我的方法如下:

1-我根据预填充的.pdf文件创建了一个信封草稿,并使用模板创建信封:

职位 “{accountId}/信封”

正文:

2-然后我将批量csv上载到信封批量收件人:

PUT "https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/"+{envelopeId}+"/recipients/"+{recipientId}+"/bulk_recipients"
正文:

“姓名、电子邮件、电子邮件主题、managertext、家庭电话、名字John” stest1@test1.com,请修改表格并签名,经理#1888-111-1111,JS#U姓氏Mary S。,test2@test2.com,请修改表格并签字,经理#2888-111-1111,女士#姓“

3-然后我将信封的状态更改为“已发送”,并将信封发送给批量收件人

上面的方法是有效的,但是一旦将csv文件名从name改为Role1::name(文档中提到的方式),它就会查找文件名,并且根本不接受角色。 因此,对于添加角色,我尝试了其他端点,但没有一个端点可以满足我添加预填充pdf+docusign模板和docusign文件+批量收件人的需要

非常感谢您在这方面的帮助。
谢谢,
Kathy

对于步骤2,您不使用CSV,而是使用JSON

下面是一个JSON示例

{
    "name": "sample.csv",
    "bulkCopies": [{
        "recipients": [{
            "recipientId": "39542944",
            "role": "signer",
            "tabs": [],
            "name": "Alice UserName",
            "email": "alice.username@example.com"
        },
        {
            "recipientId": "84754526",
            "role": "cc",
            "tabs": [],
            "name": "Bob CarbonCopied",
            "email": "bob.carboncopy@example.com"
        }],
        "customFields": []
    },
{
        "recipients": [{
            "recipientId": "39542944",
            "role": "signer",
            "tabs": [],
            "name": "Carol NextUser",
            "email": "carol.nextuser@example.com"
        },
        {
            "recipientId": "84754526",
            "role": "cc",
            "tabs": [],
            "name": "Dave NextCarbon",
            "email": "dave.nextcarbon@example.com"
        }],
        "customFields": []
    }]
有关显示如何使用批量发送的完整代码示例,请转到:

{
    "name": "sample.csv",
    "bulkCopies": [{
        "recipients": [{
            "recipientId": "39542944",
            "role": "signer",
            "tabs": [],
            "name": "Alice UserName",
            "email": "alice.username@example.com"
        },
        {
            "recipientId": "84754526",
            "role": "cc",
            "tabs": [],
            "name": "Bob CarbonCopied",
            "email": "bob.carboncopy@example.com"
        }],
        "customFields": []
    },
{
        "recipients": [{
            "recipientId": "39542944",
            "role": "signer",
            "tabs": [],
            "name": "Carol NextUser",
            "email": "carol.nextuser@example.com"
        },
        {
            "recipientId": "84754526",
            "role": "cc",
            "tabs": [],
            "name": "Dave NextCarbon",
            "email": "dave.nextcarbon@example.com"
        }],
        "customFields": []
    }]