All URIs are relative to https://api.pandadoc.com
| Method | HTTP request | Description |
|---|---|---|
| createDocumentFields | POST /public/v1/documents/{id}/fields | Create Document Fields |
| listDocumentFields | GET /public/v1/documents/{id}/fields | List Document Fields |
CreateDocumentFieldsResponse createDocumentFields(createDocumentFieldsRequest)
Creates fields for a particular document. For CFR11-compliant workspaces (21 CFR Part 11), signature fields must have a minimum size of 108×33.
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.DocumentFieldsApi(configuration);
const body:pd_api.DocumentFieldsApiCreateDocumentFieldsRequest = {
// string | Document UUID.
id: "BhVzRcxH9Z2LgfPPGXFUBa",
// CreateDocumentFieldsRequest
createDocumentFieldsRequest: {
fields: [
{
fieldId: "fieldId_example",
mergeField: "mergeField_example",
type: "payment_details",
placeholder: "placeholder_example",
assignedTo: "assignedTo_example",
layout: {
page: 1,
position: {
offsetX: 3.14,
offsetY: 3.14,
anchorPoint: "topleft",
},
style: {
width: 1,
height: 1,
},
},
},
],
},
};
apiInstance.createDocumentFields(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| createDocumentFieldsRequest | CreateDocumentFieldsRequest | ||
| id | [string] | Document UUID. | defaults to undefined |
CreateDocumentFieldsResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Authentication error | - |
| 404 | Not found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to README]
ListDocumentFieldsResponse listDocumentFields()
Return the list of fields for a particular document.
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.DocumentFieldsApi(configuration);
const body:pd_api.DocumentFieldsApiListDocumentFieldsRequest = {
// string | Document UUID.
id: "BhVzRcxH9Z2LgfPPGXFUBa",
};
apiInstance.listDocumentFields(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| id | [string] | Document UUID. | defaults to undefined |
ListDocumentFieldsResponse
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 401 | Authentication error | - |
| 404 | Not found | - |
| 409 | Conflict | - |
| 429 | Too Many Requests | - |