> For the complete documentation index, see [llms.txt](https://docs.racemap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.racemap.com/api/times.md). Agents can also search and read this documentation through its [MCP server](https://docs.racemap.com/~gitbook/mcp).

# \*/times, reads and raw data

API with passings or detections (raw data timestamps) at virtual checkpoints respectively geofences, similar to a reader

{% hint style="info" %}
The \*/times API generates a [detection](https://docs.racemap.com/glossary.md#read) from a received location if it fulfills three conditions. The API can provide multiple detections for a split.

* The device belongs to the event.

* The location is within the detection radius of a geofence.

* The timestamp of the location is between the event start and end time.
  {% endhint %}

* **Effortless** [**detections**](https://docs.racemap.com/glossary.md#read) with virtual timekeeping points (geofence) and with geolocations of participants. No timing hardware, no transponders.

* [**Passings**](https://docs.racemap.com/glossary.md#read) **are recorded in a radius** around the geofence. Set the radius in the Data API settings of your event.

* **Flexibly adjust settings in between:** add timekeeping points or change their locations of a running event or even of a past event, recalculate detections with new parameters.

**Live sample** <https://racemap.com/api/data/v1/61a21210e5d45d000199f7d9/times>\
**Past sample** <https://racemap.com/api/data/v1/60a3b443f096f800018add7c/times>

### Reference

## Detections at virtual timekeeping points

> Detections of all participants at the event's timekeeping splits (geofences). A location\
> becomes a detection when:\
> \
> \- the device belongs to the event,\
> \- the location lies within the detection radius around a split (set in the Data API settings),\
> \- its timestamp lies between the event's start and end time.\
> \
> A split can have several detections per participant.

```json
{"openapi":"3.1.0","info":{"title":"Racemap API v1","version":"1"},"tags":[{"name":"Data API","description":"Live and historic tracking data of an event. No authentication."}],"servers":[{"url":"https://racemap.com"}],"security":[],"paths":{"/api/data/v1/{eventId}/times":{"get":{"tags":["Data API"],"operationId":"getTimes","summary":"Detections at virtual timekeeping points","description":"Detections of all participants at the event's timekeeping splits (geofences). A location\nbecomes a detection when:\n\n- the device belongs to the event,\n- the location lies within the detection radius around a split (set in the Data API settings),\n- its timestamp lies between the event's start and end time.\n\nA split can have several detections per participant.","parameters":[{"$ref":"#/components/parameters/EventId"},{"$ref":"#/components/parameters/Now"}],"responses":{"200":{"description":"The event with its timekeeping splits and the detections of every participant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"components":{"parameters":{"EventId":{"name":"eventId","in":"path","required":true,"description":"Id of the event.","schema":{"$ref":"#/components/schemas/ObjectId"}},"Now":{"name":"now","in":"query","description":"UTC timestamp that defines the reference time of the response. Defaults to the request time.\nLocations recorded after `now` are ignored.","schema":{"type":"string","format":"date-time"}}},"schemas":{"ObjectId":{"type":"string","description":"12-byte ObjectId as 24-character hexadecimal string.","pattern":"^[0-9a-fA-F]{24}$"},"TimesResponse":{"type":"object","required":["name","location","startTime","endTime","timekeepings","starters"],"properties":{"name":{"type":"string","description":"Name of the event."},"location":{"type":"string","description":"Location of the event. Empty if not set."},"startTime":{"type":"string","format":"date-time","description":"Start time in UTC."},"endTime":{"type":"string","format":"date-time","description":"End time in UTC."},"timekeepings":{"type":"array","description":"Splits with timekeeping enabled. `offset` is rounded to 10 m; `position` is always present.","items":{"$ref":"#/components/schemas/TimekeepingDistance"}},"starters":{"type":"array","description":"The participants.","items":{"$ref":"#/components/schemas/TimesParticipant"}}}},"TimekeepingDistance":{"type":"object","description":"A split at a distance along the shadowtrack.","required":["name","offset","id"],"properties":{"name":{"type":"string","description":"Name of the split. Unnamed timekeeping splits are called `Start`, `Finish` or `Split <n>`.\nGenerated intermediate splits have an empty name."},"offset":{"type":"number","description":"Distance [m] along the shadowtrack."},"position":{"$ref":"#/components/schemas/Position"},"id":{"allOf":[{"$ref":"#/components/schemas/ObjectId"}],"description":"Unique Racemap id of the split. Generated splits have a stable virtual id."}}},"Position":{"type":"array","description":"Longitude, latitude and altitude [m].","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}],"minItems":3,"maxItems":3},"TimesParticipant":{"allOf":[{"$ref":"#/components/schemas/ParticipantShortInfo"},{"type":"object","required":["times"],"properties":{"times":{"type":["object","null"],"description":"Detections per timekeeping split, keyed by split id, in the order of `timekeepings`.\nEvery split has a key; a split without detections has an empty array. `null` if the\nparticipant has no location between `startTime` and `now`.","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Detection"}}}}}]},"ParticipantShortInfo":{"type":"object","description":"Short information of a participant.","required":["id","importId","startNumber","name"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/ObjectId"}],"description":"Unique Racemap id of the participant."},"importId":{"type":["string","null"],"description":"User-defined id from imported participant data: `importId` of the Generic API or `Id` of\nthe RACE|RESULT API. `null` if no import id exists."},"startNumber":{"type":["string","null"],"description":"Bib number."},"name":{"type":["string","null"],"description":"Name."}}},"Detection":{"type":"object","required":["time","distanceToSplit"],"properties":{"time":{"type":"string","format":"date-time","description":"UTC timestamp of the detection."},"distanceToSplit":{"type":"number","description":"Distance [m] of the detection from the timekeeping split."}}}},"responses":{"BadRequest":{"description":"Invalid request, or the event does not allow the call. Examples:\n\n- `Invalid query: …` for a malformed query parameter (id, timestamp, number) or a missing\n  required one,\n- `avgSpeedWindow must be >= 30 seconds`,\n- `Provide either 'participantId' or 'startNumber', not both`,\n- `Only up to 2 divisions are allowed`,\n- `Data API (Datafeed) not activated or event is archived or not activated` when the event is\n  not activated, archived, its Data API module is off, or it was just auto-paused,\n- `Event is not enabled for prediction.` (unified only).","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Unknown event (`Event not found`), participant, split or shadowtrack, or an id in the path\nthat is not a valid ObjectId (`Not found`).","content":{"text/plain":{"schema":{"type":"string"}}}},"ServerError":{"description":"Racemap could not load the event data.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}
```

* `times` holds one entry per timekeeping point, keyed by its `id`. A timekeeping point without detections has an empty array.
* `times` is `null` if the participant has no locations within the event time.
* The `offset` of a timekeeping point is rounded to 10 m.

### Detections of one timekeeping point

Add the `id` of a timekeeping point to the path to get all its [reads](https://docs.racemap.com/glossary.md#read) as one list. The list is ordered by time within each participant, not across participants. An `id` of a split without timekeeping fails with HTTP 404.

* Live sample split "Split 3"\
  [https://racemap.com/api/data/v1/61a21210e5d45d000199f7d9/times/**6450e60747adaed475b484b4**](https://racemap.com/api/data/v1/61a21210e5d45d000199f7d9/times/6450e60747adaed475b484b4)
* Past sample split "Finish"\
  [https://racemap.com/api/data/v1/60a3b443f096f800018add7c/times/**64513872c3ab09659eb09683**](https://racemap.com/api/data/v1/60a3b443f096f800018add7c/times/64513872c3ab09659eb09683)

## Detections at one timekeeping point

> All detections at one timekeeping split as a flat list. Detections are ordered by time within\
> each participant, not across participants.

```json
{"openapi":"3.1.0","info":{"title":"Racemap API v1","version":"1"},"tags":[{"name":"Data API","description":"Live and historic tracking data of an event. No authentication."}],"servers":[{"url":"https://racemap.com"}],"security":[],"paths":{"/api/data/v1/{eventId}/times/{splitId}":{"get":{"tags":["Data API"],"operationId":"getSplitTimes","summary":"Detections at one timekeeping point","description":"All detections at one timekeeping split as a flat list. Detections are ordered by time within\neach participant, not across participants.","parameters":[{"$ref":"#/components/parameters/EventId"},{"name":"splitId","in":"path","required":true,"description":"Id of a split with timekeeping enabled.","schema":{"$ref":"#/components/schemas/ObjectId"}},{"$ref":"#/components/parameters/Now"}],"responses":{"200":{"description":"The detections at the split.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitTimesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"components":{"parameters":{"EventId":{"name":"eventId","in":"path","required":true,"description":"Id of the event.","schema":{"$ref":"#/components/schemas/ObjectId"}},"Now":{"name":"now","in":"query","description":"UTC timestamp that defines the reference time of the response. Defaults to the request time.\nLocations recorded after `now` are ignored.","schema":{"type":"string","format":"date-time"}}},"schemas":{"ObjectId":{"type":"string","description":"12-byte ObjectId as 24-character hexadecimal string.","pattern":"^[0-9a-fA-F]{24}$"},"SplitTimesResponse":{"type":"object","required":["name","location","startTime","endTime","timekeepingId","timekeepingName","times"],"properties":{"name":{"type":"string","description":"Name of the event."},"location":{"type":"string","description":"Location of the event. Empty if not set."},"startTime":{"type":"string","format":"date-time","description":"Start time in UTC."},"endTime":{"type":"string","format":"date-time","description":"End time in UTC."},"timekeepingId":{"allOf":[{"$ref":"#/components/schemas/ObjectId"}],"description":"Id of the split."},"timekeepingName":{"type":"string","description":"Name of the split."},"times":{"type":"array","description":"One entry per detection. Ordered by time within each participant, not across participants.","items":{"$ref":"#/components/schemas/SplitDetection"}}}},"SplitDetection":{"allOf":[{"$ref":"#/components/schemas/ParticipantShortInfo"},{"$ref":"#/components/schemas/Detection"}]},"ParticipantShortInfo":{"type":"object","description":"Short information of a participant.","required":["id","importId","startNumber","name"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/ObjectId"}],"description":"Unique Racemap id of the participant."},"importId":{"type":["string","null"],"description":"User-defined id from imported participant data: `importId` of the Generic API or `Id` of\nthe RACE|RESULT API. `null` if no import id exists."},"startNumber":{"type":["string","null"],"description":"Bib number."},"name":{"type":["string","null"],"description":"Name."}}},"Detection":{"type":"object","required":["time","distanceToSplit"],"properties":{"time":{"type":"string","format":"date-time","description":"UTC timestamp of the detection."},"distanceToSplit":{"type":"number","description":"Distance [m] of the detection from the timekeeping split."}}}},"responses":{"BadRequest":{"description":"Invalid request, or the event does not allow the call. Examples:\n\n- `Invalid query: …` for a malformed query parameter (id, timestamp, number) or a missing\n  required one,\n- `avgSpeedWindow must be >= 30 seconds`,\n- `Provide either 'participantId' or 'startNumber', not both`,\n- `Only up to 2 divisions are allowed`,\n- `Data API (Datafeed) not activated or event is archived or not activated` when the event is\n  not activated, archived, its Data API module is off, or it was just auto-paused,\n- `Event is not enabled for prediction.` (unified only).","content":{"text/plain":{"schema":{"type":"string"}}}},"NotFound":{"description":"Unknown event (`Event not found`), participant, split or shadowtrack, or an id in the path\nthat is not a valid ObjectId (`Not found`).","content":{"text/plain":{"schema":{"type":"string"}}}},"ServerError":{"description":"Racemap could not load the event data.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}
```

### Export to RACE|RESULT

RACE|RESULT event settings: Main Window, Simple API

* Type: Custom
* Details: rawdata/addmanual

Settings create an API key to push external data to RACE|RESULT. The duration of the key is limited. Sample: <https://api.raceresult.com/180472/G5XQYZKPIPU5J1RSCVIZ48QKVU5JIIJP>

![](https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2Fgit-blob-a1af662337bf21ab7bd06ac5d8a00f3f59a1c067%2Fscreenshot-events.raceresult.com-2021.09.10-15_28_26.png?alt=media)

Data from Racemap \*/times API need be transferred to RACE|RESULT API format, e.g. with a python script:

* syntax: <https://api.raceresult.com/`eventId`/`apiKey`?&`bib`=bibNumber&`time`=timeOfDetections&`TimingPoint`=splitName>
* timeOfDetections in seconds
* sample: <https://api.raceresult.com/180472/G5XQYZKPIPU5J1RSCVIZ48QKVU5JIIJP?&bib=1&time=36600&TimingPoint=Messstelle1>

Using this format virtual detections are imported in RACE|RESULT one by one.

![](https://1672210197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSRNxaH2Ju9Flr7JhJD%2Fuploads%2Fgit-blob-00ef78c636d7222e174bab858558952cae058dc1%2Fscreenshot-events.raceresult.com-2021.09.10-15_44_34.png?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.racemap.com/api/times.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
