嵌入式标志使用docusign没有模板ID

时间:2016-10-24 10:45:23

标签: docusignapi

我创建了一个表单,这些表单存储在数据库中并生成一个pdf我希望使用嵌入式rest api登录此PDF,我可以使用templateID完成此操作,但我不使用我想要使用的模板我自己的pdf签名..

我使用下面的代码来使用templateId

$data = array("accountId" => $accountId, 
    "emailSubject" => "DocuSign API - Embedded Signing Example",
    "templateId" => $templateId, 
    "templateRoles" => array(
        array( "roleName" => $templateRoleName, 
                "email" => $emailSender, 
                "name" => $recipientName, 
                "clientUserId" => $clientUserId
            )
        ),
    "status" => "sent"); 

谢谢

1 个答案:

答案 0 :(得分:0)

您是否已阅读DocuSign Developer Center了吗?这里有一个功能部分,其中包含嵌入式签名(和发送),其中显示了一个不使用模板的示例。

您想要创建一个如下所示的请求:

{
    "status": "sent",
    "emailSubject": "Envelope with Embedded Signer",
    "documents": [{
        "documentId": "1",
        "name": "contract.pdf",
        "documentBase64": "base64 document bytes...",
    }],
    "recipients": {
        "signers": [{
            "email": "john@email.com",
            "name": "John Doe",
            "recipientId": "1",
            "clientUserId": "1234"
        }]
    }
}

请参阅embedded signing部分。