WeSignature

POST connect to wesignature api
https://app.wesignature.com/apihandler/login_api

Lets you connects with WeSignature account and provide you a secret api key.

The generated api key can be used to access other features.

BODY jsondata

email(required)
**************
password (required)
********************

Request

curl POST https://app.wesignature.com/apihandler/login_api

-H 'Accept: application/json'

-H 'Content-Type: application/json'

 -d '{
    
    "email":"*****************",
    "password": "*************"
   
}'

Response

{
    "status":"authorized",
    "message":"success",
    "data":{
        "user":"**************",
        "api_key":"**************"
        }
}
                                            


POST send document api
https://app.wesignature.com/apihandler/senddocumentapi

Lets user to send a document for signature on WeSignature interface.

BODY jsondata

user_id(required)
**************
api_key (required)
********************
sign_type (required)
0 (i sign), 1 (we-sign), 2 (they-sign)
file_list (required)
json containing urls of the file(s) from where it is to be downloaded. example('https://www.domain.com/demoimage.png')
is_for_embedded_signing (required)
0 (embedded and mail signing both),1 (embedded signing true),2 (only mail signing)
keep it 0, for i sign, sign_type
signers (required)
json containing name and email address of signers.
mail_data
json containing mail_subject and mail_message.

Request

curl POST https://app.wesignature.com/apihandler/senddocumentapi

-H 'Accept: application/json'

-H 'Content-Type: application/json'

-d '{
    "user_id":"*****************",
    "api_key": "*************",
    "sign_type": 3,
    "file_list": [
        {
            "file_url": https://www.domain.com/demoimage.png"
        }
    ],
    "is_for_embedded_signing": 0,
    "signers": [
        {
            "name": "Jack",
            "email_address": "jack@demo-mail.com"
        },
        {
            "name": "Jill",
            "email_address": "jill@demo-mail.com"
        }
    ],
    "mail_data":{
    	"mail_subject":"Please Sign the document.",
    	"mail_message":"Kindly sign document immediately."
    }
}'

Response

{
    "status":"success",
    "message":"Document Details",
    "data":
    {
        "guid":"group-xxxxxxxxxxxxxxxxxxxxxxx",
        "document_name":"demoimage.png",
        "document_status":"draft",
        "signature_type":"they-sign",
        "signing_link":"********************",
        "edit_link":"********************",
        "delete_link":"********************",
        "download_link":"********************",
        "SignerMails":[[
        {
            "name":"Jack",
            "email_address":"jack@demo-mail.com"
        },
        {
            "name":"Jill",
            "email_address":"jill@demo-mail.com"
        }]]
    }
}
                                            


POST get sent documents api
https://app.wesignature.com/apihandler/getsentdocumentsapi

Api used to get the document list which are sent by a user for signatures.

Request json data

api_key
api_key which is received using connect to WeSignature api.
user_id
User id of the user.
guid (optional)
guid related to the document.
BODY Json data

Request

curl POST https://app.wesignature.com/apihandler/getsentdocumentsapi

-H 'Accept: */*'

-H "content-type: application/json; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"

-d '{
    "api_key": "*************",
    "user_id": "*************",
    "guid": "*************",
}'

Response

{
    "status":"success",
    "message":{
        "data":[{
            "guid":"group-xxxxxxxxxxxxxxxxxxxxxxx",
            "document_name":"nameofdocumentimage.png",
            "document_status":"draft",
            "signature_type":"they-sign",
            "signing_link":"********************",
            "edit_link":"********************",
            "delete_link":"********************",
            "download_link":"********************",
            "SignerMails":[{
                "email":"signer1@email.com",
                "signaturestatus":"0",
                "name":"Signer1"
            },
            {
                "email":"signer2@email.com",
                "signaturestatus":"0",
                "name":"Signer2"
            },
            {
                "email":"signer3@email.com",
                "signaturestatus":"0",
                "name":"Signer3"
            }]
        }]
    }
}
                                            



POST document status api
https://app.wesignature.com/apihandler/documentstatusapi

To get status of a sent document.

Request json data

api_key
api_key which is received using connect to WeSignature api.
user_id
User id of the user.
guid
guid of the document.
Response Json data

Download link
available only when document is completed.
Signer status
1 (pending), 2 (viewed), 3 (signed and accepted), 4 (rejected).
Document status
1 (out for signature), 2 (cancelled), 3 (completed).

Request

curl GET https://app.wesignature.com/apihandler/documentstatusapi

-H 'Accept: */*'

-d '{
    "api_key": "*************",
    "user_id": "*************",
    "guid": "*************"
}'

Response

{
    "status":"success",
    "message":"document data",
    "data":
    {
        "signature_request_id":"********","request_type":"1","is_embedded":"1","document_status":"1","signature_type":"3","client_id":"*******","userid":"**",
        "signer_data":
            [
                {
                    "signer_status":"1","signer_mail":"test12new@yopmail.com","signer_id":"******"
                },
                {
                    "signer_status":"3","signer_mail":"test1@yopmail.com","signer_id":"*****"
                }
            ]
    }
}
                                            

The document data is only generated when the document is send out for signature and the signer_id will generated only on an is_for_embedded_type 1 request to generate embedded frame for signing.




ERROR error codes

Application responds with these error codes, message and status in json format.

#Error Code Description
500 Internal server error.
401 Unauthorised.
200 Success in api's.
400 Parameters missing.