Skip to main content

Fixtures Notifications

Fixtures Notifications are BEDEX messages about updates in the Fixtures Service regarding created, changed or deleted esports entities. If a tournament was renamed or a match start time has changed, you will receive a notification with the updated data.

Notifications are JSON objects you receive through BEDEX queues. Like all messages sent through BEDEX, notifications are wrapped in a DataProviderMessage structure. DataProviderMessage contains several metadata fields and the notification object is found in the payload field. The notification contains the old and the new values of the changed entity.

BEDEX can limit which notifications you receive based on your setup. For example, you can only receive notifications about specific entities or for specific event types.

Notification Message

Notifications are sent for all changes in the Fixtures database. Depending on the type of the change, you will receive different combinations of newValue and oldValue fields:

when an entity in the database is updated:

  • the newValue field holds the updated entity object
  • the oldValue field hold the previous entity object

when an entity in the database is removed:

  • the newValue field is empty
  • the oldValue field holds the removed entity object

when an entity is created in the database:

  • the newValue field holds the new entity object
  • the oldValue field is empty
Change typeoldValuenewValue
deletionold entitynull
creationnullnew entity
updateold entitynew entity

For example, if something about the Match entity changes you will receive a notification that contains the complete new Match object in the newValue field. If you store fixtures in your system, you can take the Match object from this field and update it in your database without the need to call Fixtures API.

The oldValue field holds the old Match object before the change. You can compare it to the new Match object to determine what changed in the match.

The Fixture Update message consists of the following parts:

NameTypeDescription
nameFieldThe event type that triggered the notification
resourceTypeFieldType of the esports entity that changed
resourcePeridFieldPERID of the changed entity
newValueObjectNew Match object — stores the latest match information
oldValueObjectOld Match object — stores match information before changes
tournamentObjectTournament object
teamsObjectTeams object

An example of a complete fixture update message, sent whenever a match entity changes, would look like this:

