DocuSign 请求错误 "Envelope definition missing."

DocuSign Request error "Envelope definition missing."

我正在尝试使用 DocuSign REST api/v2 发出 'createAndSendEnvelope' 请求。我的 JSON 有效。

我遇到了同样的问题,我尝试了那里给出的解决方案,即我确保所有新行都使用“\r\n”。

我在这里错过了什么?这是我的请求,我收到错误代码,"message":"The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line. Envelope definition missing."

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": "xxxxx@gcpa.com"
        }]
    },
    "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

您可以在 documentBase64 属性

中指定您的 base64 编码文档字节

POST https://demo.docusign.net/restapi/v2/accounts/xxxxx/envelopes HTTP/1.1 X-DocuSign-身份验证:{"Username":"xxxxxx","Password":"xxxxx","IntegratorKey":"xxxxxx"}

内容类型:application/json

{
 "status": "sent",
 "recipients": {
    "signers": [{
        "tabs": {
                <Removed tabs for brevity>
        },
        "routingorder": "1",
        "rolename": "roleNameHere",
        "recipientid": "1",
        "name": "XXXXXXXXXX",
        "email": "xxxxx@gcpa.com"
    }]
 },
 "emailsubject": "TestDocuSign Call",
 "emailBlurb": "Test Email Blurb",
 "documents": [{
    "name": "Name1",
    "fileExtension": ".pdf",
    "documentId": "1",
    "documentBase64": "VGhpcyBpcyBh"
 }]
}