Tight integration
Sample Request
https://api.signinghub.com/authenticate |
||
Verb |
POST |
|
Content-Type |
application/x-www-form-urlencoded |
|
Accept |
application/json |
|
Request Body |
grant_type=password& client_id=application_name& client_secret=API_Key& username=enterprise_admin_email& password= enterprise_admin_password |
Here, the application_name, and API_Key is taken from SigningHub > Enterprise menu > Integrations whereas enterprise_admin_email and enterprise_admin_password is your enterprise admin’s credentials.
Sample Response
Response Code |
Message | Response Body | |
200 |
OK |
{
access_token: "access_token_admin", |
The received access_token_admin is used in the register user call below.
The password field must be encrypted that is provided in request body, while integrating this within your business application.
Step 6 - Register an Enterprise User via the API (Coding, Optional):
Sample Request
https://api.signinghub.com/v3/enterprise/users |
||
Verb |
POST |
|
Content-Type |
application/json |
|
Accept |
application/json |
|
Authorization |
Bearer access_token_admin |
|
Request Body |
{ user_email: "john@ascertia.com", } |
Sample Response
Response Code |
Message | Response Body | |
201 |
Created |
{ } |
Sample Request
https://api.signinghub.com/authenticate |
||
Verb |
POST |
|
Content-Type |
application/x-www-form-urlencoded |
|
Accept |
application/json |
|
Request Body |
grant_type=password& client_id=application_name& client_secret=API_Key& username=enterprise_admin_email& password= enterprise_admin_password |
Sample Response
Response Code |
Message | Response Body | |
201 |
OK |
{
access_token: "access_token_user", |
Sample Request
https://api.signinghub.com/v3/packages |
||
Verb |
POST |
|
Content-Type |
application/json |
|
Accept |
application/json |
|
Authorization | Bearer access_token_admin |
|
Request Body |
{ package_name: "New Package" } |
Sample Response
Response Code |
Message | Response Body | |
200 |
OK |
{
package_id: 123 |
https://api.signinghub.com/v3/packages/{package_id}/documents/library/{document_id} |
||
Verb |
POST |
|
Content-Type |
application/json |
|
Accept |
application/json |
|
Authorization | Bearer access_token_user |
|
Request Body |
{ } |
Response Code |
Message | Response Body | |
200 |
Created |
{ document_id: document_id_new, enabled: true }, template: {
|
https://api.signinghub.com/v3/packages/{package_id}/documents/{document_id_new}/template |
||
HTTP Verb |
POST |
|
Content-Type |
application/json |
|
Accept |
application/json |
|
Authorization | Bearer {access_token_user} |
|
Request Body |
{ template_name: "sales contract template", apply_to_all: true } |
Response Code |
Message | Response Body | |
200 |
OK |
{ 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 }, }
|
https://api.signinghub.com/v3/packages/{package_id}/workflow |
||
Verb |
POST |
|
Content-Type |
application/json |
|
Accept |
application/json |
|
Authorization | Bearer access_token_user |
|
Request Body |
Sample Response
Response Code |
Message | Response Body | |
200 |
Created |
[{ package_id: 12, documents: [123, 124, 125] }, { package_id: 13, documents: [123, 124, 125] }, { package_id: 14, documents: [123, 124, 125] }]
|
https://api.signinghub.com/ v3/links/integration |
||
Verb |
POST |
|
Content-Type |
application/json |
|
Accept |
application/json |
|
Authorization | Bearer access_token_user |
|
Request Body |
{ package_id:"12345", language:"en-US", user_email: "joe@gmail.com", callback_url:"https://web.signinghub.com/", collapse_panels: "true", usercertificate_id: "31585" } |
Sample Response
Response Code |
Message | Response Body | |
200 |
OK |
"https://web.signinghub.com/Integration?q=QUVTMjU2LUdDTTm7sHn5UnS-2B-MB9OYT4MM4iHd4nGT-2B-3lkpLq-2B-15xg8av10bU807OEkv9fOc7jm1wsnDS1aAxCAUhEkrxup3BVNMknwQPgMGHlAAE4tdR8MbbBzbF8”
|
<
html
>
<
body
>
<!-- Your Web Application Header Here -->
<
iframe
id
=
"id_sh_iframe"
name
=
" sh_iframe"
width
=
"100%"
height
=
"100%"
src
=
https
://web.signinghub.com/Integration?
q
=
QUVTMjU2LUdDTV6zwGuNqpNNIOqrQtz0WRwPC5B
-2F-PYd-2B-0EkqpT5C6JxzABo4Js0-2B- ngad2q3o3zTBmTLpTdWxHybLRakyTsgMLEC6OOxMSlqC612rr1QgfBxOPqeyubHzgNmcE22w6f-2B-xEmbomY4-2F-2TSUj92ROfQhZg-2F- JWQ3vwXMzmTjXQsheSJzJaMNuULbyik50fDWyY8oNVx31G2tiU8-2B-3W7emvEPMWtebqZFefK9icLjonwATdZfkfUKk4f8qxapEsnbwxnk24W6qb0QIXQYnw3aOIqqLowJFzlOX- 2F-ZIkdAoggLWzHXUNKeSC9bwfBvZumXU-2B-BIztM5kEAAPWHEXXNLB3bY8rrbmkYzXhMArGJRuP0L1F1jzamG0EsgW4me-2F-FpVQL6YQSLtoOpH-2B- pQMWh7pV3U2xVIY1mqvNsoGwTW3ZJQBvmZl3qMjUITnBYNxpx9WgHjxSCkLHZSp1fMjdqOyg3-2B-lY2fyV8ogpLZFXEEr-2B- vatyNbE8ogAZDay8pec6bFA7YsA2FyuZFCMvHif9hD510- 2F-Jd7Kxs9HmyjsaRJhWGu6kb9BhfFl-2F-4ROZqz3TpVSXRW-2F-wXcIj07Imq-2F- 6zEdP4NRDI2wmJbpuZk8ZMuf6yeyjTGswhVlW-2F-Js-2B-vm0aQuUSjcJKm3FZbhhwcFQWaOubyS9ZYlbjdCBavSwSHOC2N2LYC6PpxFRBWquKBL6JXy1DbVDTc3-2B--2F- RK4SrP0RH0gf3oHZHBaJtdWX1WgbkJEmfUneKQ5RzgP9AH4F4Crrfr65jCKZhWfj2cjMglT54V0igjo4nLmk2pWlmdWn3pEkQ6v4SLH3tuiQQCcVjtL96STJwBykMoAN-2F- CCdQjOSuz8toX23cO7eO0ZtkF3rHNHkfc0lQaiM0y8FPrwrKiBdXOFavUwNq-2F-ZlklgHjHTOAI1A7Z7v9wyTW3f4uNRR6Em0NJupJO0rvriX8unl7q-2F- 9FzyFutfwRe95cedcglV/>
<!-- Your Web Application Footer Here -->
<
body
>
</
html
>
If the business application requires electronic signatures, then as explained previously, there is no need to create Enterprise Users. Hence, in the above web service request body simply provide parameter value under ’user_email’ (e.g. joe@gmail.com). Here the value is the email address of user who is going to process the document.
user_email: “joe@gmail.com”Append Parameters | |
Name |
Description |
package_id | The ID of the package that was used to generate integration URL for encrypted data and shown to the user in call back URL. |
action |
Provides information about the action the user performed on the document. The possible values are:
|
Step 14 - Check Workflow Status (Coding):
Once the document has been shared and the workflow is in progress, the document owner may want to see the current status of the workflow. The status of workflow at any time can be checked by using the Get Workflow Details API. Click here for details.
Step 15 - Download Package/Document (Coding):
- If the workflow consists of multiple documents, then you can use the Download Package API call to download the package as a zip file as explained here.
- If the workflow consists of just a single document, then the business application can download the signed document using the Download Document API call as explained here.