Notification example
{
"name": "matchChanged",
"resourceType": "match",
"resourcePerid": "esports:match:8c3202d6-e93e-57a4-c3e4-ab467bf16b63",
"newValue": {
"version": 39,
"last_modified": 1651670090,
"state": 2,
"state_label": "ONGOING",
"date_start": "2022-05-04T12:10:00Z",
"date_end": null,
"match_format": { "value": "3", "type": "bestOf" },
"title": {
"name": "Counter-Strike: Global Offensive",
"abbreviation": "CS:GO",
"perid": "esports:title:a7973897-4b4b-536a-9c90-87f0151a5f24",
"id": 2,
"slug": "csgo"
},
"tournament": {
"abbreviation": null,
"tier": "B-Tier",
"match_format_type": "bestof",
"match_format_value": "3",
"date_start": "2022-04-25",
"date_end": "2022-06-03",
"name": "Asia Atlantic S42",
"full_name": "Charger League 2033 Asia Atlantic S42",
"perid": "esports:tournament:53afcbfe-7375-5ffa-09e8-0670e1414a52",
"id": 5208
},
"stage": {},
"teams": [
{
"abbreviation": null,
"name": "Team1",
"home": true,
"logo": "https://fixtures.bayesesports.com/static/img/team_default.png",
"logo_icon": "https://fixtures.bayesesports.com/static/img/team_default.png",
"perid": "esports:team:1afad58f-1ce6-5fbb-bf36-5d5725664548",
"id": 5960
},
{
"abbreviation": null,
"name": "Team2",
"home": false,
"logo": "https://fixtures.bayesesports.com/static/img/team_default.png",
"logo_icon": "https://fixtures.bayesesports.com/static/img/team_default.png",
"perid": "esports:team:06b25506-e962-5227-0477-4b822f59346c",
"id": 7170
}
],
"links": [],
"identifiers": [
{ "value": "60999906", "type": "sr_match_id" },
{
"value": "esports:match:61879bb3-f3cb-5a49-cdf6-264d2ec19be0",
"type": "alt_perid"
},
{ "value": "0c336d26-1733-55df-949f-39bae5a369ec", "type": "esl_match_id" }
],
"results": [
{ "team_id": 5960, "score": 0, "winner": false },
{ "team_id": 7170, "score": 1, "winner": false }
],
"coverages": [{ "types": ["live_data_prodb"], "provider": "bayes" }],
"additionalProperties": {
"mapVotes": {
"esports:team:06b25506-e962-5227-0477-4b822f59346c": [
{
"type": "ban",
"mapId": null,
"mapName": "de_vertigo",
"sequence": 1,
"identifiers": []
},
{
"type": "pick",
"mapId": null,
"mapName": "de_dust2",
"sequence": 3,
"identifiers": []
},
{
"type": "ban",
"mapId": null,
"mapName": "de_ancient",
"sequence": 5,
"identifiers": []
}
],
"esports:team:1afad58f-1ce6-5fbb-bf36-5d5725664548": [
{
"type": "ban",
"mapId": null,
"mapName": "de_nuke",
"sequence": 0,
"identifiers": []
},
{
"type": "pick",
"mapId": null,
"mapName": "de_inferno",
"sequence": 2,
"identifiers": []
},
{
"type": "ban",
"mapId": null,
"mapName": "de_mirage",
"sequence": 4,
"identifiers": []
},
{
"type": "pick",
"mapId": null,
"mapName": "de_overpass",
"sequence": 6,
"identifiers": []
}
]
},
"mapVotesPublic": true
},
"perid": "esports:match:8c3202d6-e93e-57a4-c3e4-ab467bf16b63",
"id": 30649
},
"oldValue": {
"version": 38,
"last_modified": 1651070090,
"state": 2,
"state_label": "ONGOING",
"date_start": "2022-05-04T12:10:00Z",
"date_end": null,
"match_format": { "value": "3", "type": "bestOf" },
"title": {
"name": "Counter-Strike: Global Offensive",
"abbreviation": "CS:GO",
"perid": "esports:title:a7973897-4b4b-536a-9c90-87f0151a5f24",
"id": 2,
"slug": "csgo"
},
"tournament": {
"abbreviation": null,
"tier": "B-Tier",
"match_format_type": "bestof",
"match_format_value": "3",
"date_start": "2022-04-25",
"date_end": "2022-06-03",
"name": "Asia Atlantic S42",
"full_name": "Charger League 2033 Asia Atlantic S42",
"perid": "esports:tournament:53afcbfe-7375-5ffa-09e8-0670e1414a52",
"id": 5208
},
"stage": {},
"teams": [
{
"abbreviation": null,
"name": "Team1",
"home": true,
"logo": "https://fixtures.bayesesports.com/static/img/team_default.png",
"logo_icon": "https://fixtures.bayesesports.com/static/img/team_default.png",
"perid": "esports:team:1afad58f-1ce6-5fbb-bf36-5d5725664548",
"id": 5960
},
{
"abbreviation": null,
"name": "Team2",
"home": false,
"logo": "https://fixtures.bayesesports.com/static/img/team_default.png",
"logo_icon": "https://fixtures.bayesesports.com/static/img/team_default.png",
"perid": "esports:team:06b25506-e962-5227-0477-4b822f59346c",
"id": 7170
}
],
"links": [],
"identifiers": [
{ "value": "60999906", "type": "sr_match_id" },
{
"value": "esports:match:61879bb3-f3cb-5a49-cdf6-264d2ec19be0",
"type": "alt_perid"
},
{ "value": "0c336d26-1733-55df-949f-39bae5a369ec", "type": "esl_match_id" }
],
"results": [
{ "team_id": 5960, "score": 0, "winner": false },
{ "team_id": 7170, "score": 1, "winner": false }
],
"coverages": [{ "types": ["live_data_prodb"], "provider": "bayes" }],
"additionalProperties": {
"mapVotesPublic": false
},
"perid": "esports:match:8c3202d6-e93e-57a4-c3e4-ab467bf16b63",
"id": 30649
}
}

Event Types

Each notification is sent after some event — for example, a player or a tournament had changed. The event type is stored in the name field of the notification message.

📝 Note

Changes in the event type include object deletion and creation. To determine whether an entity was updated, deleted or created compare the objects newValue and oldValue.

Here are the possible event types:

Event typeEntity typeDescription
mapVotesChangedmatchMap votes changed for the match, but not yet released to the general public
mapVotesPublicChangedmatchMap votes are publicly released
matchChangedmatchA match entity has changed
organizerChangedorganizerA tournament organizer entity has changed
playerChangedplayerA player entity has changed
seasonChangedseasonA season entity has changed
seriesChangedseriesA series entity has changed
teamChangedteamA team entity has changed
tournamentChangedtournamentA tournament entity has changed