Uploading documents for signature
The Uploading Documents for Signature feature allows you to integrate, through the SDK, the secure upload of documents that need to be electronically signed.
Integration Examplesβ
For the integration, it is necessary to have an <iframe id='iframeId'>
element where the SDK will be rendered, and the AucoSDK function must be provided with the ID of this element.
Follow the link to see the reference of the events required for an SDK integration: ππ» Events
Basic Integrationβ
import { AucoSDK } from 'auco-sdk-integration';
const unsubscribe = AucoSDK({
iframeId: 'iframeId',
sdkType: 'upload',
language: 'es', // Accepted languages ββ'es' | 'en'
keyPublic: 'prk_xxxxx', // Company private key needed to create the process
events: {
onSDKReady,
onSDKClose,
onSDKToken,
},
sdkData: {
userAttributes: {
email: 'admin@company.com', // Email of user registered in Auco, recommended use company admin's email
},
uxOptions: {
primaryColor: '#021c30',
alternateColor: '#a557f2',
},
},
env: process.env.PUBLIC_ENVIRONMENT == 'dev' ? 'DEV' : 'PROD',
});
Integration with pre-loaded signers (STABLE)β
This method will be deprecated in the future, it is recommended to use the method detailed in the next item.
Follow the link to see the reference of accepted countries and document types ππ» Documents and countries
import { AucoSDK } from 'auco-sdk-integration';
const unsubscribe = AucoSDK({
iframeId: 'iframeId',
sdkType: 'upload',
language: 'es', // Accepted languages ββ'es' | 'en'
keyPublic: 'prk_xxxxx', // Company private key required for process creation
events: {
onSDKReady,
onSDKClose,
onSDKToken,
},
sdkData: {
userAttributes: {
email: 'admin@company.com', // Email of user registered in Auco, recommended use company admin's email
},
users: [
{
name: 'Signer';
email: 'signer@auco.ai';
phone: '+573151234567';
country: 'CO';
id: '1234567890';
idType: 'CC';
}
],
uxOptions: {
primaryColor: '#021c30',
alternateColor: '#a557f2',
},
},
env: process.env.PUBLIC_ENVIRONMENT == 'dev' ? 'DEV' : 'PROD',
});
Integration with pre-loaded signersβ
This feature is only available from v1.0.0 onwards
Follow the link to see the reference of accepted countries and document types ππ» Documents and countries
import { AucoSDK } from 'auco-sdk-integration';
const unsubscribe = AucoSDK({
iframeId: 'iframeId',
sdkType: 'upload',
language: 'es', // Accepted languages ββ'es' | 'en'
keyPublic: 'prk_xxxxx', // Company private key needed to create the process
events: {
onSDKReady,
onSDKClose,
onSDKToken,
},
sdkData: {
userAttributes: {
email: 'admin@company.com', // Email of user registered in Auco, recommended use company admin's email
},
flowData: {
type: 'participants',
participants: [
{
id: 'id1',
type: 'signer',
name: 'Signer',
email: 'signer@auco.ai',
phone: '+573161979572',
country: 'CO',
identification: '123',
identificationType: 'CC',
locked: true, // This participant cannot be edited or deleted.
},
{
id: 'id2',
type: 'approver',
name: 'Approver',
email: 'approver@auco.ai',
phone: '+573161979572',
country: 'CO',
identification: '1234',
identificationType: 'CC',
},
{
id: 'id3',
type: 'reader',
name: 'Reader',
email: 'reader@auco.ai',
locked: true, // This participant cannot be edited or deleted.
},
],
},
uxOptions: {
primaryColor: '#021c30',
alternateColor: '#a557f2',
},
},
env: 'DEV',
});
Integration with pre-filled flowβ
In this type of integration, when opening the SDK, the user only needs to enter the signatures.
This feature is only available from v1.0.0 onwards
Follow the link to see the reference of accepted countries and document types ππ» Documents and countries
import { AucoSDK } from 'auco-sdk-integration';
const unsubscribe = AucoSDK({
iframeId: 'iframeId',
sdkType: 'upload',
language: 'es', // Accepted languages 'es' | 'en'
keyPublic: 'prk_xxxxx', // Company private key required for process creation
events: {
onSDKReady,
onSDKClose,
onSDKToken,
},
sdkData: {
userAttributes: {
email: 'admin@company.com', // Email of user registered in Auco, recommended use company admin's email
},
flowData: {
type: 'complete',
files: [file1, file2], // Array of documents to be uploaded (type File), Auco will join them into a single PDF
emailData: {
name: 'Flujo precargado',
message: 'Mensaje',
subject: 'Sujeto',
expire: new Date(), // (optional) Expiration date of the flow
remember: '48', // (optional) Every how many hours a reminder will be sent
notificationOff: true, // Auco will not send emails to participants.
},
platform: 'whatsapp', // Platform where the signing processes will be carried out ('auco' | 'whatsapp')
validations: {
otpCode: 'phone', // (optional) Medium through which OTP will be sent ('phone' | 'email')
flow: false, // Guided Identity Validation
identification: true, // Identity document validation
identificationCardBack: true, // Rear ID Validation
selfie: true, // Validation with facial photo
},
participants: [
{
id: 'id_1',
type: 'signer',
name: 'Signer',
email: 'signer@auco.ai',
phone: '+573151234567',
country: 'CO',
identificationType: 'CC',
identification: '1234',
},
{
id: 'id_2',
type: 'approver',
name: 'Approver',
email: 'approver@auco.ai',
phone: '+573151234567',
country: 'CO',
identificationType: 'CC',
identification: '1234',
},
{
id: 'id_3',
type: 'reader',
email: 'reader@auco.ai',
name: 'Reader',
},
],
},
uxOptions: {
primaryColor: '#021c30',
alternateColor: '#a557f2',
},
},
env: 'DEV',
});
Basic Editing Integrationβ
In this type of integration, you can edit a document that has not yet been signed; the original document information will be auto-completed.
This feature is only available from v1.0.3 onwards.
import { AucoSDK } from 'auco-sdk-integration';
const unsubscribe = AucoSDK({
iframeId: 'iframeId',
sdkType: 'upload',
language: 'es', // Accepted languages: 'es' | 'en'
keyPublic: 'prk_xxxxx', // Company private key required for process creation
events: {
onSDKReady,
onSDKClose,
onSDKToken,
},
sdkData: {
userAttributes: {
email: 'admin@company.com', // Email for registered Auco user. It is recommended to use the company admin email
},
flowData: {
type: 'edit',
code: 'CODEDOCUM',
},
uxOptions: {
primaryColor: '#021c30',
alternateColor: '#a557f2',
},
},
env: 'DEV',
});
Integration for editing with overwritingβ
In this type of integration, you can edit a document that has not yet been signed and overwrite the original document information in the integration.
This feature is only available from v1.0.3 onwards.
If the integration overwrites all the original document information (files, emailData, platform, validations, and participants), when opening the SDK, the user will only need to place the signatures.
import { AucoSDK } from 'auco-sdk-integration';
const unsubscribe = AucoSDK({
iframeId: 'iframeId',
sdkType: 'upload',
language: 'es', // Accepted languages ββ'es' | 'en'
keyPublic: 'prk_xxxxx', // Company private key required for process creation
events: {
onSDKReady,
onSDKClose,
onSDKToken,
},
sdkData: {
userAttributes: {
email: 'admin@company.com', // Email of the user registered with Auco. It is recommended to use the company admin email
},
flowData: {
type: 'edit',
code: 'CODEDOCUM',
files: [file1], // Optional - Array of documents (type File) to upload
emailData: {...}, // Optional - Email and/or reminder settings
platform: 'whatsapp', // Optional - Platform where the signature will be made ('auco' | 'whatsapp')
validations: {...}, // Optional - Validations
participants: [...], // Optional - List of participants to overwrite the originals
},
uxOptions: {
primaryColor: '#021c30',
alternateColor: '#a557f2',
},
},
env: 'DEV',
});