Matches lifecycle
Learn how PandaScore REST API handles matches life cycle, from start to finish.
PandaScore implements match statuses as a finite state machine. The diagram below is a recap of all existing match statuses (the states) and the events that can affect them (the transitions).
The match status state machine
Not started
Matches always start with the not_started status. In this state:
statusisnot_startedscheduled_atis the official match playing time — as announced by the organizerbegin_athas the same value asscheduled_at(to support some legacy integrations)end_atisnull
For matches that support real-time in-game data, the WebSocket opens 15 minutes before the scheduled time.
Retrieve the list of open WebSockets with the All video games > List live matches endpoint.
Rescheduled matches
When an organizer decides to reschedule match, the rescheduled field will be set to true. In this state:
rescheduledistruescheduled_atis the new official playing time — as announced by the organizeroriginal_scheduled_atis the initial official playing time
An example of a match which is rescheduled from date_1 to date_2
WarningMatches will only be marked as rescheduled when the organizer officially announces a new date. Matches that are delayed (e.g. because the previous match is not finished) will not be marked as rescheduled.
Running
Match status is updated to running as soon as the match begins. In this state:
statusisrunningbegin_atis set to the actual beginning time of the match
An example of a match which begins at date_2, transitioning to the running status
Finished
Match status is updated to finished as soon as the match ends. In this state:
statusisfinishedend_atis set to the match finish timewinner_idis updated to the winning team/player id
Complete games
For matches that support historical data (i.e. detailed_stats is true) the 'complete' field indicates whether post-game statistics are whole and available for user consumption. Once a match is complete, the data should not change. In this state:
statusisfinishedcompleteistrue
An example of a match which is complete, meaning all statistics are available
Canceled
Sometimes, matches can be canceled. Reasons may vary and different scenarios exist: cancellation by the organizer or one participant forfeiting.
Without winner
In this scenario, the match status is updated to canceled. In this state:
statusiscanceledforfeitisfalsebegin_atisnullend_atisnull
A match enters the canceled status when, for various potential reasons, it won't be played.
Forfeit
In this scenario too, the match status is updated to canceled. However, in this state:
statusiscanceledforfeitistruebegin_atisnullend_atisnullwinner_idis updated to the winning team/playerid
An example of a match which has been forfeited by team_2
Postponed
Match status is updated to postponed when the match is rescheduled to an unknown date. In this state:
statusispostponedscheduled_atis not updated
When a new playing date is known, postponed matches go through the same procedure as rescheduled matches.
Example
An example of a postponed match which is then rescheduled from date_1 to date_2
Updated about 1 month ago
