使用docusign rest api将单个文档发送到多个邮件ID

时间:2016-10-19 09:33:36

标签: php docusignapi

php -S localhost:80

我将上面的代码用于单个邮件ID及其工作,但我想为一个模板使用多个电子邮件ID

1 个答案:

答案 0 :(得分:0)

签名者节点是一个数组,所以只需将另一个签名者对象添加到数组中,例如,这里有相应的JSON,用于发送给2个不同的收件人,并为每个签名者分配一个签名选项卡:

{
    "emailSubject": "Please sign this document...",
    "emailBlurb": "Sent from the DocuSign API",
    "status": "sent",
    "documents": [{
        "documentId": "1",
        "name": "test.pdf"
    }],
    "recipients": {
        "signers": [{
            "email": "sallydoe@email.com",
            "name": "Sally Doe",
            "recipientId": "1",
            "tabs": {
                "signHereTabs": [{
                    "xPosition": "100",
                    "yPosition": "200",
                    "documentId": "1",
                    "pageNumber": "1"
                }]
            }
        }, {
            "email": "johndoe@email.com",
            "name": "John Doe",
            "recipientId": "2",
            "tabs": {
                "signHereTabs": [{
                    "xPosition": "100",
                    "yPosition": "300",
                    "documentId": "1",
                    "pageNumber": "1"
                }]
            }
        }]
    }
}