Upload Document
https://api.signinghub.com/v3/packages/{package_id}/documents |
||
HTTP Verb |
POST |
|
Content–Type |
application/octet-stream |
|
Accept |
application/json |
|
Authorization |
Bearer {access token} |
|
x-file-name |
Test file.pdf |
|
x-convert-document (optional) |
true |
|
x-source |
API |
|
Request Body |
file (binary Stream) |
|
Status Code |
Message |
Response Body |
201 |
Created |
{
"documentid" : 123 }
|
400 |
Bad Request |
{ "Message" : "Request does not contain document" } |
{ "Message" : "Invalid request headers - file name not found" } |
||
{ "Message" : "Only XML document can be uploaded for a workflow which contains at least one XML document" } |
||
401 |
Unauthorized |
{ "Message" : "Request authorization denied" } |
{ "Message" : "User authentication required" } |
||
403 |
Forbidden |
{ "Message" : "Enterprise admin's role does not allow managing integration" } |
{ "Message" : "You are not allowed to perform the requested operation" } |
||
{ "Message" : "Account is disabled" } |
||
{ "Message" : "Your storage limit has been reached" } |
||
{ "Message" : "Could not upload file - it is infected by malware" } |
||
{ "Message" : "Your document upload size limit has been reached" } |
||
500 |
Internal Server Error |
{ "Message" : "An internal server error occurred while processing the request" } |
Item Details | |
Names |
Description |
Request Parameters |
|
access_token | The access token obtained as a result of successful authentication. If "scope" parameter was used in authentication request, then this service requires the access token to be obtained using the credentials of an Enterprise admin whose enterprise role has the application integration privileges. |
package_id | Package ID of the package to which the document is being added. |
x-file-name |
It's the name of file with extension. |
x-convert-document (optional) |
This identifies whether to convert the document to a PDF or if it should be retained in its original format. Note the only original format supported is currently Word & XML. All other document types will result in an error if this header value is set to "false". If uploading a PDF document this Header can be omitted. |
x-source |
This is the identification of the source of the document from where the document is uploaded, e.g. "My App". |
file(binary) |
This is the document in the raw binary format. |
Response Parameters | |
document_id |
The document ID to be used later to share, download and get status of the document. |
Message | The service specific error message returned by the API. This message provides useful information about why the service has returned an error response. |