Business Document Template


Templates are a great way for your team to utilize same documents to be sent to different signers. Please note this feature is in BETA phase currently.


Requirements

  • OnlineNotary.net Business or Enterprise Account
  • API Key located in Settings Tab on your Account
  • Create Document Template in Business Account

Endpoint

Method URI Headers
POST /client/business-template/{template_uuid} api_token

Params

Name Type Description
signer_fullname string required Full legal name of the signer.
phone string required Phone number of the signer.
email string required An Email Address for the signer.

Data Params

{
    "signer_fullname" : "Dummy Name",
    "phone" : "09123456789",
    "email" : "[email protected]",
}

Sample Response

{info} It would show a different response from the OnlineNotary Api. Its either success, unauthenticated or fail.

Code 200

{success} When a document submitted and if all of the parameters are correct and if at least one signer and one document recipient is defined in your request, you should expect a response code of 200.

One of the most important response variables that you should be aware of is notary_url. The notary_url allows you to pass a particular website URL directly to your customer to begin they're notarization process using their smartphone, tablet, or a laptop device

{
  "status": "created",
  "notary": {
    "id": "D1ABA240-EBA3-11EA-BC2F-7B226F89AACF",
    "filename": "sample.pdf",
    "recipients": [
      {
        "email": "[email protected]",
        "fullname": "John Doe"
      }
    ],
    "signers": [
      {
        "notary_url": "https://app.onlinenotary.net/sign/u/business-template/D1B70D90-EBA3-11EA-8A85-913E2CB86DAE/1B653330-D6B5-11EA-8451-6D34E32743D6",
        "fullname": "John Doe",
        "email": "[email protected]",
        "turn": 1
      }
    ]
  }
}

Code 400

{danger} Error response can't find document

{
    "success": false,
    "error": {
        "code": 0,
        "message": "Unable to find document template."
    }
}

Code 400

{danger} If one of the required parameters is not submitted you should expect one of the following responses back from our API endpoint

{
    "success": false,
    "error": {
        "code": 0,
        "message": "Unauthenticated."
    }
}

PHP Code Sample

$client = new Client();
$api_key = '{api_token}';
$url = 'https://production.onlinenotary.net/api/v1/client/business-template/{template_uuid}';         
$response = $client->request('POST', $url , 
[
    'multipart' => [
        [
            'name'     => 'signer_fullname',
            'contents' =>  'Joe Doe'
        ], 
        [
            'name'     => 'phone',
            'contents' => '123456789'
        ],
        [
            'name'     => 'email',
            'contents' => '[email protected]'
        ]
    ],
    'auth' => [
        null,
        $api_key
    ],
]);