Create a new result set from a CSV or GRU results file. The CSV/GRU file should contain column headers on the first line and results on the following lines.
You will need to specify which columns in your CSV/GRU file correspond to our columns. The first column is index zero. For example, if first name is in the first column, you should set first_name_col to 0. Alternatively, you can name your columns the same as our headings. For example, set the first name column heading to "first_name" instead of sending first_name_col.
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 |
|
csv Required |
POST | CSV/GRU file contents. | string |
|
result_set_name |
POST | Results | Name of result set. | string |
public_results |
POST | T | Indicates whether the results should be publicly visible. | bool |
results_source_name |
POST | Optional name of the source that provided the results. | string |
|
results_source_url |
POST | Optional URL of the source that provided the results. | string |
|
result_questions_contact_email |
POST | Optional email address that will be used when participants have questions or issues related to the results. | string |
|
result_questions_url |
POST | Optional URL to use for participants who have questions or issues related to the results. | string |
|
preliminary_results |
POST | F | Indicates whether the results should display a "Preliminary Results" notice. | bool |
Parameter | HTTP Method | Default | Description | Datatype |
---|---|---|---|---|
first_name_col |
POST | Column index (starting at zero) of the row containing first name. | uint |
|
last_name_col |
POST | Column index (starting at zero) of the row containing last name. | uint |
|
place_col |
POST | Column index (starting at zero) of the row containing the finishing place. | uint |
|
bib_col |
POST | Column index (starting at zero) of the row containing bib number. | uint |
|
age_col |
POST | Column index (starting at zero) of the row containing the runner's age. | uint |
|
gender_col |
POST | Column index (starting at zero) of the row containing runner's gender. | uint |
|
city_col |
POST | Column index (starting at zero) of the row containing runner's city. | uint |
|
state_col |
POST | Column index (starting at zero) of the row containing runner's state. | uint |
|
clock_time_col |
POST | Column index (starting at zero) of the row containing runner's clock time. | uint |
|
chip_time_col |
POST | Column index (starting at zero) of the row containing runner's chip time. | uint |
|
avg_pace_col |
POST | Column index (starting at zero) of the row containing runner's average pace. If not provided, the pace will be calculated from the time and distance. | uint |
|
age_percentage_col |
POST | Column index (starting at zero) of the row containing runner's age percentage. If not provided, it will be automatically calculated. | uint |
{ "openapi": "3.0.3", "info": { "title": "Import CSV/GRU Results", "description": "Create a new result set from a CSV or GRU results file.", "version": "1.0.0", "contact": { "name": "RunSignup API Support", "url": "https://runsignup.com/API", "email": "info@runsignup.com" } }, "servers": [ { "url": "https://api.runsignup.com/rest", "description": "Production API Server" } ], "tags": [ { "name": "Results", "description": "APIs related to Results" } ], "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}/results/csv-import": { "post": { "tags": [ "Results" ], "summary": "Import CSV/GRU Results", "description": "Create a new result set from a CSV or GRU results file.", "operationId": "race_:race_id_results_csv_import", "parameters": [ { "name": "race_id", "in": "path", "description": "Path parameter: race_id", "required": true, "schema": { "type": "string" } }, { "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": "event_id", "in": "query", "description": "ID of event.", "required": true, "schema": { "type": "integer" } } ], "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" ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "csv": { "type": "string" }, "result_set_name": { "type": "string", "default": "Results" }, "public_results": { "type": "boolean", "enum": [ "T", "F" ], "default": "T" }, "results_source_name": { "type": "string" }, "results_source_url": { "type": "string" }, "result_questions_contact_email": { "type": "string" }, "result_questions_url": { "type": "string" }, "preliminary_results": { "type": "boolean", "enum": [ "T", "F" ], "default": "F" }, "first_name_col": { "type": "integer" }, "last_name_col": { "type": "integer" }, "place_col": { "type": "integer" }, "bib_col": { "type": "integer" }, "age_col": { "type": "integer" }, "gender_col": { "type": "integer" }, "city_col": { "type": "integer" }, "state_col": { "type": "integer" }, "clock_time_col": { "type": "integer" }, "chip_time_col": { "type": "integer" }, "avg_pace_col": { "type": "integer" }, "age_percentage_col": { "type": "integer" } }, "required": [ "csv" ] } } } } } } } }