即使将DefaultRecipient设置为true,TransformPdfField也不起作用

时间:2015-05-29 21:27:04

标签: docusignapi

我有一个带有一些签名和文本表单字段的pdf。在docusign appdemo链接上传这个pdf以及用docusign标签替换这些字段,这意味着pdf很好。但是当我使用docusign api rest call(v2)发送相同的pdf时,它会在没有标签的情况下发送文档。我发送的json结构如下所示,文件的transformPdfFields和收件人的DefaultRecipient设置为true:

{
"EnvelopeId":null,
"EmailBlurb":"You have some documents to be signed...",
"EmailSubject":"Please Sign",
"Status":"Sent",
"CompositeTemplates":
[{
	"InlineTemplates":
	[{
		"Sequence":"1",
		"Documents":
		[{
			"DocumentId":"1",
			"Name":"Agreement.pdf",
			"DocumentFields":[],
			"TransformPdfFields":"true",
			"Order":"1",
			"FileExtension":"pdf",
			"DocumentBase64":"fileContent"
		}],
		"Recipients":
		{
			"Signers":
			[{
				"RecipientId":"8",
				"SignedDateTime":null,
				"Status":null,
				"Email":"test@test.com",
				"Name":"Vidhi Khanna",
				"DefaultRecipient":"true",
				"CustomFields":null
			}]
		}
	}]
}]
}

我也尝试使用json结构创建相同的东西并使用文档发送信封(即不涉及模板),但这也不起作用。

P.S。我应该提到的一件事是我正在使用测试开发人员帐户进行集成。是否可能未为模拟帐户启用此功能?

1 个答案:

答案 0 :(得分:2)

transformPdfFields功能仅在CompositeTemplate中直接用于文档元素时才有效。例如:

{
"EnvelopeId":null,
"EmailBlurb":"You have some documents to be signed...",
"EmailSubject":"Please Sign",
"Status":"Sent",
"CompositeTemplates":
[{
    "InlineTemplates":
    [{
        "Sequence":"1",
        "Recipients":
        {
            "Signers":
            [{
                "RecipientId":"8",
                "SignedDateTime":null,
                "Status":null,
                "Email":"test@test.com",
                "Name":"Vidhi Khanna",
                "DefaultRecipient":"true",
                "CustomFields":null
            }]
        }
    }],
    "document":
    {
        "DocumentId":"1",
        "Name":"Agreement.pdf",
        "DocumentFields":[],
        "TransformPdfFields":"true",
        "Order":"1",
        "FileExtension":"pdf",
        "DocumentBase64":"fileContent"
    }
}]
}