Error creating DocuSign Envelope via DocuSign Rest API (with multiple documents and multiple recipients)

后端 未结 1 437
时光取名叫无心
时光取名叫无心 2021-01-16 10:19

I am trying to create an Envelope in DocuSign with multiple documents using the DocuSign REST API, I\'m using a multipart/form-data request, I use JSON to define the attribu

1条回答
  •  被撕碎了的回忆
    2021-01-16 10:55

    You shouldn't need these lines that define a second boundary (or any of the subsequent references to that second boundary):

    Content-Disposition: form-data
    Content-Type: multipart/mixed; boundary=e8bc9555e9634110bba63547b2552460
    

    Try removing that (and all subsequent references to boundary e8bc9555e9634110bba63547b2552460), so that your request looks like this:

    POST https://demo.docusign.net/restapi/v2/accounts/295724/envelopes HTTP/1.1
    X-DocuSign-Authentication: {"Username":"email","Password":"password","IntegratorKey":"key"}
    Content-Type: multipart/form-data; boundary=9a56da749dc04804819460f6499ab80b
    Accept: application/json
    Host: demo.docusign.net
    Content-Length: 31476
    Expect: 100-continue
    
    --9a56da749dc04804819460f6499ab80b
    Content-Type: application/json
    Content-Disposition: form-data
    
    JSON_REQUEST_BODY_HERE
    --9a56da749dc04804819460f6499ab80b
    Content-Type:application/pdf
    Content-Disposition: file; filename="ABC.pdf"; documentid=1 
    
    DOCUMENT_1_BYTES_HERE
    --9a56da749dc04804819460f6499ab80b
    Content-Type:application/pdf
    Content-Disposition: file; filename="AB.pdf"; documentid=2 
    
    DOCUMENT_2_BYTES_HERE
    --9a56da749dc04804819460f6499ab80b--
    

    0 讨论(0)
提交回复
热议问题