Share on facebook
Share on twitter
Share on email

Geek Time – Open API and uploading Divisions and Awards winners

This will interest very few people in terms of the technical details, but it is another example of how software providers can use the Open API.  We are currently working with a results software company and they want to upload Division Winners and Awards.  A common (but complex) example is that the overall Male and Female winners are listed in a Division and they are removed from their Age Group.

At the bottom of this blog is the JSON you would post to https://runsignup.com/API/race/:race_id/divisions/divisions/POST to create the divisions.  This is set up to automatically put people into divisions when you post results.

You can remove the “auto_selection_criteria” key if you want to manually post division placements.  For that, you would use https://runsignup.com/API/race/:race_id/results/manual-divisions-placements/POST and follow the JSON on that page.

Here is the example JSON:

{
"overall_division": {
"awards_for_top_num": 0
},
"race_divisions": [
{
"division_name": "Top Male",
"division_short_name": "Top Male",
"show_top_num": 1,
"allow_winner_of_higher_priority": "F",
"auto_selection_criteria": {
"gender": "M"
}
},
{
"division_name": "Top Female",
"division_short_name": "Top Female",
"show_top_num": 1,
"allow_winner_of_higher_priority": "F",
"auto_selection_criteria": {
"gender": "F"
}
},
{
"division_name": "Male 10 and Under",
"division_short_name": "M0010",
"show_top_num": 3,
"allow_winner_of_higher_priority": "F",
"auto_selection_criteria": {
"min_age": null,
"max_age": 10,
"gender": "M"
}
},
{
"division_name": "Female 10 and Under",
"division_short_name": "F0010",
"show_top_num": 3,
"allow_winner_of_higher_priority": "F",
"auto_selection_criteria": {
"min_age": null,
"max_age": 10,
"gender": "F"
}
},
{
"division_name": "Male 11-15",
"division_short_name": "M1115",
"show_top_num": 3,
"allow_winner_of_higher_priority": "F",
"auto_selection_criteria": {
"min_age": 11,
"max_age": 15,
"gender": "M"
}
}
]
}

Leave a Reply

%d bloggers like this: