|
| 1 | +# .WebhookEventsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.pandadoc.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**detailsWebhookEvent**](WebhookEventsApi.md#detailsWebhookEvent) | **GET** /public/v1/webhook-events/{id} | Get webhook event by uuid |
| 8 | +[**listWebhookEvent**](WebhookEventsApi.md#listWebhookEvent) | **GET** /public/v1/webhook-events | Get webhook event page |
| 9 | + |
| 10 | + |
| 11 | +# **detailsWebhookEvent** |
| 12 | +> WebhookEventDetailsResponse detailsWebhookEvent() |
| 13 | +
|
| 14 | + |
| 15 | +### Example |
| 16 | + |
| 17 | + |
| 18 | +```typescript |
| 19 | +import * as pd_api from 'pandadoc-node-client'; |
| 20 | + |
| 21 | +// replace it with your API key |
| 22 | +const API_KEY = "YOUR_API_KEY"; |
| 23 | +const configuration = pd_api.createConfiguration( |
| 24 | + { authMethods: {apiKey: `API-Key ${API_KEY}`} } |
| 25 | +); |
| 26 | +const apiInstance = new pd_api.WebhookEventsApi(configuration); |
| 27 | + |
| 28 | +const body:pd_api.WebhookEventsApiDetailsWebhookEventRequest = { |
| 29 | + // string | Webhook event uuid |
| 30 | + id: "id_example", |
| 31 | +}; |
| 32 | + |
| 33 | +apiInstance.detailsWebhookEvent(body).then((data) => { |
| 34 | + console.log('API called successfully. Returned data: %o', data); |
| 35 | +}).catch((error) => console.error(error)); |
| 36 | +``` |
| 37 | + |
| 38 | + |
| 39 | +### Parameters |
| 40 | + |
| 41 | +Name | Type | Description | Notes |
| 42 | +------------- | ------------- | ------------- | ------------- |
| 43 | + **id** | [**string**] | Webhook event uuid | defaults to undefined |
| 44 | + |
| 45 | + |
| 46 | +### Return type |
| 47 | + |
| 48 | +**WebhookEventDetailsResponse** |
| 49 | + |
| 50 | +### Authorization |
| 51 | + |
| 52 | +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) |
| 53 | + |
| 54 | +### HTTP request headers |
| 55 | + |
| 56 | + - **Content-Type**: Not defined |
| 57 | + - **Accept**: application/json |
| 58 | + |
| 59 | + |
| 60 | +### HTTP response details |
| 61 | +| Status code | Description | Response headers | |
| 62 | +|-------------|-------------|------------------| |
| 63 | +**200** | Get webhook event by uuid | - | |
| 64 | +**401** | Authentication error | - | |
| 65 | +**429** | Too Many Requests | - | |
| 66 | + |
| 67 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
| 68 | + |
| 69 | +# **listWebhookEvent** |
| 70 | +> WebhookEventPageResponse listWebhookEvent() |
| 71 | +
|
| 72 | + |
| 73 | +### Example |
| 74 | + |
| 75 | + |
| 76 | +```typescript |
| 77 | +import * as pd_api from 'pandadoc-node-client'; |
| 78 | + |
| 79 | +// replace it with your API key |
| 80 | +const API_KEY = "YOUR_API_KEY"; |
| 81 | +const configuration = pd_api.createConfiguration( |
| 82 | + { authMethods: {apiKey: `API-Key ${API_KEY}`} } |
| 83 | +); |
| 84 | +const apiInstance = new pd_api.WebhookEventsApi(configuration); |
| 85 | + |
| 86 | +const body:pd_api.WebhookEventsApiListWebhookEventRequest = { |
| 87 | + // number | Number of element in page |
| 88 | + count: 0, |
| 89 | + // number | Page number |
| 90 | + page: 0, |
| 91 | + // Date | Filter option: all events from specified timestamp (optional) |
| 92 | + since: new Date('1970-01-01T00:00:00.00Z'), |
| 93 | + // Date | Filter option: all events up to specified timestamp (optional) |
| 94 | + to: new Date('1970-01-01T00:00:00.00Z'), |
| 95 | + // Array<WebhookEventTriggerEnum> | Filter option: all events of type (optional) |
| 96 | + type: [ |
| 97 | + "document_state_changed", |
| 98 | + ], |
| 99 | + // Array<WebhookEventHttpStatusCodeGroupEnum> | Filter option: all events of http status code (optional) |
| 100 | + httpStatusCode: [ |
| 101 | + 400, |
| 102 | + ], |
| 103 | + // Array<WebhookEventErrorEnum> | Filter option: all events with following error (optional) |
| 104 | + error: [ |
| 105 | + "TIMEOUT_ERROR", |
| 106 | + ], |
| 107 | +}; |
| 108 | + |
| 109 | +apiInstance.listWebhookEvent(body).then((data) => { |
| 110 | + console.log('API called successfully. Returned data: %o', data); |
| 111 | +}).catch((error) => console.error(error)); |
| 112 | +``` |
| 113 | + |
| 114 | + |
| 115 | +### Parameters |
| 116 | + |
| 117 | +Name | Type | Description | Notes |
| 118 | +------------- | ------------- | ------------- | ------------- |
| 119 | + **count** | [**number**] | Number of element in page | defaults to undefined |
| 120 | + **page** | [**number**] | Page number | defaults to undefined |
| 121 | + **since** | [**Date**] | Filter option: all events from specified timestamp | (optional) defaults to undefined |
| 122 | + **to** | [**Date**] | Filter option: all events up to specified timestamp | (optional) defaults to undefined |
| 123 | + **type** | **Array<WebhookEventTriggerEnum>** | Filter option: all events of type | (optional) defaults to undefined |
| 124 | + **httpStatusCode** | **Array<WebhookEventHttpStatusCodeGroupEnum>** | Filter option: all events of http status code | (optional) defaults to undefined |
| 125 | + **error** | **Array<WebhookEventErrorEnum>** | Filter option: all events with following error | (optional) defaults to undefined |
| 126 | + |
| 127 | + |
| 128 | +### Return type |
| 129 | + |
| 130 | +**WebhookEventPageResponse** |
| 131 | + |
| 132 | +### Authorization |
| 133 | + |
| 134 | +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) |
| 135 | + |
| 136 | +### HTTP request headers |
| 137 | + |
| 138 | + - **Content-Type**: Not defined |
| 139 | + - **Accept**: application/json |
| 140 | + |
| 141 | + |
| 142 | +### HTTP response details |
| 143 | +| Status code | Description | Response headers | |
| 144 | +|-------------|-------------|------------------| |
| 145 | +**200** | Page of webhook events | - | |
| 146 | +**401** | Authentication error | - | |
| 147 | +**429** | Too Many Requests | - | |
| 148 | + |
| 149 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
| 150 | + |
0 commit comments