Docusign 与锚标签的集成
Docusign integration with anchor tags
我有一个有效的 Docusign 集成,通过将坐标传递给 Docusign API。
但是,我想改用应该支持的锚标记 - 但每次更改它时,我都会从 Docusign 收到一条错误消息:
{
"errorCode": "NO_DOCUMENT_RECEIVED",
"message": "The document element did not contain the encoded document, or there is a problem with the encoding. Bytes for document corresponding to documentId 1 not found in request. 'documentId=<x>' possibly missing from Content-Disposition header."
}
我看到其他帖子也有这个错误,但它们总是由请求正文的构建方式引起的。但是,我没有对请求的其余部分进行任何更改 - 我只是从使用坐标更改为锚标记。
工作要求:
{"status":"sent","emailBlurb":"<EMAIL BODY GOES HERE>","emailSubject":"subject","documents":[{"name":"DocumentNameCanBeCustomised","documentId":1,"order":null}],"recipients":{"signers":[{"email":"User@example.com","name":"David","recipientId":1,"tabs":{"signHereTabs":[{"documentId":1,"xPosition":100,"yPosition":100,"pageNumber":1}],"approveTabs":[]},"routingOrder":null}]}}
请求失败:
{"status":"sent","emailBlurb":"<EMAIL BODY GOES HERE>","emailSubject":"subject","documents":[{"name":"DocumentNameCanBeCustomised","documentId":1,"order":null}],"recipients":{"signers":[{"email":"user@example.com","name":"David","recipientId":1,"tabs":{"signHereTabs":[{"documentId":1,"anchorString":"PO box 459","anchorXOffset":"0","anchorYOffset":"0","anchorIgnoreIfNotPresent":"false","anchorUnits":"inches"}],"approveTabs":[]},"routingOrder":null}]}}
如有任何建议,我们将不胜感激 - 完整的请求如下,除了 JSON.
之外,两个请求都相同
POST https://demo.docusign.net:7802/restapi/v2/accounts/688891/envelopes
Content-Length: 67039
Content-Type: multipart/form-data; boundary=BOUNDARY
Accept: application/json
Expect: 100-continue
Host: demo.docusign.net
X-DocuSign-Authentication: {"Username":"X979d5e3-778a-4a2b-b4d5-a91025d5f7ba","Password":"[omitted]","IntegratorKey":"[omitted]"}
X-Forwarded-For: 81.133.16.170
--BOUNDARY
Content-Type: application/json
Content-Disposition: form-data
{"status":"sent","emailBlurb":"blurb","emailSubject":"subject","documents":[{"name":"DocumentNameCanBeCustomised","documentId":1,"order":null}],"recipients":{"signers":[{"email":"David@example.com","name":"David","recipientId":1,"tabs":{"signHereTabs":[{"anchorString":"userid below this","anchorXOffset":"0","anchorYOffset":"0","anchorIgnoreIfNotPresent":"false","anchorUnits":"inches"}],"approveTabs":[]},"routingOrder":null}]}}
--BOUNDARY
Content-Type: application/pdf
Content-Disposition: file; filename="Contract.pdf"; documentId=1
%PDF-1.5
%{{BYTES REMOVED}}
--BOUNDARY--
400 BadRequest
Content-Type: application/json; charset=utf-8
{ "errorCode": "NO_DOCUMENT_RECEIVED",
"message": "The document element did not contain the encoded document, or there is a problem with the encoding. Bytes for document corresponding to documentId 1 not found in request. 'documentId=<x>' possibly missing from Content-Disposition header."}
谢谢,
大卫
我建议您将特定字符串添加到文档中以用作锚点。例如“<>”(然后将其文本颜色更改为白色,这样您就不会在文档中看到它。)
我在使用现有文本作为锚点时遇到了问题,尤其是其中包含空格的文本。
另一个提示:尝试使用 web browser DocuSign app 创建一个信封,使用相同的文档,签名字段使用锚文本。
有关详细信息,请参阅 recipe。
我有一个有效的 Docusign 集成,通过将坐标传递给 Docusign API。
但是,我想改用应该支持的锚标记 - 但每次更改它时,我都会从 Docusign 收到一条错误消息:
{
"errorCode": "NO_DOCUMENT_RECEIVED",
"message": "The document element did not contain the encoded document, or there is a problem with the encoding. Bytes for document corresponding to documentId 1 not found in request. 'documentId=<x>' possibly missing from Content-Disposition header."
}
我看到其他帖子也有这个错误,但它们总是由请求正文的构建方式引起的。但是,我没有对请求的其余部分进行任何更改 - 我只是从使用坐标更改为锚标记。
工作要求:
{"status":"sent","emailBlurb":"<EMAIL BODY GOES HERE>","emailSubject":"subject","documents":[{"name":"DocumentNameCanBeCustomised","documentId":1,"order":null}],"recipients":{"signers":[{"email":"User@example.com","name":"David","recipientId":1,"tabs":{"signHereTabs":[{"documentId":1,"xPosition":100,"yPosition":100,"pageNumber":1}],"approveTabs":[]},"routingOrder":null}]}}
请求失败:
{"status":"sent","emailBlurb":"<EMAIL BODY GOES HERE>","emailSubject":"subject","documents":[{"name":"DocumentNameCanBeCustomised","documentId":1,"order":null}],"recipients":{"signers":[{"email":"user@example.com","name":"David","recipientId":1,"tabs":{"signHereTabs":[{"documentId":1,"anchorString":"PO box 459","anchorXOffset":"0","anchorYOffset":"0","anchorIgnoreIfNotPresent":"false","anchorUnits":"inches"}],"approveTabs":[]},"routingOrder":null}]}}
如有任何建议,我们将不胜感激 - 完整的请求如下,除了 JSON.
之外,两个请求都相同POST https://demo.docusign.net:7802/restapi/v2/accounts/688891/envelopes
Content-Length: 67039
Content-Type: multipart/form-data; boundary=BOUNDARY
Accept: application/json
Expect: 100-continue
Host: demo.docusign.net
X-DocuSign-Authentication: {"Username":"X979d5e3-778a-4a2b-b4d5-a91025d5f7ba","Password":"[omitted]","IntegratorKey":"[omitted]"}
X-Forwarded-For: 81.133.16.170
--BOUNDARY
Content-Type: application/json
Content-Disposition: form-data
{"status":"sent","emailBlurb":"blurb","emailSubject":"subject","documents":[{"name":"DocumentNameCanBeCustomised","documentId":1,"order":null}],"recipients":{"signers":[{"email":"David@example.com","name":"David","recipientId":1,"tabs":{"signHereTabs":[{"anchorString":"userid below this","anchorXOffset":"0","anchorYOffset":"0","anchorIgnoreIfNotPresent":"false","anchorUnits":"inches"}],"approveTabs":[]},"routingOrder":null}]}}
--BOUNDARY
Content-Type: application/pdf
Content-Disposition: file; filename="Contract.pdf"; documentId=1
%PDF-1.5
%{{BYTES REMOVED}}
--BOUNDARY--
400 BadRequest
Content-Type: application/json; charset=utf-8
{ "errorCode": "NO_DOCUMENT_RECEIVED",
"message": "The document element did not contain the encoded document, or there is a problem with the encoding. Bytes for document corresponding to documentId 1 not found in request. 'documentId=<x>' possibly missing from Content-Disposition header."}
谢谢, 大卫
我建议您将特定字符串添加到文档中以用作锚点。例如“<
我在使用现有文本作为锚点时遇到了问题,尤其是其中包含空格的文本。
另一个提示:尝试使用 web browser DocuSign app 创建一个信封,使用相同的文档,签名字段使用锚文本。
有关详细信息,请参阅 recipe。