Home > API Reference > Document Package > Get Packages

Get Packages

Business applications can use this service API to get a list of documents filtered by different statuses. Users can divide the records into pages by providing a number of records per page. 

https://api.signinghub.com/v3/packages/{document_status}/{page_no}/{records_per_page}

HTTP Verb

GET

Accept

application/json

Authorization

Bearer {access_token}

x-folder

SU5CT1g=

x-search-text

c2FsZXMgY29udHJhY3QgMTA1

Request Body

 

Response Headers

 

x-total-records

212

Status Code

Message

Response Body

200

OK

[
   {
      "package_id": 123,
      "package_name": "sales contract 105",
      "package_owner": "john@ascertia.com",
      "owner_name": "John Smith",
      "package_status": "PENDING",
      "folder": "INBOX",
      "unread": false,
      "next_signer": "Sam Crook",
      "next_signer_email": [
         {
            "user_email": "sam@ascertia.com",
            "user_name": "Sam Crook"
         }
      ],
      "uploaded_on": "2015-01-12T11:12:13",
      "modified_on": "2015-01-13T10:10:25"
   }
]

403

Forbidden

{
   "Message": "Document does not belong to user"
}
{
    "Message": "Account is disabled"
}

404

Not Found

{
   "Message": "Document not found"
}

401

Unauthorized

{
   "Message": "Request authorization denied"
}
{
   "Message": "User authentication required"
}

500

Internal Server Error

{
   "Message": "An internal server error occurred while processing the request"
}

The detail of each item provided in the request and response is provided below:

 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_status
Filter by document status possible values are ALL, DRAFT, PENDING, SIGNED, DECLINED, INPROGRESS, EDITED, REVIEWED, COMPLETED.
 
 records_per_page
Number of records that are needed to be fetched in one request.

 page_no
Page number, according the division of records per page.

 x-folder
Folder name from where the documents are to be fetched. Possible values are INBOX and ARCHIVE. Recommended value for x-folder parameter is in Base64 encoded format, however plain english text can also be provided
 x-search-text
Search text sent in headers for further filtration of the documents. Package id, name and document owner can be searched. Recommended value for search text parameter is in Base64 encoded format.
 Response Parameters
 x-total-records Total number of records found with the provided search criteria.

 package_id Package ID of the document package.

 package_name Name of the document package.

 package_owner Email address of the document package owner.

 owner_name Name of the document package owner.

 package_status Document status for the current logged in user. Possible values are "DRAFT", "INPROGRESS", "PENDING", "DECLINED", "APPROVED", "UPDATED" or "COMPLETED".

 folder Name of the folder which contains the document package.

 unread True, if the document is not read by the recipient yet. 

 next_signer The name of the next signer if the document is in shared state.

 next_signer_email An object containing next signers username and email address. In case of group signer it will have a list of email addresses of all the group members.

 next_signer_email  > user_email Email address of the next signer.

 next_signer_email  > user_name Name of the next signer.

 uploaded_on Date and time when the document was uploaded.

 modified_on Date and time when the document was last modified.

 Message The service specific error message returned by the API. This message provides useful information about why the service has returned an error response.

 JSON List
A list of document details for each document. Items of the document details are explained in get document details service.



See also
Add Package
Rename Package
Upload Document
Add Document from Library
Apply Workflow Template
Share Document Package
Change Document Package Owner
Get Document Details
Get Document Image
Get Document Image (base64)
Download Document
Download Document (base64)
Rename Document
Delete Document
Get Certify Policy for a document
Update Certify Policy for a document
Get Package Verification
Get Document Verification
Change Document Order
Delete Package
Download Package
Download Package (base64)
Open Document Package
Close Document Package