Managing Events and Games

As a user, I want to synchronize a schedule of events and/or games between SportsEngine and an external system, so I can automatically populate my schedule from another source.

Introduction

One of the most common scenarios for integrating with the SportsEngine API is to sync data with an external application. For example, you may have developed a scheduling app for your association and want to use it to sync schedules between your app and SportsEngine. For example, AutoIce is a scheduling tool that the Eagan Hockey Association (EHA) uses to schedule their association’s ice time. The SportsEngine API allows EHA to take their ice schedules created in AutoIce and sync them with the team schedules in SportsEngine.

Workflows

To synchronize games, do the following:

  1. Get a list of leagues available to you using the Leagues Index endpoint.
  2. Using the current_subseason_id associated with the desired league, pull a list of team_instances via the Team Instances Index endpoint.
  3. Update the game using the Games Update endpoint.
1876

To synchronize events, do the following:

  1. Get a list of leagues available to you using the Leagues Index endpoint.
  2. Using the league_id associated with the desired league, pull a list of league_instances via the League Instances Index endpoint.
  3. Using the desired league_instance_id from Step 2, pull the associated league_instance_tree via the League Instance Tree endpoint.
  4. Using the desired page nodes from Step 3, update the events using the Events Update endpoint.
2246

Outcome

The desired events and games show up on the team’s schedule.