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://runsignup.com/API", "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": "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": "csv", "in": "query", "description": "CSV/GRU file contents.", "required": true, "schema": { "type": "string" } }, { "name": "result_set_name", "in": "query", "description": "Name of result set.", "required": false, "schema": { "type": "string", "default": "Results" } }, { "name": "public_results", "in": "query", "description": "Indicates whether the results should be publicly visible.", "required": false, "schema": { "type": "boolean", "enum": [ "T", "F" ], "default": "T" } }, { "name": "results_source_name", "in": "query", "description": "Optional name of the source that provided the results.", "required": false, "schema": { "type": "string" } }, { "name": "results_source_url", "in": "query", "description": "Optional URL of the source that provided the results.", "required": false, "schema": { "type": "string" } }, { "name": "result_questions_contact_email", "in": "query", "description": "Optional email address that will be used when participants have questions or issues related to the results.", "required": false, "schema": { "type": "string" } }, { "name": "result_questions_url", "in": "query", "description": "Optional URL to use for participants who have questions or issues related to the results.", "required": false, "schema": { "type": "string" } }, { "name": "preliminary_results", "in": "query", "description": "Indicates whether the results should display a \"Preliminary Results\" notice.", "required": false, "schema": { "type": "boolean", "enum": [ "T", "F" ], "default": "F" } }, { "name": "first_name_col", "in": "query", "description": "Column index (starting at zero) of the row containing first name.", "required": false, "schema": { "type": "integer" } }, { "name": "last_name_col", "in": "query", "description": "Column index (starting at zero) of the row containing last name.", "required": false, "schema": { "type": "integer" } }, { "name": "place_col", "in": "query", "description": "Column index (starting at zero) of the row containing the finishing place.", "required": false, "schema": { "type": "integer" } }, { "name": "bib_col", "in": "query", "description": "Column index (starting at zero) of the row containing bib number.", "required": false, "schema": { "type": "integer" } }, { "name": "age_col", "in": "query", "description": "Column index (starting at zero) of the row containing the runner's age.", "required": false, "schema": { "type": "integer" } }, { "name": "gender_col", "in": "query", "description": "Column index (starting at zero) of the row containing runner's gender.", "required": false, "schema": { "type": "integer" } }, { "name": "city_col", "in": "query", "description": "Column index (starting at zero) of the row containing runner's city.", "required": false, "schema": { "type": "integer" } }, { "name": "state_col", "in": "query", "description": "Column index (starting at zero) of the row containing runner's state.", "required": false, "schema": { "type": "integer" } }, { "name": "clock_time_col", "in": "query", "description": "Column index (starting at zero) of the row containing runner's clock time.", "required": false, "schema": { "type": "integer" } }, { "name": "chip_time_col", "in": "query", "description": "Column index (starting at zero) of the row containing runner's chip time.", "required": false, "schema": { "type": "integer" } }, { "name": "avg_pace_col", "in": "query", "description": "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.", "required": false, "schema": { "type": "integer" } }, { "name": "age_percentage_col", "in": "query", "description": "Column index (starting at zero) of the row containing runner's age percentage. If not provided, it will be automatically calculated.", "required": false, "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" ] } } } }