OneSpan Sign offers the API to upload a document to an existing package, however the request type has to be multipart/form-data and contains the actual bytes of the pdf rather than the base64 representation of it.
HTTP Request
POST /api/packages/{packageId}/documents
HTTP Headers
Accept: text/html
Content-Type: multipart/form-data
Authorization: Basic api_key
Request Body (key : value):
"file": PDF binary data
"payload": JSON payload
Duo
Duo LiangOneSpan Evangelism and Partner Integrations Developer
Reply to: Upload document using application/json
Wednesday, October 21, 2020 at 10:02amHi David,
OneSpan Sign offers the API to upload a document to an existing package, however the request type has to be multipart/form-data and contains the actual bytes of the pdf rather than the base64 representation of it.
HTTP Request
POST /api/packages/{packageId}/documents
HTTP Headers
Accept: text/html
Content-Type: multipart/form-data
Authorization: Basic api_key
Request Body (key : value):
"file": PDF binary data
"payload": JSON payload
Duo
Duo Liang OneSpan Evangelism and Partner Integrations Developer