const apiToken: string = "YOUR TOKEN";
const docToken: string = "ORIGINAL DOCUMENT TOKEN";
const rubrica1: RubricaBuilder = rubricaBuilder()
.withPage(0)
.withtRelativePositionBottom(52.50)
.withRelativePositionLeft(75.71)
.withRelativeSizeX(19.55)
.withRelativePositionSizeY(9.42)
.withType("signature")
.withSignerToken("SIGNER TOKEN")
.build();
const rubrica2: RubricaBuilder = rubricaBuilder()
.withPage(0)
.withtRelativePositionBottom(13.50)
.withRelativePositionLeft(20.71)
.withRelativeSizeX(19.55)
.withRelativePositionSizeY(9.42)
.withType("signature")
.withSignerToken("SIGNER TOKEN")
.build();
let rubricas = RubricaBuilder[];
rubricas.push(rubrica1, rubrica2);
const rubricasArray = new RubricaArray(rubricas);
Call the placeSignatures method to get the response`s status code or an error message:
async function exempleAddExtraDoc() {
try {
statusCode: number = await new DocRequests(apiToken).placeSignatures(docToken, rubricasArray);
console.log(statusCode);
} catch(Err) {
console.log(Err);
}
}
}
import DocRequests from "sdk-node-typescript-zapsign/src/docs/DocRequests";
import { JsonConverter } from "sdk-node-typescript-zapsign/src/services/JsonConverter";
import { RubricaBuilder } from "sdk-node-typescript-zapsign/src/body/doc/builders/RubricaBuilder";
import { RubricasArray } from "sdk-node-typescript-zapsign/src/body/doc/RubricasArray";
const apiToken: string = "YOUR TOKEN";
const docToken: string = "ORIGINAL DOCUMENT TOKEN";
const rubrica1: RubricaBuilder = RubricaBuilder()
.withPage(0)
.withtRelativePositionBottom(52.50)
.withRelativePositionLeft(75.71)
.withRelativeSizeX(19.55)
.withRelativePositionSizeY(9.42)
.withType("signature")
.withSignerToken("SIGNER TOKEN")
.build();
const rubrica2: RubricaBuilder = rubricaBuilder()
.withPage(0)
.withtRelativePositionBottom(13.50)
.withRelativePositionLeft(20.71)
.withRelativeSizeX(19.55)
.withRelativePositionSizeY(9.42)
.withType("signature")
.withSignerToken("SIGNER TOKEN")
.build();
let rubricas = RubricaBuilder[];
rubricas.push(rubrica1, rubrica2);
const rubricasArray = new RubricasArray(rubricas);
async function exempleAddExtraDoc() {
try {
statusCode: number = await new DocRequests(apiToken).placeSignatures(docToken, rubricasArray);
console.log(statusCode);
} catch(Err) {
console.log(Err);
}
}
}