Update a webhook endpoint
curl --request PATCH \
--url https://api.printeasy.adfinite.com/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.printeasy.adfinite.com/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.printeasy.adfinite.com/v1/webhooks/{id}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"disabledReason": "<string>",
"enabled": true,
"events": [
"printjob.done"
],
"failingSince": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "live",
"url": "https://example.com/printeasy/webhooks"
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}Webhooks
Update a webhook endpoint
Changes the URL, description, events or enabled flag. Enabling clears failingSince and disabledReason.
PATCH
/
v1
/
webhooks
/
{id}
Update a webhook endpoint
curl --request PATCH \
--url https://api.printeasy.adfinite.com/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.printeasy.adfinite.com/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.printeasy.adfinite.com/v1/webhooks/{id}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"disabledReason": "<string>",
"enabled": true,
"events": [
"printjob.done"
],
"failingSince": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "live",
"url": "https://example.com/printeasy/webhooks"
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}{
"error": {
"code": "not_found",
"message": "Printer not found",
"request_id": "4f9c2a7e-1b3d-4c5e-8f6a-0b1c2d3e4f5a"
}
}Authorizations
ApiKeyAuthBasicAuth
Send Authorization: Bearer <API key>. Use a pe_test_ key in the playground; it only reaches virtual test printers.
Path Parameters
Body
application/json
Changes
Maximum string length:
256Minimum array length:
1Available options:
printjob.queued, printjob.sent, printjob.received, printjob.printing, printjob.done, printjob.error, printjob.cancelled, printjob.expired, computer.online, computer.offline, printer.added, printer.removed, printer.online, printer.offline, printer.updated Maximum string length:
2048Response
The updated endpoint
Why the endpoint is disabled: by a user, or automatically after 5 days of failures
Available options:
printjob.queued, printjob.sent, printjob.received, printjob.printing, printjob.done, printjob.error, printjob.cancelled, printjob.expired, computer.online, computer.offline, printer.added, printer.removed, printer.online, printer.offline, printer.updated Start of the current run of failed deliveries; null while healthy
Available options:
live, test Example:
"https://example.com/printeasy/webhooks"
Was this page helpful?