This guide’s REST API chapter provides an overview of certain basic API calls. If you want to view all existing calls, see the REST API Object Model. Additional information about the calls can be found on the Developer Community website. That site’s Feature Guides may be especially helpful when you’re building your solution.

Description

Resource Information

Authentication

Either a Cookie header or an Authorization header is required.

Cookie

ESIGNLIVE_SESSION_ID=108259418ff689fc

Authorization

Basic WVdECUMScUZGGGBGOlhVODdGNXFkR253SA==

Optional Query Parameters

query

The set of packages you want to query. The following three options are available: (1) inbox (the query results are the set of packages that satisfy the value of the predefined parameter below); (2) drafts (the query results are the set of all your packages with the following statuses: DRAFT, DECLINED, EXPIRED, OPTED_OUT, OVERVIEW); (3) trashed (the query results are the set of all your trashed packages).

type

Set type=TEMPLATE to return from the list of templates.

search

Any text which is going to be used in conjunction with the searchtype,if provided. Limited to 100 search results at a time.

searchtype

When this field is empty, a wild-card search will be performed using the package name and description for the search value, Otherwise, the allowable values of exact or exactname will make more restrictive searches.

predefined

Predefined search criteria. The following five options are available: (1) awaitingSignature (the signer is the current session user, and the package status is SENT); (2) sent (the current session user is the package owner, and the package status is SENT); (3) completed (the package status is COMPLETED); (4) expiringSoon (the package will expire in expiringSoonDays days, and the package status is SENT); (5) all (the results will be the same as if you applied the previous four values sequentially, and then combined their search results). Note: The parameter expiringSoonDays is the number of days before a package expires that a warning will be sent to participants that the package will soon expire.

visibility

The visibility that will be used to search for templates (this parameter is used only for templates). The possible values are ACCOUNT (default) and SENDER.

lastUpdatedStartDate

The date after which the package must have been last updated to be retrieved

lastUpdatedEndDate

The date before which the package must have been last updated to be retrieved

from

Specify the number of packages returned for the purposes of pagination. Note: A maximum of 100 packages can be returned.

to

sort

The field according to which data will be sorted. Possible fields to sort by are: APPROVAL_ SIGNING_DATE, attributeValue, created, completed, updated, due, and name.

dir

The direction according to which data will be sorted. Give the value asc for ascending, or desc for descending.

Authentication

Path Parameters

packageId

Unique identifier of a OneSpan Sign package

The format of the package ID differs between versions 10.* and 11.* of OneSpan Sign. For example, 5077da9e-0554-475d-8acc-b087007d0be6 is an acceptable v10 ID, while YU2HHW27zbJf2acHN5kmhEb96QQ= is an acceptable v11 ID. Your integration should not depend on the package ID's format. To ensure that this is the case: (1) create a package, and sign it in Sandbox; (2) if an error occurs, note that: (a) the package ID cannot be longer than 255 characters; (b) your integration should treat the package ID as an opaque string.

Example Request

GET https://sandbox.e-signlive.com/api/packages/84174f44-74f0-4e35-af45-6f1792df5972

Path Parameters

Optional Query Parameters

Example Request

GET https://sandbox.e-signlive.com/api/packages/84174f44-74f0-4e35-af45-6f1792df5972/signingStatus

Request Payload

{
"document"="80f36f8dd7e2dea9"
}

Response Payload

If a package has been completed, the Response Payload is the following:

{
"status": "COMPLETED"
}

If a package has been deleted, the Response Payload is the following (any Optional Query Parameter is ignored):

{
"status": "DELETED"
}

If a package has not been completed or deleted, the Response Payload is one the following, depending on the status of the submitted Optional Query Parameter (signer or document). The Response Payload will reflect the signing status of the signer or document.

Example Request

Request Payload

Response Payload

{
"id": "75b125e1-ece3-481e-b8a6-3c2ae39d310a"
}

Create a Package on Behalf of Another User

POST /packages

Description

You can create a package (or template ) on behalf of another user in your account. When you do this, you should specify that user manually, as this will prevent the creator of the package (or template ) from being added to the package (or template) as a signer.

You can set the visibility element to either ACCOUNT or SENDER, depending on if you want the new package to be visible account-wide, or visible just to the sender. The default setting is ACCOUNT.

Create a Package with Document Binaries

POST /packages

Description

Creates a new package, together with document binaries. You can add as many files to the package as you want. Just ensure that the payload specifies the documents in the order in which they were added. Signing Ceremony Settings can be configured when you create or modify a package.

Resource Information

Example Request

POST https://sandbox.e-signlive.com/api/packages/

Request Payload

The Request Payload must: (1) specify fields and signatures using the same types as those given to the fields and signatures inside the package's tagged PDFs; (2) specify fields and signatures using the same names and IDs as those given to the names of the fields and signatures inside the package's tagged PDFs; (3) specify each approval's name and ID using the same name and ID of the associated signature; (4) set the extract flag to true for all relevant documents and fields.

The following error is created if you try to change the ada flag for a package that already contains documents. This error therefore occurs not when you create a package, but only when you update a package.