Universal API description
This interface is used to synchronise racers to the RaceMeter device. This is important for those who have racer registrations (and therefore racer lists) available on their website.
The API url and API token are set in the RaceMeter device in the race synchronization settings.
To the address specified in the API url item, a GET request is made to which the Authorization item is added to the header and its content is set to "Bearer "+{API_TOKEN}
. It is recommended to check the Authorization item in the API implementation and return the 401 – Unauthorized response status code if it does not exist or if the value is different from the required value.
In the case of legitimate access, a JSON array response is expected that contains a list of all racers registered in the race.
The structure of a single racer record is as follows and unless otherwise specified for an entry, it is a text entry:
- start_number – An entry containing the racer’s start number. It is of type integer and is a mandatory entry. A racer without a start number does not exist for RaceMeter.
- If “Auto divide names” is not set in the race, the name of the racer is expected in first_name and last_name. Otherwise the racer’s name is imported from the full_name entry.
- team – The entry containing the team is optional.
- phone – The entry containing the telephone number is optional.
- email – The entry containing email is optional.
- year_of_birth – The year of birth item is of type integer and will only be used if the race is set to “Use year of birth”.
- date_of_birth – The date of birth entry is text and should contain the date in ISO format. So for 24.7.1999 it is
1999-7-24
. It will only be used if “Use date of birth” is set in the race. - category – The category entry will only be used if the race is set to “Use categories”.
- country – The country entry will only be used if the race is set to “Use countries”.
- gender – The gender entry will only be used if the race is set to “Use gender”.
- reg_number – The entry containing the racer’s registration number will only be used if the race is set to “Use registration numbers”.
- description – The entry containing the racer’s additional description will only be used if the race is set to “Use description”.
- size – The entry containing the racer’s size will only be used if the race is set to “Use size”.
- coefficient – The entry containing the conversion factor for a given racer will only be used if “Use coefficient” is set for that race. The item is of type float.
- additional_duration – An entry containing an additional duration for a given racer will only be used if “Use additional duration” is set for that race. The entry may be of type float or integer and contain the additional duration in seconds, or it may be of type text and in the format
hh:mm:ss.xx
ormm:ss.xx
or justss.xx
. - additional_distance – An entry containing an additional distance for a given racer will only be used if the race is set to “Use additional distance”. The item can be of type float or integer and contain the additional distance in meters.
- start_time – The entry containing the start time of the racer will only be used if the race has the start type set to “Individual starts”. The entry can be of type integer and must then contain the number of milliseconds since the start of the day, or it can be of type text and be in the format
hh:mm:ss
. - start_delay – The entry containing the time delay of the racer from the start is only used if the race has the start type set to “Interval start”.The entry can be of type integer and then must contain the number of seconds, or it can be of type text and is in the format
hh:mm:ss
ormm:ss
or justss
. - chip_number – An entry containing the 1st chip number of the racer. The entry is used if the synchronization is set to take the chip number from the chip number field.
- chip2_number – An entry containing the 2nd chip number of the racer. The entry is used if the race is set to use a second chip and the synchronization is set to take the 2nd chip number from the chip number field.
- chip3_number – An entry containing the 3rd chip number of the racer. The entry is used if the race is set to use a third chip and the synchronization is set to take the 3rd chip number from the chip number field.
- chip4_number – An entry containing the 4th chip number of the racer. The entry is used if the race is set to use fourth chip and the synchronization is set to take the 4th chip number from the chip number field.
The RaceMeter web interface includes a test service that listens at:
https://racemeter.xyz/api/v2/racers/test_get_racers
and requires an API token abrakadabrasupertoken
This service is used to test the synchronization or get more detailed information about the data and returns test (generated) data with 60 racers.