Skip to content

Latest commit

 

History

History
131 lines (85 loc) · 3.92 KB

File metadata and controls

131 lines (85 loc) · 3.92 KB

.DocumentSettingsApi

All URIs are relative to https://api.pandadoc.com

Method HTTP request Description
documentSettingsGet GET /public/v2/documents/{document_id}/settings Get document settings
documentSettingsUpdate PATCH /public/v2/documents/{document_id}/settings Update document settings

documentSettingsGet

DocumentSettingsResponse documentSettingsGet()

Retrieves the settings for a specified document. Supported fields: language, qualified_electronic_signature, expires_in (in days).

Example

import * as pd_api from 'pandadoc-node-client';

// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
    { authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.DocumentSettingsApi(configuration);

const body:pd_api.DocumentSettingsApiDocumentSettingsGetRequest = {
  // string | Unique identifier of the document to retrieve settings for.
  documentId: "BhVzRcxH9Z2LgfPPGXFUBa",
};

apiInstance.documentSettingsGet(body).then((data) => {
  console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));

Parameters

Name Type Description Notes
documentId [string] Unique identifier of the document to retrieve settings for. defaults to undefined

Return type

DocumentSettingsResponse

Authorization

apiKey, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully retrieved document settings. -

[Back to top] [Back to API list] [Back to README]

documentSettingsUpdate

DocumentSettingsResponse documentSettingsUpdate(updateDocumentSettingsRequest)

Updates the settings for a specified document. Supported fields: language, qualified_electronic_signature, expires_in (in days).

Example

import * as pd_api from 'pandadoc-node-client';

// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
    { authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.DocumentSettingsApi(configuration);

const body:pd_api.DocumentSettingsApiDocumentSettingsUpdateRequest = {
  // string | Unique identifier of the document to update settings for.
  documentId: "BhVzRcxH9Z2LgfPPGXFUBa",
  // UpdateDocumentSettingsRequest
  updateDocumentSettingsRequest: {
    language: "en-US",
    qualifiedElectronicSignature: true,
    expiresIn: 1,
  },
};

apiInstance.documentSettingsUpdate(body).then((data) => {
  console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));

Parameters

Name Type Description Notes
updateDocumentSettingsRequest UpdateDocumentSettingsRequest
documentId [string] Unique identifier of the document to update settings for. defaults to undefined

Return type

DocumentSettingsResponse

Authorization

apiKey, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully updated document settings. -

[Back to top] [Back to API list] [Back to README]