Skip to main content

Create a Single Signer Notarization

This help page will guide you through the process of uploading a document and creating a notarization session with a single signer using the Notarization API. You'll need your API access token to proceed.

Requirements

  1. You need to have Node.js installed on your system.
  2. You'll also need the axios and form-data libraries. You can install them using the following command:
npm install axios form-data

Step 1: Upload Document

Use the following code snippet to upload a document. Replace <accessToken> with your API access token and provide the path to the PDF document you want to upload.

const axios = require("axios");
const FormData = require("form-data");
const fs = require("fs");

const filePath = "path/to/your/document.pdf";

const formData = new FormData();
formData.append("file", fs.createReadStream(filePath));

const config = {
method: "post",
url: "https://public-api.enotarylog.com/documents/upload",
headers: {
Authorization: "Bearer <accessToken>",
...formData.getHeaders(),
},
data: formData,
};

axios(config)
.then(function (response) {
console.log("Document uploaded successfully:", response.data);
// Proceed to Step 2: Create a Notarization Session
})
.catch(function (error) {
console.log(error);
});

Step 2: Create a Notarization Session

After successfully uploading the document, use the file URL from the response in the following code snippet to create a notarization session with a single signer. Replace <accessToken> with your API access token and <fileUrl> with the file URL obtained from the document upload response.

const axios = require("axios");

const data = {
notarizationType: "ron",
taggingOrganizationId: null,
primarySigner: [
{
id: "<signer uuid>",
firstName: "Signer",
lastName: "One",
email: "signer1@example.com",
},
],
documents: [
{
docId: "<document uuid>",
fileUrl: "<fileUrl>",
title: "Sample Document",
description: "This is my sample document description",
tags: [],
},
],
};

const config = {
method: "post",
url: "https://public-api.enotarylog.com/v2/notarizations",
headers: {
Authorization: "Bearer <accessToken>",
"Content-Type": "application/json",
},
data: JSON.stringify(data),
};

axios(config)
.then(function (response) {
console.log("Notarization session created successfully:", response.data);
})
.catch(function (error) {
console.log(error);
});

Steps to Execute the Code Snippets

  1. Create a new file named upload_document_and_create_notarization.js.
  2. Copy and paste the code snippets provided above into the new file, placing the second snippet inside the .then function of the first snippet after the console.log statement.
  3. Replace <accessToken> with your API access token, provide the path to the PDF document you want to upload, and replace <fileUrl> with the file URL obtained from the document upload response.
  4. Provide <uuid>, a 128-bit value that is 36 characters in length, for the "docId" and signer "id" parameters.
  5. Save the file and open a terminal or command prompt.
  6. Navigate to the folder where you saved the upload_document_and_create_notarization.js file.
  7. Run the following command to execute the script:
node upload_document_and_create_notarization.js

If the requests are successful, you'll see messages indicating that the document was uploaded successfully and the notarization session was created successfully, along with the respective response data. In case of an error, the error messages will be displayed instead.

Additional Resources

For more information about the Notarization API, visit the official documentation.

If you need further assistance or have questions, feel free to reach out to our support team.