Receiving Resamania events on your webhook endpoint
Listen for Resamania events occurring on your clientTokens/clubs at your webhook endpoint so your integration can automatically trigger the appropriate reactions.
Why use webhooks?
When building Resamania integrations, you might want your applications to receive events as they happen on the clientTokens/clubs you operate on, so your back-end systems can execute actions accordingly.
Receiving webhook events is especially useful when you need to be notified of changes to entity states without having to poll the Resamania API regularly.
To enable webhook events, contact support or the API team and provide the URL where you want to receive events.
Only one URL can be configured. This URL will receive all events.
If you use our API across multiple environments (prod, sandbox, overseas, ...), the webhook call does not indicate which environment the event comes from. You must therefore provide a separate URL for each environment to differentiate them.
Event overview
All events have the same JSON representation. It is sent in the body of the request, itself sent via HTTP POST.
Structure of the Event object
It contains 2 properties:
eventwhich is the name of the event that occurred (string)datawhich is an object containing 2 pieces of information- The
clubIdwhere the event occurred - The
{object}Id, the name of which depends on the entity involved. The value is the identifier of that object.
- The
Example event payload
The following event indicates that a booking was made.
{
"event": "attendee.booked",
"data": {"object":{"attendeeId":"/stadline/attendees/6", "clubId": "/stadline/clubs/1"}}
}The different event types
Currently, 7 events are available.
Creation of a new contact
The data.object then contains the contactId corresponding to the created contact.
{
"event": "contact.created",
"data": {"object":{"contactId":"/stadline/contacts/2", "clubId": "/stadline/clubs/1"}}
}Update of a contact
The data.object then contains the contactId corresponding to the updated contact.
When is the `contact.updated` webhook triggered?
This event is triggered when contact information is modified, including when their status changes (prospect, customer, former customer, banned), but not when the customer obtains new tags or has tags removed.
{
"event": "contact.updated",
"data": {"object":{"contactId":"/stadline/contacts/2", "clubId": "/stadline/clubs/1"}}
}Deletion of a contact
The data.object then contains the contactId corresponding to the deleted contact.
{
"event": "contact.deleted",
"data": {"object":{"contactId":"/stadline/contacts/2", "clubId": "/stadline/clubs/1"}}
}Update of a contact's opt-ins (communication consents)
The data.object then contains the optinId and contactId corresponding respectively to the consent and the contact concerned.
{
"event": "optin.updated",
"data": {"object":{"optinId":"/stadline/optins/5", "contactId":"/stadline/contacts/2", "clubId": "/stadline/clubs/1"}}
}A new booking recorded
- For attendees moving from waitlist to main list
- For attendees directly on the main list The
data.objectthen contains theattendeeIdcorresponding to the attendee recorded for the booking.
{
"event": "attendee.booked",
"data": {"object":{"attendeeId":"/stadline/attendees/6", "clubId": "/stadline/clubs/1"}}
}A booking cancellation
The data.object then contains the attendeeId corresponding to the attendee who cancelled the booking.
{
"event": "attendee.canceled",
"data": {"object": {"attendeeId": "/stadline/attendees/1", "clubId": "/stadline/clubs/1"}}
}Creation or update of a class event
The data.object then contains the classEventId corresponding to the updated class event.
{
"event": "class_event.updated",
"data": {"object": {"classEventId": "/stadline/class_events/1", "clubId": "/stadline/clubs/2"}}
}Cancellation of a class event
The data.object then contains the classEventId corresponding to the canceled class event.
{
"event": "class_event.canceled",
"data": {"object": {"classEventId": "/stadline/class_events/2", "clubId": "/stadline/clubs/1"}}
}Deletion of a subscription
The data.object then contains the subscriptionId corresponding to the subscription deleted.
{
"event": "subscription.deleted",
"data": {"object": {"subscriptionId":"/stadline/subscriptions/1", "clubId":"/stadline/clubs/1"}}
}Deletion of a subscription option
The data.object then contains the subscriptionOptionId corresponding to the subscription option deleted.
{
"event": "subscription_option.deleted",
"data": {"object": {"subscriptionOptionId":"/stadline/subscription_options/1", "clubId":"/stadline/clubs/1"}}
}Creation of an AccountingContactTag
The data.object then contains the accountingContactTagId created for the contact given by contactId.
{
"event": "accounting_contact_tag.created",
"data": {"object": {"accountingContactTagId":"/stadline/accounting_contact_tags/1", "contactId":"/stadline/contacts/1"}}
}Modification of an AccountingContactTag
The data.object then contains the accountingContactTagId updated for the contact given by contactId.
{
"event": "accounting_contact_tag.updated",
"data": {"object": {"accountingContactTagId":"/stadline/accounting_contact_tags/1", "contactId":"/stadline/contacts/1"}}
}Deletion of an AccountingContactTag
The data.object then contains the accountingContactTagId deleted for the contact given by contactId.
{
"event": "accounting_contact_tag.deleted",
"data": {"object": {"accountingContactTagId":"/stadline/accounting_contact_tags/1", "contactId":"/stadline/contacts/1"}}
}Creation of a contact tag
The data.object then contains the contactTagId created for the contact given by contactId.
{
"event": "contact_tag.created",
"data": {"object": {"contactTagId":"/stadline/contact_tags/1", "contactId":"/stadline/contacts/1"}}
}Modification of a contact tag
The data.object then contains the contactTagId updated for the contact given by contactId.
{
"event": "contact_tag.updated",
"data": {"object": {"contactTagId":"/stadline/contact_tags/1", "contactId":"/stadline/contacts/1"}}
}Deletion of a contact tag
The data.object then contains the contactTagId deleted for the contact given by contactId.
{
"event": "contact_tag.deleted",
"data": {"object": {"contactTagId":"/stadline/contact_tags/1", "contactId":"/stadline/contacts/1"}}
}Creation of a badge
The data.object then contains the indentificatorId created for the contact given by contactId.
{
"event": "identificator.created",
"data": {"object": {"indentificatorId":"/stadline/identificators/1","targetId":"/stadline/contacts/1"}}
}Modification of a badge
The data.object then contains the indentificatorId updated for the contact given by contactId.
{
"event": "identificator.updated",
"data": {"object": {"indentificatorId":"/stadline/identificators/1","targetId":"/stadline/contacts/1"}}
}Deletion of a badge
The data.object then contains the indentificatorId deleted for the contact given by contactId.
{
"event": "identificator.deleted",
"data": {"object": {"indentificatorId":"/stadline/identificators/1","targetId":"/stadline/contacts/1"}}
}Deactivation of a badge
The data.object then contains the indentificatorId deactivated for the contact given by contactId.
{
"event": "identificator.disabled",
"data": {"object": {"indentificatorId":"/stadline/identificators/1","targetId":"/stadline/contacts/1"}}
}Warnings
Your webhook endpoint must be open
Your URL must be publicly accessible on the web, without any access restriction (authentication, rate limiting, ...).
Only one chance to receive the event
Our system does not retry if your webhook endpoint fails: If the called URL responds with an error (500, 403, ...), we will not attempt to call it again later.
This means you:
- Should ideally monitor your endpoint to ensure proper handling of received events
- Should consider logging the received events and their processing status
- May keep a strategy of regularly fetching data from our APIs in addition to webhooks
For this last case: For example, you might regularly receive attendee.booked and attendee.canceled events but still want to GET /{client_token}/attendees every hour to compare the list against your records.
Setup
Contact support or the API team so your URL can be configured on the Sandbox environments for your initial tests. You will then have to trigger the events yourself.
Once your integration is validated, contact support or the API team again to have your URL configured on the production environments.