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.
Value | Type | Is required | Description |
---|---|---|---|
folder | str | No | Folder path that you wanna to save document in. |
If folder structure is not matched to current existing structure, system will create it. | |||
file_name | str | No | Custom file name of the document. |
signers
Value | Type | Is required | Description |
---|---|---|---|
sign_method | str | Yes | Sign method you wanna to use to sign document |
email | str | Yes | Signer email |
phone | str | No | Signer phone to use receive OTP. This parameter is needed when you set sign_method as sms |
firstname | str | Yes | Signer first name |
lastname1 | str | Yes | Signer first last name |
lastname2 | str | No | Signer second last name |
anchor | str | Yes | The 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_id | str | No | Tablet or mobile device ID that you can get from this request. This parameter is needed when you set sign_method as tablet_sign |
is_fingerprint | bool | No | To require fingerprint when you sign document on mobile device. This parameter is needed when you set sign_method as tablet_sign |
is_NID | bool | No | To 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 | str | No | Sign 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 value | Description |
---|---|
no_sms | Sign document using Remote, in this case, signer will receive the sign request through his email. No need to pass the phone number |
sms | Sign 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 |
certification | Sign 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_certificate | Sign 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. |
approve | This 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_legale | This 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_sign | This 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"
]
...