Post a user submitted race result to the API.
The individual_result_set_id parameter is required if you have multiple result sets for an event. If not set, the existing result set will be used if it exists. Otherwise, a new result set will be automatically created.
The event_id must be for a Virtual Event.
Format for clock_time is hhh:mm:ss.s, but you can also use the strings “DQ”, “DNS”, “DNF”, or “DNQ”.
The request parameter depends on request_format.
For 'json', the request should be an object with a 'virtual_results' property, which is an array.
Each result will be an object with field values being stored as the property with that field name.
You must include either registration_id
or bib_num
.
If registration_id
is set and bib_num
is not set or does not match the bib number associated with registration_id
, the bib number associated with registration_id
will be used for the result.
If bib_num
is set and registration_id
is not set, the registration id associated with bib_num
will be used for the result.
The tally_value
is optional. If not set, it will not be changed. If set, but empty or null, it will be cleared.
If elevation gain is allowed for the virtual event, then elevation_gain_in_mm
is required. Otherwise elevation gain will not be set.
An example is below.
{ "virtual_results": [ { "bib_num": 123, "clock_time": "00:17:00.1", "tally_value": null, "registration_id": 3210, "elevation_gain_in_mm": 1200 }, { "bib_num": 456, "clock_time": "00:17:00.2", "tally_value": 1.75, "registration_id": 3211, "elevation_gain_in_mm": 12000 } ] }
Response
{ "virtual_results": [ { "registration_id": 8106676, "bib_num": 1, "results_received_ts": 1586571360, "individual_result_set_id": 17030, "submitted_time_in_ms": 1020000, "elevation_gain_in_mm": 1200, "result_approval_ts": null } ] }
For 'xml', the request should look like the example below.
<request> <virtual_result> <bib_num>123</bib_num> <clock_time>00:17:00.1</clock_time> <tally_value></tally_value> <registration_id>3210</registration_id> </virtual_result> <virtual_result> <bib_num>987</bib_num> <clock_time>00:17:02.5</clock_time> <tally_value>1.75</tally_value> <registration_id>3211</registration_id> </virtual_result> </request>
Response
<event_individual_results_user_upload> <virtual_results> <virtual_result> <registration_id>2645519</registration_id> <bib_num>1</bib_num> <results_received_ts>1586572952</results_received_ts> <individual_result_set_id>895</individual_result_set_id> <submitted_time_in_ms>1020500</submitted_time_in_ms> <result_approval_ts></result_approval_ts> </virtual_result> </virtual_results> </event_individual_results_user_upload>
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 |
|
individual_result_set_id |
POST | ID of result set. | 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 User Submitted Virtual Results", "description": "Post user submitted results for a virtual event.", "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/user-results": { "post": { "tags": [ "Results" ], "summary": "Post User Submitted Virtual Results", "description": "Post user submitted results for a virtual event.", "operationId": "race_:race_id_results_user_results", "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": "individual_result_set_id", "in": "query", "description": "ID of result set.", "required": false, "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" ] } } } }