Webhooks
Ibgħat avveniment ta' test
Ibgħat avveniment ta’ ping lil webhook
POST
/
api
/
v1
/
webhooks
/
{id}
/
ping
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/ping \
--header 'x-api-key: YOUR_API_KEY'
{
"delivery_id": "7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f"
}
{
"error": "The endpoint is disabled. Enable it first."
}
Ibgħat avveniment
ping iffirmat lil webhook, irrispettivament minn enabled_events tiegħu. Is-sejħa tirritorna mill-ewwel.
Segwi r-riżultat b’Elenka l-kunsinni.
Jeħtieġ is-scope
webhooks_manage.Talba
Parametri tal-path
Risposta
F’każ ta’ suċċess, l-API tirritorna202 Accepted.
Risposti ta’ żball
| Status | Deskrizzjoni |
|---|---|
400 | Talba mhux valida. Ara l-messaġġ error. |
401 | L-ebda ċavetta tal-API, jew ċavetta tal-API mhux valida. |
403 | Iċ-ċavetta tal-API tiegħek m’għandhiex is-scope webhooks_manage. |
404 | Il-webhook ma nstabx, jew jappartjeni lil ċavetta tal-API oħra. |
409 | Il-webhook huwa diżattivat. Attivah l-ewwel. |
500 | Żball intern tas-server. |
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/ping \
--header 'x-api-key: YOUR_API_KEY'
{
"delivery_id": "7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f"
}
{
"error": "The endpoint is disabled. Enable it first."
}
⌘I
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/ping \
--header 'x-api-key: YOUR_API_KEY'
{
"delivery_id": "7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f"
}
{
"error": "The endpoint is disabled. Enable it first."
}