Webhook Events
Also known as: disciplines, discipline, categories, webhooks, callback, notifications
Each webhook call is structured as a WebhookCallDto, containing a unique, incrementing ID, the tournament ID, and an array of events.
Webhook Synchronization
Section titled “Webhook Synchronization”Tournament.app supports offline functionality, which can affect webhook event delivery:
- When devices are offline, changes are stored locally.
- Upon reconnection, all accumulated changes are synced to the server.
- These synced changes are then sent as events to your webhook endpoint.
- Each event includes a
createdAttimestamp, reflecting when the change was made on the user’s device.
This approach ensures that no updates are lost, even during periods of disconnection. However, be aware that you may receive multiple events simultaneously when a device comes back online after an extended offline period.
Webhook Call Structure
Section titled “Webhook Call Structure”Each webhook call will have this structure:
{ "id": 1234, "tournamentId": "tio:T5MMiW8IVuWMp", "events": [ { "type": "MatchUpdated", "matchId": "tio:uVOK5NQ5ruqqm", "createdAt": "2024-08-28T15:12:30.413Z" }, { "type": "StandingsUpdated", "createdAt": "2024-08-28T15:12:30.413Z" }, { "type": "CourtMatchChanged", "courtId": "tio:xfelozmkJVomE", "createdAt": "2024-08-28T15:12:30.413Z" } ]}Event Types
Section titled “Event Types”CourtMatchChanged
Section titled “CourtMatchChanged”Triggered when a court gets a new match or a match is removed from a court. Example:
{ "type": "CourtMatchChanged", "courtId": "tio:XBZxd1GA3Kog9", "matchId": "tio:80qYlVngRdUjx", "createdAt": "2024-08-27T17:06:23.051Z"}MatchUpdated
Section titled “MatchUpdated”Triggered when a match is updated (e.g., score update, player change). Example:
{ "type": "MatchUpdated", "matchId": "tio:80qYlVngRdUjx", "createdAt": "2024-08-27T17:06:23.051Z"}TournamentUpdated
Section titled “TournamentUpdated”Triggered when tournament state or options are changed. Example:
{ "type": "TournamentUpdated", "createdAt": "2024-08-27T17:06:23.051Z"}TournamentAdded
Section titled “TournamentAdded”Triggered when a new tournament is added. Example:
{ "type": "TournamentAdded", "createdAt": "2024-08-27T17:06:23.051Z"}EntryListUpdated
Section titled “EntryListUpdated”Triggered when:
- An entry is added
- An Entry is removed
- An Entry is edited
Example:
{ "type": "EntryListUpdated", "createdAt": "2024-08-27T17:06:23.051Z"}StandingsUpdated
Section titled “StandingsUpdated”Triggered when the standings of the tournament where updated
Example:
{ "type": "StandingsUpdated", "createdAt": "2024-08-27T17:06:23.051Z"}