私はDocusign APIへの座標を渡すことによってしばらくの間存在していたDocusign統合を行っています。アンカータグとDocusignインテグレーション
しかし、私は、サポートされているものとする代わりに、アンカータグを使用したい - まだ私はそれを変更するたびに、私が述べ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":"[email protected]","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":"[email protected]","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":"[email protected]","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."}
おかげで、 デビッド
投稿した「作業要求」JSONが無効です。正しい形式のJSONを最初に投稿してください。 – Ergin
それが問題ではないと仮定して、私はあなたがテキスト "" POボックス459 "にアンカーしようとしているのを見ます、それは正しいですか?その特定のテキストがドキュメントのどこにもない場合は、エラーが発生します。 – Ergin
これは、リクエストでドキュメントのバイトが完全に失われているか、ドキュメントの定義方法の定義に問題があることを意味します。より多くのリクエストを含めるようにして、ドキュメントバイトのスニペットを使用してポストを短くすることができます。 –