The Races controller deals exclusively with searching and browsing both past and upcoming events (Races). It is important to understand the Race model that Athlinks uses. In the Athlinks vocabulary, a Race encompases one or more Courses. As an example, the race could be the SOMA Triathlon and the courses would be the Half Ironman and Olympic Distance Triathlon.

Race Details

Lookup a Race by ID

REST Pattern: races/{id}
Description: Returns the details of a Race by ID including one or more courses, race company, and other details.
Example: races/81284

Lookup Race Summary (Widget Data) by RaceID and CourseID

REST Pattern: races/summary/{raceid}/{courseid}
Description: Returns the summary widget data that is displayed on Athlinks time pages including details such as All, Male, and Female count, top Male and Female, etc.
Example: races/summary/4383/15089

Lookup a Race by Affiliate ID and Affiliate Race ID

REST Pattern: races/GetBy3rdPartyID-Event/{AffiliateID}/{AffiliateRaceID}
Description: Returns the details of a Race by Affiliate ID and Affiliate Race ID including one or more courses, race company, and other details.
Example: races/GetBy3rdPartyID-Event/682/203393

Lookup a Course by Affiliate ID and Affiliate Course ID

REST Pattern: races/GetBy3rdPartyID-Course/{AffiliateID}/{AffiliateCourseID}
Description: Returns the details of a Course by Affiliate ID and Affiliate Race ID.
Example: races/GetBy3rdPartyID-Course/3282/8185

Browse Races

Browse Races by first returning a list of Countries and race counts for each.

REST Pattern: races/browse/
Description: Returns a list of Countries along with the corresponding race count for that time period.
Example: races/browse/
Note: Results are only shown in JSON or XML. Change querystring value for "format=" to either json or xml.

Browse Races by first returning a list of State/Provinces and race counts for each region.

REST Pattern: races/browse/{country}/
Description: Returns a list of State/Provinces within a selected country along with the corresponding race count for that time period.
Example: races/browse/us/
Note: Results are only shown in JSON or XML. Change querystring value for "format=" to either json or xml.

Browse Races by Country and State.

REST Pattern: races/browse/{country}/{state}
Description: Returns a paged set of results consisting of either upcoming or page races. Paging is passed in via the query string parameters "page" and "PageSize".
Example: races/browse/us/ca
Supports: Paging - "?page=1&pagesize=25"

Suggested races based on a RacerID and EventID.

REST Pattern: races/suggest/{RacerID}/{EventID}
Description: Returns a list of upcoming Events based on a RacerID and EventID. Factors such as race distance and # of participants on start list are taken into account for suggestion list.
Example: races/suggest/110839193/48793

Search Races

Search the database for past and upcoming Races by name.

REST Pattern: races/search/?term={term}
Description: Returns a paged list of races matching the input criteria.
Example: races/search/?term=soma
Additional Parameters:

Search Hint for retrieving auto-complete values for event search.

REST Pattern: races/searchhint/?q={term}&spid={state}&upcoming={true/false}&pagesize={int}
Description: Returns a paged list of races matching a search term, state/prov id, and boolean value for upcoming race.
Example: races/SearchHint?q=phoe&upcoming=true&spid=us_az
Additional Parameters:

Start List

Post start list for upcoming Races

REST Pattern: races/savestartlist/
Description: Posts start list for upcoming Races.