Set up race divisions for an event. The request should be formatted exactly as the response from Get Race Divisions. Any old divisions will be removed and the divisions from this post will completely replace them. The divisions should be listed in the proper priority order.
The show_top_num
field specifies the number of top finishers in the division who will be listed as award winners.
For example, if show_top_num
is set to 3, the top 3 finishers in this division will be recognized as award winners.
For JSON requests, the request should look like the example below.
{ "division_placement_field": "clock_time", "overall_division": { "awards_for_top_num": 3, "time_display_field": null }, "race_divisions": [ { "race_division_id": null, "division_name": "Male 15-19", "division_short_name": "M1519", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 15, "max_age": 19, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 15-19", "division_short_name": "F1519", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 15, "max_age": 19, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 20-24", "division_short_name": "M2024", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 20, "max_age": 24, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 20-24", "division_short_name": "F2024", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 20, "max_age": 24, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 25-29", "division_short_name": "M2529", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 25, "max_age": 29, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 25-29", "division_short_name": "F2529", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 25, "max_age": 29, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 30-34", "division_short_name": "M3034", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 30, "max_age": 34, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 30-34", "division_short_name": "F3034", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 30, "max_age": 34, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 35-39", "division_short_name": "M3539", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 35, "max_age": 39, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 35-39", "division_short_name": "F3539", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 35, "max_age": 39, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 40-44", "division_short_name": "M4044", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 40, "max_age": 44, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 40-44", "division_short_name": "F4044", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 40, "max_age": 44, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 45-49", "division_short_name": "M4549", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 45, "max_age": 49, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 45-49", "division_short_name": "F4549", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 45, "max_age": 49, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 50-54", "division_short_name": "M5054", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 50, "max_age": 54, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 50-54", "division_short_name": "F5054", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 50, "max_age": 54, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 55-59", "division_short_name": "M5559", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 55, "max_age": 59, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 55-59", "division_short_name": "F5559", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 55, "max_age": 59, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 60-64", "division_short_name": "M6064", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 60, "max_age": 64, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 60-64", "division_short_name": "F6064", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 60, "max_age": 64, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 65-69", "division_short_name": "M6569", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 65, "max_age": 69, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 65-69", "division_short_name": "F6569", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 65, "max_age": 69, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 70-74", "division_short_name": "M7074", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 70, "max_age": 74, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 70-74", "division_short_name": "F7074", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 70, "max_age": 74, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 75-79", "division_short_name": "M7579", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 75, "max_age": 79, "gender": "M" } }, { "race_division_id": null, "division_name": "Female 75-79", "division_short_name": "F7579", "show_top_num": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "auto_selection_criteria": { "min_age": 75, "max_age": 79, "gender": "F" } }, { "race_division_id": null, "division_name": "Military/Police", "division_short_name": "Military/Police", "show_top_num": 5, "allow_winner_of_higher_priority": "T", "hidden_in_main_results": "F", "time_display_field": null } ] }
Parameter | HTTP Method | Default | Description | Datatype |
---|---|---|---|---|
api_key |
GET | API Key | string |
|
api_secret |
GET | API Secret | string |
|
tmp_key |
GET | Temporary API Key from login API call. This should NOT be used in combination with API Key. | string |
|
tmp_secret |
GET | Temporary API Secret from login API call. This should NOT be used in combination with API Secret. | string |
|
rsu_api_key |
GET | API v2 key. If used, you must send the API secret in an HTTP header named X-RSU-API-SECRET. | string |
|
sp_api_key |
GET | Super partner API key. If used, you must send the API secret in an HTTP header named X-RSU-API-SECRET. | string |
|
X-RSU-API-SECRET |
HTTP Header | API v2 or super partner secret. | string |
|
format |
GET | xml | Format of response. The default if not sent is `xml`, but `json` is preferred. | format |
Parameter | HTTP Method | Default | Description | Datatype |
---|---|---|---|---|
race_id Required |
POST | ID of race. | uint |
|
event_id Required |
POST | ID of event. | uint |
|
request_format |
POST | xml | Format of request. The default if not sent is `xml`, but `json` is preferred. | format |
request Required |
POST | Request in proper format. | string |
{ "openapi": "3.0.3", "info": { "title": "Post Race Divisions (Legacy API)", "description": "Set up race divisions.", "version": "1.0.0", "contact": { "name": "RunSignup API Support", "url": "https://runsignup.com/API", "email": "info@runsignup.com" } }, "servers": [ { "url": "https://runsignup.com/API", "description": "Production API Server" } ], "tags": [ { "name": "Race Divisions", "description": "APIs related to Race Divisions" } ], "components": { "schemas": { "Error": { "type": "object", "properties": { "error": { "type": "string", "description": "Error message" } }, "required": [ "error" ] }, "BadRequestError": { "allOf": [ { "$ref": "#/components/schemas/Error" }, { "description": "Error indicating invalid request parameters or structure" } ] }, "UnauthorizedError": { "allOf": [ { "$ref": "#/components/schemas/Error" }, { "description": "Error indicating authentication failure" } ] }, "ForbiddenError": { "allOf": [ { "$ref": "#/components/schemas/Error" }, { "description": "Error indicating the authenticated user lacks required permissions" } ] }, "NotFoundError": { "allOf": [ { "$ref": "#/components/schemas/Error" }, { "description": "Error indicating the requested resource does not exist" } ] }, "ServerError": { "allOf": [ { "$ref": "#/components/schemas/Error" }, { "description": "Error indicating an unexpected server-side issue" } ] } }, "securitySchemes": { "apiKey": { "type": "apiKey", "in": "query", "name": "api_key", "description": "RunSignup API Key" }, "apiSecret": { "type": "apiKey", "in": "query", "name": "api_secret", "description": "RunSignup API Secret" } } }, "paths": { "/race/:race_id/divisions/divisions": { "post": { "tags": [ "Race Divisions" ], "summary": "Post Race Divisions (Legacy API)", "description": "Set up race divisions.", "operationId": "race_:race_id_divisions_divisions", "parameters": [ { "name": "api_key", "in": "query", "description": "API Key", "required": false, "schema": { "type": "string" } }, { "name": "api_secret", "in": "query", "description": "API Secret", "required": false, "schema": { "type": "string" } }, { "name": "tmp_key", "in": "query", "description": "Temporary API Key from login API call. This should NOT be used in combination with API Key.", "required": false, "schema": { "type": "string" } }, { "name": "tmp_secret", "in": "query", "description": "Temporary API Secret from login API call. This should NOT be used in combination with API Secret.", "required": false, "schema": { "type": "string" } }, { "name": "rsu_api_key", "in": "query", "description": "API v2 key. If used, you must send the API secret in an HTTP header named X-RSU-API-SECRET.", "required": false, "schema": { "type": "string" } }, { "name": "sp_api_key", "in": "query", "description": "Super partner API key. If used, you must send the API secret in an HTTP header named X-RSU-API-SECRET.", "required": false, "schema": { "type": "string" } }, { "name": "X-RSU-API-SECRET", "in": "header", "description": "API v2 or super partner secret.", "required": false, "schema": { "type": "string" } }, { "name": "format", "in": "query", "description": "Format of response. The default if not sent is `xml`, but `json` is preferred.", "required": false, "schema": { "type": "string", "enum": [ "xml", "json", "csv" ], "default": "xml" } }, { "name": "race_id", "in": "query", "description": "ID of race.", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "query", "description": "ID of event.", "required": true, "schema": { "type": "integer" } }, { "name": "request_format", "in": "query", "description": "Format of request. The default if not sent is `xml`, but `json` is preferred.", "required": false, "schema": { "type": "string", "enum": [ "xml", "json", "csv" ], "default": "xml" } }, { "name": "request", "in": "query", "description": "Request in proper format.", "required": true, "schema": { "type": "string" } } ], "security": [ { "apiKey": [] }, { "apiSecret": [] } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BadRequestError" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedError" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenError" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundError" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerError" } } } } }, "x-permissions": [ "partners", "race_directors", "timers" ] } } } }