System Integration Requested Webhook
Webhooks
The Wellhub webhooks will notify you when specific events are triggered. It is possible to know when a user checked in or made a reservation, for example. If you would like to understand how sending webhooks works, security, and the webhook events available, you can access the Webhooks page.
The webhook event types we will send are below.
Event Type | API | Description |
---|---|---|
booking-requested | Booking API | Triggered whenever a new booking request is made. |
booking-canceled | Booking API | Triggered whenever a user cancels a previously booked class. |
booking-late-canceled | Booking API | Triggered whenever a user cancels a previously booked class outside of the cancellation window. |
checkin-booking-occurred | Booking API | Triggered whenever a user checks in to a gym partner with a pending booked class. |
checkin | Access Control API | Triggered whenever a user checks in to a gym partner. |
System Integration Requested webhook
The System Integration Requested webhook is distinct from the webhooks discussed earlier, as it is specific to the integration setup process. This webhook notifies the Club Management System (CMS) when a partner selects it as their system. Upon receiving this notification, the CMS gains the ability to manage the partner's webhooks using the endpoints defined in this documentation. The mechanism for sending this webhook (Timeout, HTTP method, retry, etc.) works the same as the webhooks mentioned previously.
Payload
Field | Description | Type |
---|---|---|
event_type | Indicates the webhook event. In this case, for now, it can always assume the value SYSTEM_INTEGRATION_REQUESTED. | String |
gym_id | It is a unique integer identifier of the gym within Wellhub. This identifier will be used in the Integration Setup API endpoints. | Int |
gym_name | The human-readable Gym's name. | String |
partner_id | It is the UUID identifier of the partner at Wellhub. It is another way to identify a gym. | String |
custom_fields | Dynamic list with configured custom fields and legal document (the custom fields keys are fixed for a given CMS and need to be set by Wellhub whilst the legal document is always sent, as long as there is one configured on Wellhub), each custom field is always identified with a key and given value | List |
event_id | It is the UUID identifier of the event. | String |
timestamp | Indicates the time at which the event was generated. | Long |
Payload1{2 "event_type": "system-integration-requested",3 "event_data": {4 "gym_id": 000000,5 "gym_name": "Gym - Name",6 "partner_id": "2cff9739-5cd2-4299-8753-ba56aafb9c92",7 "custom_fields": [8 {"key": "cnpj", "value": "1234567"},9 {"key": "cms_id", "value": "123456789"}10 ],11 "event_id": "ddd6947e-6d0a-42f3-b5aa-bf20a260d246",12 "timestamp": 170680587849013 }14}
Subscribes
To receive the System Integration Requested webhook, you must register using the endpoint
{{integration-setup-api-url}}/v1/systems/gyms/notification-webhook
.
Production: https://api.partners-integrations.gympass.com
Headers
Field | Description |
---|---|
Content-Type | application/json |
Authorization | Bearer {{Wellhub Auth Token}} |
Request body parameters
Field | Description | Type | Required |
---|---|---|---|
type | Indicates the webhook event. In this case, for now, it can always assume the value SYSTEM_INTEGRATION_REQUESTED. | String | True |
URL | URL that Wellhub will use to notify you. | String | True |
secret | Secret that we will use to send a signature header that you can validate when you receive the webhook. | String | True |
Request example
curl1curl -X POST "{{integration-setup-api-url}}/v1/systems/gyms/notification-webhook" \2 -H "Authorization: Bearer {{Wellhub Auth Token}}" \3 -H "Content-Type: application/json" \4 -d '{5 "type": "SYSTEM_INTEGRATION_REQUESTED",6 "url": "https://www.webhook-url-example.com",7 "secret": "secret"8}'
Response example
204 - NO CONTENT