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 TypeAPIDescription
booking-requestedBooking APITriggered whenever a new booking request is made.
booking-canceledBooking APITriggered whenever a user cancels a previously booked class.
booking-late-canceledBooking APITriggered whenever a user cancels a previously booked class outside of the cancellation window.
checkin-booking-occurredBooking APITriggered whenever a user checks in to a gym partner with a pending booked class.
checkinAccess Control APITriggered 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

FieldDescriptionType
event_typeIndicates the webhook event. In this case, for now, it can always assume the value SYSTEM_INTEGRATION_REQUESTED.String
gym_idIt is a unique integer identifier of the gym within Wellhub. This identifier will be used in the Integration Setup API endpoints.Int
gym_nameThe human-readable Gym's name.String
partner_idIt is the UUID identifier of the partner at Wellhub. It is another way to identify a gym.String
custom_fieldsDynamic 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 valueList
event_idIt is the UUID identifier of the event.String
timestampIndicates the time at which the event was generated.Long
Payload
1{
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": 1706805878490
13 }
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

FieldDescription
Content-Typeapplication/json
AuthorizationBearer {{Wellhub Auth Token}}

Request body parameters

FieldDescriptionTypeRequired
typeIndicates the webhook event. In this case, for now, it can always assume the value SYSTEM_INTEGRATION_REQUESTED.StringTrue
URLURL that Wellhub will use to notify you.StringTrue
secretSecret that we will use to send a signature header that you can validate when you receive the webhook.StringTrue

Request example

curl
1curl -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