Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Configuration
✓ import { Configuration } from 'pandadoc-node-client';
✗ const Configuration = require('pandadoc-node-client').Configuration;
Used to configure the SDK client with API key and other settings. Since v6, this package primarily targets ESM, though CJS may work via transpilation. Use `import` for best practice.
DocumentsApi
✓ import { DocumentsApi } from 'pandadoc-node-client';
✗ import DocumentsApi from 'pandadoc-node-client/dist/documents';
This is a key service class for interacting with document-related endpoints. All API service classes are named imports.
CreateDocumentFromTemplateRequest
✓ import { CreateDocumentFromTemplateRequest } from 'pandadoc-node-client';
TypeScript types for request bodies and response payloads are exported directly from the package, enabling strong type checking.
Demonstrates initializing the PandaDoc client with an API key and fetching a list of existing documents.
import { Configuration, DocumentsApi } from 'pandadoc-node-client';
const PANDADOC_API_KEY = process.env.PANDADOC_API_KEY ?? '';
async function listPandaDocDocuments() {
if (!PANDADOC_API_KEY) {
console.error('PANDADOC_API_KEY environment variable is not set.');
process.exit(1);
}
const config = new Configuration({
apiKey: PANDADOC_API_KEY,
basePath: 'https://api.pandadoc.com'
});
const documentsApi = new DocumentsApi(config);
try {
console.log('Fetching PandaDoc documents...');
const response = await documentsApi.listDocuments();
console.log(`Successfully retrieved ${response.results?.length ?? 0} documents.`);
if (response.results && response.results.length > 0) {
console.log('First document ID:', response.results[0].id);
console.log('First document Name:', response.results[0].name);
}
return response.results;
} catch (error) {
console.error('Failed to fetch documents:', error);
if (error.response?.data) {
console.error('API Error Details:', error.response.data);
}
throw error;
}
}
listPandaDocDocuments();
Debug
Known issues
breakingVersion 7.0.0-rc.1 and subsequent release candidates introduce significant breaking changes and major new features. It updates the client to match OpenAPI Specification version 7.15.0, resulting in potential API endpoint and payload changes.fixReview the full changelog for v7.0.0-rc.1 and later RCs, especially regarding changes to content library, document sections, and auto reminders APIs. Migrate code carefully and test thoroughly before deploying to production.
affects: >=7.0.0-rc.1
gotchaThe 7.x series is currently in release candidate (RC) status. While actively developed, it should be used with caution in production environments as APIs and behavior may still change before the final stable release.fixFor production applications, it is recommended to stick with the latest stable 6.x release until version 7.0.0 is officially released. If using 7.x RCs, pin exact versions to avoid unexpected changes from subsequent RCs.
affects: >=7.0.0-rc.1
breakingIn version 6.0.0, the `name` field for the 'create document from template' payload became optional, and `detect_title_variables` was added as an optional parameter to detect variables in the document name.fixAdjust document creation payloads to account for the `name` field becoming optional and consider using `detect_title_variables` if dynamic titles are required. Review API calls related to document creation from templates.
affects: >=6.0.0 <7.0.0-rc.1
gotchaThis SDK is an OpenAPI generated client. Major version updates in the underlying PandaDoc API specification can lead to breaking changes in the SDK's methods, parameters, and return types, even if not explicitly highlighted in the changelog as 'breaking'.fixAlways review the changelog and the official PandaDoc API documentation when upgrading to new major versions of the SDK. Leverage TypeScript to catch type mismatches during development.
affects: >=1.0.0
Errors
Common errors & fixes
PandaDoc API Error: Authentication failed. Invalid API key provided.
The API key configured for the client is either missing, incorrect, or has expired.
fixEnsure the `apiKey` property in your `Configuration` object is set to a valid, active PandaDoc API key. Check your PandaDoc developer settings for the correct key.
TypeError: Class constructor DocumentsApi cannot be invoked without 'new'
Attempting to call an API service class (e.g., `DocumentsApi`) as a function instead of instantiating it with `new`, or incorrect `require` usage for an ESM-first package.
fixAlways instantiate API service classes using the `new` keyword: `const documentsApi = new DocumentsApi(config);`. Ensure you are using ESM `import` statements if targeting modern Node.js environments.
TS2345: Argument of type '{ /* ... */ }' is not assignable to parameter of type 'CreateDocumentFromTemplateRequest'.
The object provided as an argument to an API method does not match the expected TypeScript interface for that request payload.
fixConsult the `CreateDocumentFromTemplateRequest` (or relevant) TypeScript interface in the SDK's types, and the PandaDoc API documentation, to ensure your payload object strictly adheres to the required structure and types.
Audit
Dependencies
No dependency data recorded yet.