1.0.1 • Published 9 months ago

osten-verse-sign v1.0.1

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
9 months ago

AssinAPIs

Welcome to documentation of AssinAPI in this readme you gonna get a starter guide to use the API to install and usage

  1. Before Install
  2. Installation
  3. Configuration
  4. Documents
  5. Envelopes
  6. Signers
  7. Tags

Before Install

Before you start to install and code, you need to have access to:

  • Public Key
  • Secret Key
  • UserID

All of this things you can have access in our portal Assin.

Installation

To install our library:

  npm install osten-verse-sign

or

  yarn add osten-verse-sign

Configuration

To start the connection with API use this function:

  const assinApi = new Routers(yourPublicKey, yourUserId,
    yourSecretKey, 'http://localhost:3000/v1');

Documents

To list your Documents use this function:

  const allDocuments = await assinApi.listDocuments()

To create a new Document use this function:

  const document = await assinApi.createDocument({
    alias: 'name of document',
  });

Envelopes

To list your Envelopes use this function:

  const allEnvelopes = await assinApi.listEnvelopes()

To Create a new Envelope use this function:

  const envelope = await assinApi.createEnvelope({
    title: 'name of envelope',
    description: 'description of envelope',
  });

To Attach a Document in Envelope use this function:

  const addDocsInEnvelope = await assinApi.addDocumentsInEnvelope(envelope.id, [
    { id: document.id },
  ]);

To Remove a Document of Envelope use this function:

  const removeDocsFromEnvelope = await assinApi.removeDocumentsInEnvelope(envelope.id, [
  { id: document.id },
  ]);

To Close Envelope use this function:

const closeEnvelope = await assinApi.closeEnvelope(envelope.id);

To Cancel Envelope use this function:

const cancelEnvelope = await assinApi.cancelEnvelope(envelope.id);

Signers

To Add a new signer in your Envelope use this function:

  const signer = await assinApi.createEnvelopeSigner(envelope.id, {
    fullName: 'Joe Doe',
    email: 'joedoe@email.com',
    signatureType: SignatureType.PARTY,
    requirePersonalDocument: false,
    requireEmailToken: false,
    order: 0,
  });

To Remove an signer from your Envelope use this function:

  const removeSigner = await assinApi.deleteEnvelopeSigner(envelope.id, {
    signerId: signer.signerId
  });

Tags

To Add a new tag to a signer in your Envelope use this function:

  const tag = await assinApi.createTag(envelope.id, {
    envelopeSignerId: signer.signerId,
    envelopeDocumentsId: document.id,
    angle: 0,
    elementType: ElementType.SIGNATURE,
    content: 'New Tag',
    axisX: 0,
    axisY: 0,
    page: 0,
  });

To Remove an signer from your Envelope use this function:

const removeTag = await assinApi.deleteTag(envelope.id, tag.id)

This API uses our library of filters, If you wanna use advanced filter see more details.