1
我正在嘗試使用DocuSign REST api/v2創建'createAndSendEnvelope'請求。我的JSON是有效的。DocuSign請求錯誤「信封定義丟失」。
我遇到了同樣的問題,我嘗試了在那裏給出的解決方案,即我確保所有新行都使用'\ r \ n'。
我在這裏錯過了什麼?這是我的請求,我收到錯誤代碼,「消息」:「信封不完整,完整的信封需要文檔,收件人,選項卡和主題行,缺少信封定義。
POST https://demo.docusign.net/restapi/v2/accounts/xxxxx/envelopes HTTP/1.1
X-DocuSign-Authentication: {"Username":"xxxxxx","Password":"xxxxx","IntegratorKey":"xxxxxx"}
Content-Type: multipart/form-data; boundary=AAA
Accept: application/json
Host: demo.docusign.net
Content-Length: 90500
Expect: 100-continue
--AAA
Content-Type: application/json
Content-Disposition: form-data
{
"status": "sent",
"recipients": {
"signers": [{
"tabs": {
"signHeretabs": [{
"yPosition": "15",
"xPosition": "249",
"width": "100",
"tablabel": null,
"required": "TRUE",
"recipientId": "1",
"pagenumber": "1",
"fontSize": "Size12",
"font": "Calibri",
"documentid": "1",
"anchorYoffset": null,
"anchorXOffset": null,
"anchorUnits": "pixels",
"anchorString": "Sign Here",
"anchorIgnoreIfNotPresent": "true"
}],
"initialsTabs": [{
"yPosition": "45",
"xPosition": "249",
"width": "100",
"tablabel": null,
"required": "TRUE",
"receipientId": "1",
"pagenumber": "1",
"fontSize": "Size12",
"font": "Calibri",
"documentId": "1",
"anchorYoffset": null,
"anchorXOffset": null,
"anchorUnits": "pixels",
"anchorString": "Initials Here",
"anchorIgnoreIfNotPresent": "true"
}],
"dateSignedTabs": [{
"yPosition": "65",
"xPosition": "249",
"width": "100",
"tablabel": null,
"required": "TRUE",
"receipientid": "1",
"pagenumber": "1",
"fontSize": "Size12",
"font": "Calibri",
"documentid": "1",
"anchorYoffset": "-5",
"anchorXOffset": null,
"anchorUnits": "pixels",
"anchorString": "Date Signed",
"anchorIgnoreIfNotPresent": "true"
}]
},
"routingorder": "1",
"rolename": "roleNameHere",
"recipientid": "1",
"name": "XXXXXXXXXX",
"email": "[email protected]"
}]
},
"emailsubject": "TestDocuSign Call",
"emailBlurb": "Test Email Blurb",
"documents": [{
"name": "Name1",
"fileExtension": ".pdf",
"documentId": "1",
"documentBase64": null
}]
}
--AAA
Content-Type: application/octet-stream
Content-Disposition: file; filename="Name1.pdf"; documentid="1"
Content-Transfer-Encoding: base64
VGhpcyBpcyBh
我試過specifyin g ** documentBase64 **屬性中的文檔字節,但仍然會出現相同的錯誤。我正在嘗試從Java等主流語言以及SalesForce Apex這個請求,我認爲這不應該導致這個問題。我希望錯誤消息更具體。 – Genius2007
您是否將內容類型更改爲application/json? –
是我did.Below是我request.removed選項卡,以節省空間 --AAA 內容類型:應用程序/ JSON 內容處置:表格數據 { \t「狀態」:「發送」, \t「收件人「:{ \t \t 」簽名者「:[{}, \t \t \t}] \t}, \t 」Emailsubject的「: 」TestDocuSign呼叫「, \t 」emailBlurb「: 」測試郵件的Blurb「, \t 「文檔」:[{ \t \t 「姓名」: 「NAME1」, \t \t 「fileExtension」: 「.PDF」, \t \t 「documentId」: 「1」, \t \t 「documentBase64」:「VGhpcyBpcyBhIHNhbXBsZSBmaWxlIHVwbG9hZCBmb3IgdGVzdGluZy4 =「 \t}] } --AAA-- –
Genius2007