|
| 1 | +# .DocumentRecipientsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.pandadoc.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**addDocumentRecipient**](DocumentRecipientsApi.md#addDocumentRecipient) | **POST** /public/v1/documents/{id}/recipients | Add Document Recipient |
| 8 | +[**deleteDocumentRecipient**](DocumentRecipientsApi.md#deleteDocumentRecipient) | **DELETE** /public/v1/documents/{id}/recipients/{recipient_id} | Delete Document Recipient |
| 9 | +[**editDocumentRecipient**](DocumentRecipientsApi.md#editDocumentRecipient) | **PATCH** /public/v1/documents/{id}/recipients/{recipient_id} | Edit Document Recipient |
| 10 | +[**reassignDocumentRecipient**](DocumentRecipientsApi.md#reassignDocumentRecipient) | **POST** /public/v1/documents/{id}/recipients/{recipient_id}/reassign | Reassign Document Recipient |
| 11 | + |
| 12 | + |
| 13 | +# **addDocumentRecipient** |
| 14 | +> void addDocumentRecipient(documentRecipientCreateRequest) |
| 15 | +
|
| 16 | +Adds recipient as CC to document |
| 17 | + |
| 18 | +### Example |
| 19 | + |
| 20 | + |
| 21 | +```typescript |
| 22 | +import * as pd_api from 'pandadoc-node-client'; |
| 23 | + |
| 24 | +// replace it with your API key |
| 25 | +const API_KEY = "YOUR_API_KEY"; |
| 26 | +const configuration = pd_api.createConfiguration( |
| 27 | + { authMethods: {apiKey: `API-Key ${API_KEY}`} } |
| 28 | +); |
| 29 | +const apiInstance = new pd_api.DocumentRecipientsApi(configuration); |
| 30 | + |
| 31 | +const body:pd_api.DocumentRecipientsApiAddDocumentRecipientRequest = { |
| 32 | + // string | Document UUID |
| 33 | + id: "BhVzRcxH9Z2LgfPPGXFUBa", |
| 34 | + // DocumentRecipientCreateRequest |
| 35 | + documentRecipientCreateRequest: { |
| 36 | + id: "2eWSKSvVqmuVCnuUK3iWwD", |
| 37 | + kind: "contact", |
| 38 | + }, |
| 39 | +}; |
| 40 | + |
| 41 | +apiInstance.addDocumentRecipient(body).then((data) => { |
| 42 | + console.log('API called successfully. Returned data: %o', data); |
| 43 | +}).catch((error) => console.error(error)); |
| 44 | +``` |
| 45 | + |
| 46 | + |
| 47 | +### Parameters |
| 48 | + |
| 49 | +Name | Type | Description | Notes |
| 50 | +------------- | ------------- | ------------- | ------------- |
| 51 | + **documentRecipientCreateRequest** | **DocumentRecipientCreateRequest**| | |
| 52 | + **id** | [**string**] | Document UUID | defaults to undefined |
| 53 | + |
| 54 | + |
| 55 | +### Return type |
| 56 | + |
| 57 | +**void** |
| 58 | + |
| 59 | +### Authorization |
| 60 | + |
| 61 | +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) |
| 62 | + |
| 63 | +### HTTP request headers |
| 64 | + |
| 65 | + - **Content-Type**: application/json |
| 66 | + - **Accept**: application/json |
| 67 | + |
| 68 | + |
| 69 | +### HTTP response details |
| 70 | +| Status code | Description | Response headers | |
| 71 | +|-------------|-------------|------------------| |
| 72 | +**204** | No content | - | |
| 73 | +**400** | Bad Request | - | |
| 74 | +**401** | Authentication error | - | |
| 75 | +**403** | Permission error | - | |
| 76 | +**404** | Not found | - | |
| 77 | +**429** | Too Many Requests | - | |
| 78 | + |
| 79 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
| 80 | + |
| 81 | +# **deleteDocumentRecipient** |
| 82 | +> void deleteDocumentRecipient() |
| 83 | +
|
| 84 | +Deleted recipient from document |
| 85 | + |
| 86 | +### Example |
| 87 | + |
| 88 | + |
| 89 | +```typescript |
| 90 | +import * as pd_api from 'pandadoc-node-client'; |
| 91 | + |
| 92 | +// replace it with your API key |
| 93 | +const API_KEY = "YOUR_API_KEY"; |
| 94 | +const configuration = pd_api.createConfiguration( |
| 95 | + { authMethods: {apiKey: `API-Key ${API_KEY}`} } |
| 96 | +); |
| 97 | +const apiInstance = new pd_api.DocumentRecipientsApi(configuration); |
| 98 | + |
| 99 | +const body:pd_api.DocumentRecipientsApiDeleteDocumentRecipientRequest = { |
| 100 | + // string | Document UUID |
| 101 | + id: "BhVzRcxH9Z2LgfPPGXFUBa", |
| 102 | + // string | Recipient UUID |
| 103 | + recipientId: "tf5dGS3Tmu3cj228ao6fnc", |
| 104 | +}; |
| 105 | + |
| 106 | +apiInstance.deleteDocumentRecipient(body).then((data) => { |
| 107 | + console.log('API called successfully. Returned data: %o', data); |
| 108 | +}).catch((error) => console.error(error)); |
| 109 | +``` |
| 110 | + |
| 111 | + |
| 112 | +### Parameters |
| 113 | + |
| 114 | +Name | Type | Description | Notes |
| 115 | +------------- | ------------- | ------------- | ------------- |
| 116 | + **id** | [**string**] | Document UUID | defaults to undefined |
| 117 | + **recipientId** | [**string**] | Recipient UUID | defaults to undefined |
| 118 | + |
| 119 | + |
| 120 | +### Return type |
| 121 | + |
| 122 | +**void** |
| 123 | + |
| 124 | +### Authorization |
| 125 | + |
| 126 | +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) |
| 127 | + |
| 128 | +### HTTP request headers |
| 129 | + |
| 130 | + - **Content-Type**: Not defined |
| 131 | + - **Accept**: application/json |
| 132 | + |
| 133 | + |
| 134 | +### HTTP response details |
| 135 | +| Status code | Description | Response headers | |
| 136 | +|-------------|-------------|------------------| |
| 137 | +**204** | No content | - | |
| 138 | +**401** | Authentication error | - | |
| 139 | +**403** | Permission error | - | |
| 140 | +**404** | Not found | - | |
| 141 | +**429** | Too Many Requests | - | |
| 142 | + |
| 143 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
| 144 | + |
| 145 | +# **editDocumentRecipient** |
| 146 | +> void editDocumentRecipient(documentRecipientEditRequest) |
| 147 | +
|
| 148 | +Edit document recipient's details |
| 149 | + |
| 150 | +### Example |
| 151 | + |
| 152 | + |
| 153 | +```typescript |
| 154 | +import * as pd_api from 'pandadoc-node-client'; |
| 155 | + |
| 156 | +// replace it with your API key |
| 157 | +const API_KEY = "YOUR_API_KEY"; |
| 158 | +const configuration = pd_api.createConfiguration( |
| 159 | + { authMethods: {apiKey: `API-Key ${API_KEY}`} } |
| 160 | +); |
| 161 | +const apiInstance = new pd_api.DocumentRecipientsApi(configuration); |
| 162 | + |
| 163 | +const body:pd_api.DocumentRecipientsApiEditDocumentRecipientRequest = { |
| 164 | + // string | Document UUID |
| 165 | + id: "BhVzRcxH9Z2LgfPPGXFUBa", |
| 166 | + // string | Recipient UUID |
| 167 | + recipientId: "tf5dGS3Tmu3cj228ao6fnc", |
| 168 | + // DocumentRecipientEditRequest |
| 169 | + documentRecipientEditRequest: { |
| 170 | + |
| 171 | + firstName: "John", |
| 172 | + lastName: "Doe", |
| 173 | + company: "John Doe Inc.", |
| 174 | + jobTitle: "CTO", |
| 175 | + phone: "+14842634627", |
| 176 | + state: "Texas", |
| 177 | + streetAddress: "1313 Mockingbird Lane", |
| 178 | + city: "Austin", |
| 179 | + postalCode: "75001", |
| 180 | + }, |
| 181 | +}; |
| 182 | + |
| 183 | +apiInstance.editDocumentRecipient(body).then((data) => { |
| 184 | + console.log('API called successfully. Returned data: %o', data); |
| 185 | +}).catch((error) => console.error(error)); |
| 186 | +``` |
| 187 | + |
| 188 | + |
| 189 | +### Parameters |
| 190 | + |
| 191 | +Name | Type | Description | Notes |
| 192 | +------------- | ------------- | ------------- | ------------- |
| 193 | + **documentRecipientEditRequest** | **DocumentRecipientEditRequest**| | |
| 194 | + **id** | [**string**] | Document UUID | defaults to undefined |
| 195 | + **recipientId** | [**string**] | Recipient UUID | defaults to undefined |
| 196 | + |
| 197 | + |
| 198 | +### Return type |
| 199 | + |
| 200 | +**void** |
| 201 | + |
| 202 | +### Authorization |
| 203 | + |
| 204 | +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) |
| 205 | + |
| 206 | +### HTTP request headers |
| 207 | + |
| 208 | + - **Content-Type**: application/json |
| 209 | + - **Accept**: application/json |
| 210 | + |
| 211 | + |
| 212 | +### HTTP response details |
| 213 | +| Status code | Description | Response headers | |
| 214 | +|-------------|-------------|------------------| |
| 215 | +**204** | No content | - | |
| 216 | +**400** | Bad Request | - | |
| 217 | +**401** | Authentication error | - | |
| 218 | +**403** | Permission error | - | |
| 219 | +**404** | Not found | - | |
| 220 | +**429** | Too Many Requests | - | |
| 221 | + |
| 222 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
| 223 | + |
| 224 | +# **reassignDocumentRecipient** |
| 225 | +> void reassignDocumentRecipient(documentRecipientCreateRequest) |
| 226 | +
|
| 227 | +Replace document recipient with another contact |
| 228 | + |
| 229 | +### Example |
| 230 | + |
| 231 | + |
| 232 | +```typescript |
| 233 | +import * as pd_api from 'pandadoc-node-client'; |
| 234 | + |
| 235 | +// replace it with your API key |
| 236 | +const API_KEY = "YOUR_API_KEY"; |
| 237 | +const configuration = pd_api.createConfiguration( |
| 238 | + { authMethods: {apiKey: `API-Key ${API_KEY}`} } |
| 239 | +); |
| 240 | +const apiInstance = new pd_api.DocumentRecipientsApi(configuration); |
| 241 | + |
| 242 | +const body:pd_api.DocumentRecipientsApiReassignDocumentRecipientRequest = { |
| 243 | + // string | Document UUID |
| 244 | + id: "BhVzRcxH9Z2LgfPPGXFUBa", |
| 245 | + // string | Recipient UUID |
| 246 | + recipientId: "tf5dGS3Tmu3cj228ao6fnc", |
| 247 | + // DocumentRecipientCreateRequest |
| 248 | + documentRecipientCreateRequest: { |
| 249 | + id: "2eWSKSvVqmuVCnuUK3iWwD", |
| 250 | + kind: "contact", |
| 251 | + }, |
| 252 | +}; |
| 253 | + |
| 254 | +apiInstance.reassignDocumentRecipient(body).then((data) => { |
| 255 | + console.log('API called successfully. Returned data: %o', data); |
| 256 | +}).catch((error) => console.error(error)); |
| 257 | +``` |
| 258 | + |
| 259 | + |
| 260 | +### Parameters |
| 261 | + |
| 262 | +Name | Type | Description | Notes |
| 263 | +------------- | ------------- | ------------- | ------------- |
| 264 | + **documentRecipientCreateRequest** | **DocumentRecipientCreateRequest**| | |
| 265 | + **id** | [**string**] | Document UUID | defaults to undefined |
| 266 | + **recipientId** | [**string**] | Recipient UUID | defaults to undefined |
| 267 | + |
| 268 | + |
| 269 | +### Return type |
| 270 | + |
| 271 | +**void** |
| 272 | + |
| 273 | +### Authorization |
| 274 | + |
| 275 | +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) |
| 276 | + |
| 277 | +### HTTP request headers |
| 278 | + |
| 279 | + - **Content-Type**: application/json |
| 280 | + - **Accept**: application/json |
| 281 | + |
| 282 | + |
| 283 | +### HTTP response details |
| 284 | +| Status code | Description | Response headers | |
| 285 | +|-------------|-------------|------------------| |
| 286 | +**204** | No content | - | |
| 287 | +**400** | Bad Request | - | |
| 288 | +**401** | Authentication error | - | |
| 289 | +**403** | Permission error | - | |
| 290 | +**404** | Not found | - | |
| 291 | +**429** | Too Many Requests | - | |
| 292 | + |
| 293 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
| 294 | + |
0 commit comments