SDK reference · Node SDK
prov.webhooks.deliveries
prov.webhooks.deliveries in Node SDK.
Signature
prov.webhooks.deliveries(id: string, params?: { limit?: number }): Promise<{ data: WebhookDelivery[] }>Parameters
idstringRequiredparams{ limit?: number }
Request fields
idstringpathRequired- The object's ID.
limitintegerquery- The most items to return, from 1 to 100. The default is 20.
Returns
Promise<{ data: WebhookDelivery[] }> The endpoint's deliveries, newest first. Finished deliveries and their attempts are kept 30 days; pending and retrying ones until they finish.
HTTP operation
GET /v1/webhook_endpoints/{id}/deliveries: List webhook deliveries
Errors
Example
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}),
})).json();
const endpointId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/test`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}/deliveries`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/webhook_endpoints", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"url": "http://localhost:4242/webhooks",
"event_types": [
"mandate.approval.approved"
]
}).json()
endpoint_id = step1["id"]
step2 = httpx.post(f"{api}/v1/webhook_endpoints/{endpoint_id}/test", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
data = httpx.get(f"{api}/v1/webhook_endpoints/{endpoint_id}/deliveries", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()