5.17 Packagelist (Paginated)
5.17.1 Description
Get a list of packages with their current status. This can be useful for periodic cleaning.
This method uses paging so only a limited number of records is returned at a time (currently limited to maximum 50 records). Query parameters are then used to specify how many items to return and which page to continue with. Further parameters (sorting, sort order) can be seen below.
Note that the ContinuationToken is meant to be opaque to clients – either give an empty value for the first page or pass a token which was returned from a previous request. Trying to generate it on the client may not be supported in future versions when the format changes.
Note that currently the response will always contain a continuation token, even if there are no more records. The client is responsible for counting the number of items seen before and comparing it with the Total parameter in the response to know when to stop making calls.
5.17.2 URL
https://[servername]:[port]/webportalapi/v3/packages
5.17.3 HTTP Method
GET
5.17.4 MIME Type
application/json
5.17.5 Query parameters
Parameter | Occurrence | Content / Description | Type |
---|---|---|---|
ContinuationToken | Optional | Token which holds information about which set of records needs to be returned. | String |
MaxQuantity | Optional | Maximum number of records. | Int |
SortField | Optional | Sort the returned records by the field which is specified. (Reserved for future use) | String |
SortOrder | Optional | ‘ASC’ or ‘DESC’ to specify in which way sorting happens. (Reserved for future use) | String |
CreatedBeforeDate | Optional | Displays only the packages created before this date. ISO 8601 date format. | Date |
Status | Optional | Returns only those packages which have the requested status. The possible statuses are: draft, pending, finished, rejected, revoked, failed. |
String |
5.17.6 Response parameters
Parameter | Content / Description | Type |
---|---|---|
ContinuationToken | Token which allows the client to retrieve the next set of records. | String |
MaxQuantity | The highest number of records that the result may contain. Useful when no quantity was given in the request (default subject to change). | Int |
Total | Number of records found in the database. The client can use the quantity and total to calculate the number of calls needed to retrieve all records. | Int |
Items | List of packages. | Array of objects |
Parameter | Content / Description | Type |
---|---|---|
Items (array of objects) | Array, 0..* | Array of objects |
PackageId | Package id for this package | String |
PackageStatus | Status of the package as a whole: Draft Pending Finished Rejected Revoked Failed Note: a package has the status Failed when a background operation has failed and left a message on the Poison Queue. |
String |
ExternalPackageReference | Reference given by the calling application. This will not be used by eSignatures. | String |
5.17.7 Example response
Take for example the following GET request:
https://[host]/webportalapi/v3/packages?MaxQuantity=2&ContinuationToken=
{
"ContinuationToken": "68036c7f-db6c-4dd0-bc1d-cb7337b2259f",
"Items": [
{
"Id": "c3940cf6-fa80-441f-8971-55af6d00fb9d",
"PackageStatus": "DRAFT",
"ExternalPackageReference": "INVOICE-18-0048"
},
{
"Id": "0eeaa964-4197-41aa-9d6e-875b8e6d1a92",
"PackageStatus": "PENDING",
"ExternalPackageReference": "INVOICE-18-0009"
}
],
"MaxQuantity": 2,
"Total": 21
}
5.17.8 Response codes
Response status code | Description |
---|---|
200 OK | The packagelist gets returned successfully. |
400 Bad Request | A request parameter was invalid. |
5.17.9 Error codes
HTTP code | Code |
---|---|
400 | Pagination.MaxQuantity.OutOfBounds |