Action

This file integrates the functions that allow you to carry out a document signing process with SigningHub. This file is responsible for exporting the following functions:

v1/packages

Creates an empty SigningHub package.

Header Parameters

Header Parameters

Description

Content-Type (string)

Default: application/json

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken (string)

The authorization token used to validate the API.


Body Schema

Body Variable

Description

packageName (string)

The name of the package that will be used to identify it, in emails, website and other places

packageToken (string)

Unique token to identify and authenticate a specific packet on the system. (It is not currently supported by SigningHub)

{

  "packageName": "{{tmp_package_name}}",

  "packageToken": ""

}


Responses

httpCode

Response schema

Description

200

packageId

Unique identifier assigned to the package created in SigningHub. It is a string of characters that uniquely identifies the package within the SigningHub system.

recipients

This is a list of recipients of the package. The array is empty because we have only created the package and no recipient has been assigned to it yet.

status

It is the current state of the package. The status is "DRAFT", which means the package is in a draft state and has not yet been completed or shipped.

{

    "packageId": "string",

    "recipients": "array",

    "status": "string"

}


httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

403

Forbidden (See error list)

500

Internal Server Error (See error list)


/v1/packages/{packageID}/documents

Adds documents to a certain package.

Header Parameters

Header Parameters

Description

Content-Type (string)

Default: application/json

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Body Schema

Body Variable

Description

documentId (string)

Unique identifier assigned to the document in SigningHub. It is a string of characters that uniquely identifies the document within the SigningHub system.

documentName (string)

This is the name of the document.

documentType (string)

This field indicates the type of document.

mimeType

(string)

This is the MIME content type of the document.

Editable

(boolean)

This field indicates whether the document is editable or not.

Content

(string)

This field contains the content of the document. Content is a base64 encoded string that represents the content of the document in PDF form.

[{

       "documentId":"string",

       "documentName":"string",

       "documentType":"string",

       "mimeType":"string",

       "editable":"boolean",

       "content":"string"

}]

Responses

httpCode

Response schema

Description

200

documentId (string)

Unique identifier assigned to the document in SigningHub. It is a string of characters that uniquely identifies the document within the SigningHub system.

documentName (string)

This is the name of the document.

documentType (string)

This field indicates the type of document.

mimeType

(string)

This is the MIME content type of the document.

Editable

(boolean)

This field indicates whether the document is editable or not.

Content

(string)

This field contains the content of the document. Content is a base64 encoded string that represents the content of the document in PDF format

[{

       "documentId":"string",

       "documentName":"string",

       "documentType":"string",

       "mimeType":"string",

       "editable":"boolean",

       "content":"string"

},

{

       "documentId":"string",

       "documentName":"string",

       "documentType":"string",

       

}]



httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

403

Forbidden (See error list)

500

Internal Server Error (See error list)


v1/packages/{{packageID}}/recipient

Adds recipients to a package.

Header Parameters

Header Parameters

Description

Content-Type (string)

Default: application/json

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Body Schema

Body Variable

Description

name (string)

This property contains the name of the recipient

email (string)

This property contains the email address of the recipient

type (string)

The type of the recipient. (VIEWER, SIGNER)

- A viewer can only open the package in read only mode.

- A signer is required to fill forms and add signatures.

status (string)

This is the status of the package.

  • DRAFT: The package has not yet been sent.
  • SENT: The package has been sent.
  • COMPLETED: The recipient has signed or viewed the package, according to whether their type is respectively a SIGNER or VIEWER
  • DECLINED: The recipient has declined to sign the package.
  • CANCELLED: The package has been cancelled/withdrawn/voided

[

       {

               "name":"Test 0",

               "email":"user97@example.com",

               "type":"SIGNER",

               "status":"DRAFT"

       },

       {

               "name":"Test 1",

               "email":"user25@example.com",

               "type":"SIGNER",

               "status":"DRAFT"

       }

]

Responses

httpCode

Response schema

Description

200

name (string)

This property contains the name of the recipient

email (string)

This property contains the email address of the recipient

type (string)

The type of the recipient. (VIEWER, SIGNER)

           - A viewer can only open the package in read only mode.

           - A signer is required to fill forms and add signatures.

status (string)

This is the status of the package.

  • DRAFT: The package has not yet been sent.
  • SENT: The package has been sent.
  • COMPLETED: The recipient has signed or viewed the package, according to whether their type is respectively a SIGNER or VIEWER
  • DECLINED: The recipient has declined to sign the package.
  • CANCELLED: The package has been cancelled/withdrawn/voided

[

       {

               "name":"Test 0",

               "email":"user97@example.com",

               "type":"SIGNER",

               "status":"DRAFT"

       },

       {

               "name":"Test 1",

               "email":"user25@example.com",

               "type":"SIGNER",

               "status":"DRAFT"

       }

]


httpCode

message

400

Bad request (See error list)

403

Forbidden (See error list)

