Modifica una destinazione
curl --request PATCH \
--url https://api.dentalspace.ai/v1/webhook-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: [], description: '<string>', enabled: true})
};
fetch('https://api.dentalspace.ai/v1/webhook-endpoints/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dentalspace.ai/v1/webhook-endpoints/{id}"
payload = {
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"description": "<string>",
"events": [
"patient.created"
],
"enabled": true,
"disabledReason": "manual",
"consecutiveFailures": 0,
"previousSecretExpiresAt": "<string>",
"secretRotatedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Webhook ed eventi
Modifica una destinazione
Scope: webhooks:write.
URL, eventi, descrizione, accesa/spenta. Con If-Match (l’ETag della GET) non sovrascrive modifiche altrui.
PATCH
/
webhook-endpoints
/
{id}
Modifica una destinazione
curl --request PATCH \
--url https://api.dentalspace.ai/v1/webhook-endpoints/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: [], description: '<string>', enabled: true})
};
fetch('https://api.dentalspace.ai/v1/webhook-endpoints/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dentalspace.ai/v1/webhook-endpoints/{id}"
payload = {
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"description": "<string>",
"events": [
"patient.created"
],
"enabled": true,
"disabledReason": "manual",
"consecutiveFailures": 0,
"previousSecretExpiresAt": "<string>",
"secretRotatedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
L'ETag ricevuto: la modifica passa solo se nessuno ha cambiato la risorsa (altrimenti 409 conflict, details.reason = version_mismatch).
Path Parameters
Identificativo della risorsa.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Body
application/json
https, con un nome pubblico: indirizzi privati, locali o con credenziali si rifiutano.
Required string length:
1 - 2048Required array length:
1 - 50 elementsUn tipo di evento del catalogo.
Available options:
patient.created, patient.updated, patient.archived, appointment.created, appointment.rescheduled, appointment.confirmed, appointment.cancelled, appointment.checked_in, appointment.completed, appointment.no_show, treatment_plan.presented, treatment_plan.accepted, treatment_plan.rejected, invoice.issued, invoice.paid, payment.received, installment.overdue, lead.created, lead.converted, task.created, task.completed, conversation.message_received, conversation.handoff_requested, call.logged Maximum string length:
200Response
La destinazione aggiornata.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Un tipo di evento del catalogo.
Available options:
patient.created, patient.updated, patient.archived, appointment.created, appointment.rescheduled, appointment.confirmed, appointment.cancelled, appointment.checked_in, appointment.completed, appointment.no_show, treatment_plan.presented, treatment_plan.accepted, treatment_plan.rejected, invoice.issued, invoice.paid, payment.received, installment.overdue, lead.created, lead.converted, task.created, task.completed, conversation.message_received, conversation.handoff_requested, call.logged too_many_failures: spenta dopo 50 consegne scartate di fila. Riaccendila con PATCH enabled=true.
Available options:
manual, too_many_failures Required range:
-9007199254740991 <= x <= 9007199254740991Fino a quest'istante si firma anche con il segreto precedente.