Sha256: e53fd049cac7635b3d491683808d6d44ecc4b38c171fedc624fd9d12729b5ac1

Contents?: true

Size: 1.69 KB

Versions: 1

Compression:

Stored size: 1.69 KB

Contents

import * as HelloSignSDK from "hellosign-sdk";

const api = new HelloSignSDK.SignatureRequestApi();

// Configure HTTP basic authorization: api_key
api.username = "YOUR_API_KEY";

const signerList1Signer: HelloSignSDK.SubSignatureRequestTemplateSigner = {
  role: "Client",
  name: "George",
  emailAddress: "george@example.com",
  pin: "d79a3td",
};

const signerList1CustomFields: HelloSignSDK.SubBulkSignerListCustomField = {
  name: "company",
  value: "ABC Corp",
};

const signerList1: HelloSignSDK.SubBulkSignerList = {
  signers: [ signerList1Signer ],
  customFields: [ signerList1CustomFields ],
};

const signerList2Signer: HelloSignSDK.SubSignatureRequestTemplateSigner = {
  role: "Client",
  name: "Mary",
  emailAddress: "mary@example.com",
  pin: "gd9as5b",
};

const signerList2CustomFields: HelloSignSDK.SubBulkSignerListCustomField = {
  name: "company",
  value: "123 LLC",
};

const signerList2: HelloSignSDK.SubBulkSignerList = {
  signers: [ signerList2Signer ],
  customFields: [ signerList2CustomFields ],
};

const cc1: HelloSignSDK.SubCC = {
  role: "Accounting",
  emailAddress: "accounting@example.com",
};

const data: HelloSignSDK.SignatureRequestBulkCreateEmbeddedWithTemplateRequest = {
  clientId: "1a659d9ad95bccd307ecad78d72192f8",
  templateIds: ["c26b8a16784a872da37ea946b9ddec7c1e11dff6"],
  subject: "Purchase Order",
  message: "Glad we could come to an agreement.",
  signerList: [ signerList1, signerList2 ],
  ccs: [ cc1 ],
  testMode: true,
};

const result = api.signatureRequestBulkCreateEmbeddedWithTemplate(data);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling HelloSign API:");
  console.log(error.body);
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hellosign-ruby-sdk-6.0.0.pre.beta oas/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.ts