404

Not found (See error list)

500

Internal Server Error (See error list)


/v1/packages/{{packageID}}/senderview?returnUrl={{url}}

Get the URL of the SigingHub sender view.

Header Parameters

Header Parameters

Description

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Responses

httpCode

Response schema

Description

200

url (string)

The URL of the SigningHub sender view

{

    "url": "string"

}


httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

403

Forbidden (See error list)

404

Not found (See error list)

500

Internal Server Error (See error list)


/v1/packages/{{packageID}}/send

Function that allows you to send a package so that senders can sign it. Signature placeholders need to have been added.

Header Parameters:


Header Parameters

Description

Content-Type (string)

Default: application/json

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Responses:

httpCode

Response schema

Description

204

This function doesn’t return anything in the response


httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

500

Internal Server Error (See error list)


/v1/packages/{{packageID}} 

This function allows you to return an entire packet.

Header Parameters:

Header Parameters

Description

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Responses:

httpCode

Response schema

Description

200

status (string)

Indicates the status of the package. The status can have the following values:

- COMPLETED

- CREATED

- DRAFT

- PROCESSING

- CANCELLED

packageId (string)

It is the unique identifier of the package

Recipients (array)

It is an array that contains information about the recipients of the package. Each recipient is represented as an object with the following properties:

Email (string)

The recipient's email address

Type (string)

The type of recipient. The types of recipients are these: VIEWER, SIGNER

Status (string)

The status of the recipient in relation to the package

{

    "status": "string",

    "packageId": " string ",

    "recipients": [

        {

            "email": "string",

            "type": "string",

            "status": "string"

        }

    ]

}


httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

403

Forbidden (See error list)

404

Not found (See error list)

500

Internal Server Error (See error list)


/v1/packages/{{packageID}}/summary

This function returns the package summary events.

Header Parameters:

Header Parameters

Description

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Responses:

httpCode

Response schema

Description

200

summaryElements (array)

It is an array that contains the package history summary elements. Each element in this array represents an action performed in the package history

messageType (string)

It is the type of message associated with the action taken in the package history

message (string)

It is the message associated with the action taken in the package history

{

    "summaryElements": [

        {

            "messageType": "CREATED",

            "message": "dev@r7st.onmicrosoft.com"

        },

        {

            "messageType": "CREATED",

            "message": "dev@r7st.onmicrosoft.com"

        }

    ]

}


httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

404

Not found (See error list)

500

Internal Server Error (See error list)


/v1/packages/{{packageID}}/documents:

This function allows the user to get the documents for a given package, irrespective of when/how they were added to the package and irrespective of whether they have been signed.

Header Parameters:

Header Parameters

Description

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Responses:

httpCode

Response schema

Description

200

documentId (string)

Unique identifier assigned to the document in SigningHub. It is a string of characters that uniquely identifies the document within the SigningHub system.

documentName (string)

This is the name of the document.

documentType (string)

This field indicates the type of document.

mimeType

(string)

This is the MIME content type of the document.

Content

(string)

This field contains the content of the document. Content is a base64 encoded string that represents the content of the document in PDF format

[

    {

        "documentId": "string",

        "documentName": "string",

        "documentType": "string",

        "mimeType": "string",

        "content": "string"

    },

    {

        "documentId": "676024",

        …

    }

]


httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

403

Forbidden (See error list)

404

Not found (See error list)

500

Internal Server Error (See error list)

/v1/packages/{{packageID}}/documents/{{documentID}}?include_document_content=true

This function is used to get a specified document.

Header Parameters:

Header Parameters

Description

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Responses

httpCode

Response schema

Description

200

documentId (string)

Unique identifier assigned to the document in SigningHub. It is a string of characters that uniquely identifies the document within the SigningHub system.

documentName (string)

This is the name of the document.

documentType (string)

This field indicates the type of document.

mimeType

(string)

This is the MIME content type of the document.

Content

(string)

This field contains the content of the document. Content is a base64 encoded string that represents the content of the document in PDF format

{

    "documentId": "string",

    "documentName": "string",

    "documentType": "string",

    "mimeType": "string",

    "content": "string"

}


httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

403

Forbidden (See error list)

404

Not found (See error list)

500

Internal Server Error (See error list)

/v1/packages/{{packageID}}

If the package is not already in a terminal state, the provider must cancel/withdraw/void the package such that it is no longer the source of events such as signing, declining or time-out.

Header Parameters:

Header Parameters

Description

Accept (string)

Default: application/json

userEmail (string)

SigningHub email address identifying the target user account - this can be an Enterprise Admin or an Enterprise User account.

apiAccessToken(string)

The authorization token used to validate the API.

Response:

httpCode

Response schema

Description

200

This function doesn’t retrieve any content


httpCode

message

400

Bad request (See error list)

401

Unauthorized (See error list)

403

Forbidden (See error list)

500

Internal Server Error (See error list)