Skip to main content

Workflow

Overview

You can start Workflow from Smart Document by using this API.
The API will return you the URL of remote sign methods.

API detail

Request

  • URL: /smart-document/{{id}}/workflow/
  • Method: POST
  • Content-Type: application/json
  • Body:
{
"variables": {
"1": "Value1",
"2": "Value2",
"folder": "Contract/Company1",
"file_name": "Contract1",
"callback_url": "https://your.service.com/callback",
"callback_key": "your_callback_key",
},
"signers": [
{
"email": "signer1.legale.io",
"sign_method": "no_sms",
"phone": null,
"firstname": "Test",
"lastname1": "Test",
"lastname2": "Test",
"video_validation": false,
"selfie_validation": false,
"id_validation": false,
"anchor": "Test",
"device_id": null,
"is_fingerprint": true,
"is_NID": true,
"sign_status_callback_url": "https://your.service.com/status_callback"
}
],
"shared_list": [
"shared.person@gmail.com",
],
}
  • variables
    variable is JSON object. key should be variable number of variable of template. If you no specify variables, it will use blank string.
ValueTypeIs requiredDescription
folderstrNoFolder path that you wanna to save document in.
If folder structure is not matched to current existing structure, system will create it.
file_namestrNoCustom file name of the document.
  • signers
ValueTypeIs requiredDescription
sign_methodstrYesSign method you wanna to use to sign document
emailstrYesSigner email
phonestrNoSigner phone to use receive OTP. This parameter is needed when you set sign_method as sms
firstnamestrYesSigner first name
lastname1strYesSigner first last name
lastname2strNoSigner second last name
anchorstrYesThe specific word in your document which you want to put the signature image on. Maximum 63 characters are allowed. The start point of anchor text will be the top left corner of the signature image. The sign image size will be 180 * 60 px rectangle by default.
device_idstrNoTablet or mobile device ID that you can get from this request. This parameter is needed when you set sign_method as tablet_sign
is_fingerprintboolNoTo require fingerprint when you sign document on mobile device. This parameter is needed when you set sign_method as tablet_sign
is_NIDboolNoTo require national ID image when you sign document on mobile device. This parameter is needed when you set sign_method as tablet_sign
sign_status_callback_url strNoSign callback URL of your service to get back the callback request of every sign status, system will send to this url the sign status
  • sign_method
Available valueDescription
no_smsSign document using Remote, in this case, signer will receive the sign request through his email. No need to pass the phone number
smsSign document using Remote with SMS verification, in this case, signer will receive the sign request through his email. phone is required to use this method
certificationSign document using cloud certificate, in this case, signer can be you or other legale person. Signer will receive sign request in his legale account
local_certificateSign document using local certificate, in this case, signer can be you or other legale person. Signer will receive sign request in his legale account. Signer should have his local certificate. This method is working on only Windows 10 for now.
approveThis is not digital sign. This method will send document to approver to approve current flow by himself. email is not legale user in this case.
approve_legaleThis is not digital sign. This method will send document to approver to approve current flow by himself. email should be legale user in this case.
tablet_signThis is sign method to document to sign in mobile device. device_id is required to use this method
  • shared_list
    Email list that you wanna share signed document with.

Response

Success

  • Status code: 200
  • Body:
[
"https://app.legale.io/api/remote/96171f93-2577-49c4-a905-425c01ea9c57/57198253"
]
...