---
title: "Score A Race"
method: POST
path: "/score"
---

# Score A Race

`POST /score`

## Request

- Base URL: `https://safefamilyapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://safefamilyapp.com/score`
- Auth: none declared

Validate a results file and score it against a course, without an account and without
keeping anything. The course is a GPX file (`gpx`), measured like any OTRI course: a score
rests on where the climbing is, which a distance and a climb figure cannot say, so there is no
scoring from official figures here. `?format=csv` returns the scored list as a CSV download.
An invalid results file answers 200 with `is_valid: false` and the issues.

## Query parameters

- `format` string

## Response `200`

Successful Response

- ScoreRaceResult: `POST /score`: a results file validated and scored against a course, and nothing kept.
  - `is_valid` boolean, required
  - `errors` ValidationIssueOut[], required
    - `severity` string, required
    - `row` integer, nullable, required
    - `field` string, nullable, required
    - `message` string, required
  - `warnings` ValidationIssueOut[], required
    - `severity` string, required
    - `row` integer, nullable, required
    - `field` string, nullable, required
    - `message` string, required
  - `scores` RunnerScoreOut[]
    - `rank` union, required
      - integer
      - string
    - `bib_number` string, nullable, required
    - `family_name` string, required
    - `first_name` string, required
    - `otri_score` integer, nullable
    - `base_performance` number
    - `course_adjustment` number
    - `field_adjustment` number
    - `environmental_factor` number
    - `confidence` string
    - `scoring_version` string, required
    - `status` string
    - `performance_rate` number
    - `quality_flags` string[]
    - `finish_time_seconds` integer, nullable
    - `runner_id` string, nullable
    - `gender` string, nullable
    - `nationality` string, nullable
  - `columns` object
  - `ignored_columns` string[]
  - `stored` boolean
  - `scoring_version` string, required
  - `course` ScoredCourse, required: The course a results file was scored against, as `POST /score` understood it.
    - `name` string, nullable
    - `source` string
    - `distance_km` number, required
    - `elevation_gain_m` number, required
    - `confidence` string, nullable
    - `quality_flags` string[]
    - `not_scored_reason` string, nullable
  - `summary` ScoreSummary
    - `finishers` integer
    - `non_finishers` integer
    - `best_score` integer, nullable
    - `median_score` integer, nullable
  - `measurement` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/safefamilyapp/apis/otri-api.md) · [All operations](https://skmtc.dev/safefamilyapp/apis/otri-api/llms.txt) · [OpenAPI document](https://skmtc.dev/safefamilyapp/apis/otri-api/revisions/d07bb03cb836?raw)
