getDocs

list documents

Overvie

return:

  • DocsResponse - In case of success

  • Exception - In case of failure

To get the documents data we will need:

  • set your apiToken;

  • document`s token;

  • call the method

How to use:

Save your apiToken:

const apiToken: string = "YOUR TOKEN";

Call the getDocs 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 exempleAddExtraDoc() {
    try {
            docResponse: DocResponse = await new DocRequests(apiToken).getDocs();
            jsonDocResponse: string = new JsonConverter().docsResponseToJson(docResponse);
            console.log(jsonDocResponse);
        } catch(Err) {
            console.log(Err);
        }
}

Last updated