-
Notifications
You must be signed in to change notification settings - Fork 1
Webhook mechanism
Alexandre Bouquet edited this page May 7, 2025
·
6 revisions
A webhook mechanism is available to avoid query the API to see if there's new data
You can setup the URLs where to receive the events in the Nolio API admin.
There are currently 2 webhooks
- One of for events in the achieved Calendar (Training, Note, Competition)
- One for new metrics
If you leave it blank, no webhook will be triggered.
Here's example event you will receive
For events:
{
"notif_type": "new_event",
"object_type": "Training",
"object_id": 32263,
"user_id": 10,
"date_object": "2024-12-02"
}
For metrics:
{
"notif_type": "updated_metric",
"object_type": "Metrics",
"object_id": 10499,
"user_id": 100,
"date_object": "2024-12-03",
"metric_type": "nombredepas"
}
Notif type can be
- new_event
- updated_event
- deleted_event
- new_metric
- updated_metric
- deleted_metric
There is a webhook code on the app that is generated by default, and you can change it in the admin.

This code in set up as a HTTP Header in the request we will send, to verify it's coming from Nolio.
The code is set up in http-x-nolio-key header. Use it to discard calls you receive that do not contains the good code.