Add Document from Library
Business applications can use this service API to add a document from the user’s library to a package. Package ID is provided in the URL, the ID of the document should also be provided as “document_id” in the resource URL to identify the library document to be copied.
Note a package must already exist before you can add a document using this call.
https://api.signinghub.com/v3/packages/{package_id}/documents/library/{document_id} |
||
HTTP Verb |
POST |
|
Content-Type |
application/json |
|
Accept |
application/json |
|
Authorization |
Bearer {access_token} |
|
Request Body |
|
|
Status Code |
Message |
Response Body |
201 |
Created |
{ "document_id" : 123, "document_name" : "sales contract 105" , "document_order" : 1, "document_type" : "PDF" , "document_source" : "My App" , "document_width" : 600, "document_height" : 800, "document_pages" : 12, "uploaded_on" : "2015-01-12T11:12:13" , "modified_on" : "2015-01-13T10:10:15" , "form_fields" : true , "lock_form_fields" : true , "certify" : { "enabled" : true , "permission" : "FORM_FILLING_ALLOWED" }, "template" : { "template_name" : "Sales Contract Template" , "read_only" : true } }
|
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" : "Could not upload file - it is infected by malware" } |
||
{ "Message" : "Your document upload size limit has been reached" } |
||
{ "Message" : "Your storage limit has been reached" } |
||
404 |
Not Found |
{ "Message" : "Document not found in library" } |
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. |
document_id |
The document ID for which the document details are requested. |
package_id | The Package ID of the package to which the document is being added. |
Response Parameters | |
document_id | ID of the newly created document. |
document_name |
The name of the document. |
document_type |
Type of the document e.g. "PDF". |
document_status |
The current status of the document e.g. "COMPLETED". |
document_source |
Identifies where the document was uploaded e.g. "My App". |
document_width |
Width of the document in PDF format. |
document_height |
Height of the document in PDF format. |
document_pages |
Total pages of the document. |
uploaded_on | The date and time when the document was uploaded. |
modified_on |
The date and time when the document was last modified. |
form_fields |
True if document has form fields. |
lock_form_fields | True if locking of form fields with the last signature is enabled. |
certify | Certified signature settings for the document. |
certify > enabled | True if certify signature is enabled for the document. |
certify > permission | It is the certify permissions to be applied on the PDF document when the first signature is created. The possible values are "NO_CHANGES_ALLOWED", "FORM_FILLING_ALLOWED" and "FORM_FILLING_WITH_ANNOTATIONS_ALLOWED". |
template | Template details, if the template is applied on the document. |
template > template_name | Name of the template applied on the document. |
template > read_only | True if the applied template is read only. User will not be able to make any changes if a read only template is applied. |
Message | The service specific error message returned by the API. This message provides useful information about why the service has returned an error response. |