Use this API to create or edit divisions for an event.
Divisions with a race_division_id
set will be treated as an edit, otherwise a new division will be created.
Each division must include a division_priority
.
Use the division_external_identifier
field to identify the source of the division. It can be a string or JSON format and should be 128 characters or less.
The request format is below.
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.
{ "division_placement_field": "clock_time", "overall_division": { "awards_for_top_num": 3, "time_display_field": null }, "race_divisions": [ { "race_division_id": null, "division_name": "Female 1-19", "division_short_name": "F0119", "show_top_num": 3, "division_priority": 1, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|1", "auto_selection_criteria": { "min_age": 1, "max_age": 19, "gender": "F" } }, { "race_division_id": null, "division_name": "Female 20-29", "division_short_name": "F2029", "show_top_num": 3, "division_priority": 2, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|2", "auto_selection_criteria": { "min_age": 20, "max_age": 29, "gender": "F" } }, { "race_division_id": null, "division_name": "Female 30-39", "division_short_name": "F3039", "show_top_num": 3, "division_priority": 3, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|3", "auto_selection_criteria": { "min_age": 30, "max_age": 39, "gender": "F" } }, { "race_division_id": null, "division_name": "Female 40-49", "division_short_name": "F4049", "show_top_num": 3, "division_priority": 4, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|4", "auto_selection_criteria": { "min_age": 40, "max_age": 49, "gender": "F" } }, { "race_division_id": null, "division_name": "Female 50-59", "division_short_name": "F5059", "show_top_num": 3, "division_priority": 5, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|5", "auto_selection_criteria": { "min_age": 50, "max_age": 59, "gender": "F" } }, { "race_division_id": null, "division_name": "Female 60-69", "division_short_name": "F6069", "show_top_num": 3, "division_priority": 6, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|6", "auto_selection_criteria": { "min_age": 60, "max_age": 69, "gender": "F" } }, { "race_division_id": null, "division_name": "Female 70-79", "division_short_name": "F7079", "show_top_num": 3, "division_priority": 7, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|7", "auto_selection_criteria": { "min_age": 70, "max_age": 79, "gender": "F" } }, { "race_division_id": null, "division_name": "Female 80-99", "division_short_name": "F8099", "show_top_num": 3, "division_priority": 8, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|8", "auto_selection_criteria": { "min_age": 80, "max_age": 99, "gender": "F" } }, { "race_division_id": null, "division_name": "Male 1-19", "division_short_name": "M0119", "show_top_num": 3, "division_priority": 9, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|9", "auto_selection_criteria": { "min_age": 1, "max_age": 19, "gender": "M" } }, { "race_division_id": null, "division_name": "Male 20-29", "division_short_name": "M2029", "show_top_num": 3, "division_priority": 10, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|10", "auto_selection_criteria": { "min_age": 20, "max_age": 29, "gender": "M" } }, { "race_division_id": null, "division_name": "Male 30-39", "division_short_name": "M3039", "show_top_num": 3, "division_priority": 11, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|11", "auto_selection_criteria": { "min_age": 30, "max_age": 39, "gender": "M" } }, { "race_division_id": null, "division_name": "Male 40-49", "division_short_name": "M4049", "show_top_num": 3, "division_priority": 12, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|12", "auto_selection_criteria": { "min_age": 40, "max_age": 49, "gender": "M" } }, { "race_division_id": null, "division_name": "Male 50-59", "division_short_name": "M5059", "show_top_num": 3, "division_priority": 13, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|13", "auto_selection_criteria": { "min_age": 50, "max_age": 59, "gender": "M" } }, { "race_division_id": null, "division_name": "Male 60-69", "division_short_name": "M6069", "show_top_num": 3, "division_priority": 14, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|14", "auto_selection_criteria": { "min_age": 60, "max_age": 69, "gender": "M" } }, { "race_division_id": null, "division_name": "Male 70-79", "division_short_name": "M7079", "show_top_num": 3, "division_priority": 15, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|15", "auto_selection_criteria": { "min_age": 70, "max_age": 79, "gender": "M" } }, { "race_division_id": null, "division_name": "Male 80-99", "division_short_name": "M8099", "show_top_num": 3, "division_priority": 16, "allow_winner_of_higher_priority": "F", "hidden_in_main_results": "F", "time_display_field": null, "division_external_identifier": "rdscoring|age_group|16", "auto_selection_criteria": { "min_age": 80, "max_age": 99, "gender": "M" } }, ] }
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 |
Parameter | HTTP Method | Default | Description | Datatype |
---|---|---|---|---|
race_id Required |
GET | Race ID. | uint |
|
event_id Required |
GET | Event ID. | uint |
|
request Required |
POST | JSON containing request data. | string |
{ "openapi": "3.0.3", "info": { "title": "Create or Edit Race Divisions", "description": "Create or edit 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": { "/v2/divisions/manage-divisions.json": { "post": { "tags": [ "Race Divisions" ], "summary": "Create or Edit Race Divisions", "description": "Create or edit race divisions.", "operationId": "v2_divisions_manage_divisions_json", "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": "race_id", "in": "query", "description": "Race ID.", "required": true, "schema": { "type": "integer" } }, { "name": "event_id", "in": "query", "description": "Event ID.", "required": true, "schema": { "type": "integer" } }, { "name": "request", "in": "query", "description": "JSON containing request data.", "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" ] } } } }