Use this API to create or edit race teams.
Teams with a team_id
will be treated as an edit, otherwise a new team will be created.
If you leave off fields from a team, null
will be assumed.
The deleted_team_ids
field can be used to delete race teams as well.
The request
POST parameter should be JSON like shown below.
{ "race_teams": [ { "team_id": 123, "team_name": "API Team 1", "team_type_id": 456, "team_age_restriction_id": null, "team_gender": "F", "team_bib_num": 1 }, { "team_name": "API Team 2", "team_type_id": 456, "team_age_restriction_id": null, "team_gender": "M", "team_bib_num": 2 } ], "deleted_team_ids": [321] }
Field | Type | Required? | Description |
---|---|---|---|
race_teams.team_id |
int |
No | Team ID if editing. |
race_teams.team_name |
string |
Yes | Team name. |
race_teams.team_type_id |
int |
Yes | Team type ID. |
race_teams.team_age_restriction_id |
int |
No | ID associated with an age range on the team type for this team. |
race_teams.team_gender |
string |
No |
Team gender. One of the following:
|
race_teams.team_bib_num |
int |
No | Team bib number. |
deleted_team_ids |
int[] |
No | Team IDs to delete. |
"race_team_ids": [ 123, 234 ], "deleted_team_ids": [ 321 ]
Field | Type | Description |
---|---|---|
race_team_ids |
int[] |
List of race team IDs in the request order. |
deleted_team_ids |
int[] |
List of deleted team IDs in the request order. |
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_ids Required |
GET | ID of event or list of event IDs separated by commas. | id_list |
|
request Required |
POST | JSON containing request data. | string |
{ "openapi": "3.0.3", "info": { "title": "Create or Edit Race Teams", "description": "Create or edit race teams.", "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 Groups/Teams", "description": "APIs related to Race Groups/Teams" } ], "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/teams/manage-teams.json": { "post": { "tags": [ "Race Groups/Teams" ], "summary": "Create or Edit Race Teams", "description": "Create or edit race teams.", "operationId": "v2_teams_manage_teams_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_ids", "in": "query", "description": "ID of event or list of event IDs separated by commas.", "required": true, "schema": { "type": "string" } }, { "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" ] } } } }