deleteDoc

delete document

Overview

Parameters:

  • document token- String

Return:

  • DocsResponse - In case of success

  • Exception - In case of failure

To delete a document we will need:

  • set your apiToken;

  • document`s token.

  • call the method;

How to use:

Save your apiToken:

const apiToken: string = "YOUR TOKEN";

Set your original document token:

const docToken: string = "ORIGINAL DOCUMENT TOKEN";

Finally, clal the deleteDoc method to get the DocsResponse or an error message

Example

import DocRequests from "sdk-node-typescript-zapsign/src/docs/DocRequests";
import { JsonConverter } from "sdk-node-typescript-zapsign/src/services/JsonConverter";

async function exempleDeleteDoc() {
    try {
                docResponse: DocResponse = await new DocRequests(apiToken).deleteDoc(docToken, extraDoc);
                jsonDocResponse: string = new JsonConverter().docResponseToJson(docResponse);
                console.log(jsonDocResponse);
    } catch(Err) {
                console.log(Err);
    }
  }
}