Start from G2L
Overview
This API is built for the customers who wanna integrate our service into the GladToLink The special of G2L is that the request body can't be multi level object, G2L is supported to use only single level object. API request is pretty similar with normal sign start API, the difference is request body object, in this API, you can't use array or multi level object of json.
API detail
Request
- URL:
/g2l/sign/start/{{GUID}}
- Method:
POST
- Content-Type:
application/json
- Body:
{
"flow_type": "priority",
"expiration": 3,
"share_signed_document": true,
"sign_flow": "other",
"sign_method": "no_sms",
"email": "signer.email@legale.io",
"phone": null,
"firstname": "Signer",
"lastname1": "Name",
"lastname2": "Example",
"device_id": "E3EJJ305D-A91E-59FD-8A29-9D2E8C8B9CA4",
"video_validation": false,
"selfie_validation": false,
"id_validation": false,
"is_fingerprint": true,
"is_NID": true,
"x1": 255,
"y1": 255,
"x2": 295,
"y2": 325,
"pageno": 1,
"anchor": "Signer1",
"skip_email": true
}
Value | Type | Is required | Description |
---|---|---|---|
flow_type | str | No | Available values are priority , simultaneously . Default value is priority . If you set this value priority , document sign flow will flow one signer by one signer. This means document will be sent to next signer after completing the current signer's sign flow. If you set this value simultaneously , document will sent to all signer's at the same time, signers can sign document regardless other signers signed or not. |
expiration | int | No | This parameter is to determine the expiration date. It should be number in days. |
share_signed_document | bool | No | This parameter is to determine the email notification after sign. Default value is false . If you set this value as true , all signers will receive signed document email notification after sign process finished. |
signer_list
Value | Type | Is required | Description |
---|---|---|---|
sign_flow | str | Yes | Sign flow type |
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 | No | Signer first name |
lastname1 | str | No | Signer first last name |
lastname2 | str | No | Signer second last name |
device_id | str | No | Device ID of your tablet or mobile device that you wanna send to sign. This parameter is needed when you set sign_method as tablet_sign |
video_validation | bool | Yes | To require the video validation of signer in Remote and Remote SMS method |
selfie_validation | bool | Yes | To require the selfie validation of signer in Remote and Remote SMS |
id_validation | bool | Yes | To require the Identity Documentation validation of signer in Remote and Remote SMS |
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 |
x1 , y1 , x2 , y2 | float | No | Signature image position coordinate. (x1, y1) is the left bottom corner, (x2, y2) is the top right corner. Origin of coordinate is bottom left corner of document. Recommended ratio of width to height of signature image position is 3:1 |
pageno | int | No | Page number of document to insert the signature image in. The first page of document is 1 . |
anchor | str | No | The specific word in your document which you want to put the signature image on. 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. |
skip_email | bool | No | If set true , system will not send an email to remote signer or approver, you can get sign urls from response. |
sign_flow
Available value | Available sign methods | Description |
---|---|---|
me | certification , local_certificate , sms , no_sms | Sign by myself, this means document will be signed by you. In this flow, you are the signer of document |
other | sms , no_sms | Sign by other person, this means document will be signed by other person, not by legale user. |
legale | certification , no_certification | Sign by legale user, this means document will be signed by other legale user. |
approve | approve , approve_legale , approve_api | This flow is to approve document by some persons, not adding digital signature into document, just approve current document sign flow by person. |
tablet | tablet_sign | This flow is to send document to tablet, on the tablet, you can add fingerprint into the document. |
signing_portal | signing_portal | This flow is to send document to sign in signing portal. |
sign_method
Available value | Available sign flows | Description |
---|---|---|
sms | me , other | Sign document using Remote SMS, signer will receive the sign request through his email. In this case, phone number is required, otherwise signer will not be able to receive OTP |
no_sms | me , other | Sign document using Remote, in this case, signer will receive the sign request through his email. No need to pass the phone number |
certification | me , legale | 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 |
no_certification | legale | Sign document using other sign method such as Remote or Remote SMS, in this case, signer can choose his sign method except certification. Signer will receive sign request in his legale account |
local_certificate | me | 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 | approve | This is not digital sign. This method will send document to approver to approve current flow by himself. Approver is not legale user in this case. |
approve_legale | approve | This is not digital sign. This method will send document to approver to approve current flow by himself. Approver should be legale user in this case. |
approve_api | approve | This is not digital sign. You will receive a url from API response in this method, after that, you can approve that document by sending a new POST request to that url. |
tablet_sign | tablet | This is sign method to document to sign in mobile device. |
signing_portal | signing_portal | This is sign method to document to sign in signing portal. After start sign process, you can search and sign the documents from here. |
Response
Success
- Status code:
200
- Body:
{
"data": "https://app.legale.io/api/remote/3470cf1d-dddd-4b59-a22f-445aaef913d2/0",
"code": null,
"message": ""
}
Error
- Status code:
400
- Body:
{
"code": "INVALID_DOCUMENT_STATUS",
"message": "Document is already in sign flow",
}
Error code | Type | Description |
---|---|---|
INVALID_DOCUMENT_STATUS | str | Document is already in another status, you can start sign flow with only document of sign_status 0. |