Skip to content

IOF XML upload

If your program can export IOF XML 3.0 — a start list (StartList) or a result list (ResultList) — you get online results without a separate integration: upload the file with the same source key.

Terminal window
curl --data-binary @results.xml \
-H 'Content-Type: application/xml' -H "Authorization: Bearer $KEY" \
'https://api.ruunso.com/live/v1/iof?race=1'

The race parameter is the source’s race ID (default 1). The body is XML in UTF-8 only (another encoding in the prolog gives iof_encoding). The maximum file size is 20 MB (iof_too_large, HTTP 413).

Response:

{"accepted": 142, "stale": 0, "removed": 0, "rejected": [], "resync_required": false}

The fields are the same as in Push, plus removed — the number of participants marked as deleted.

How data is mapped

  • Groups, courses, controls, participants and teams (relays with legs) become online records; IOF statuses are mapped to ours (OK, MissingPunch, Disqualified, DidNotFinish, DidNotStart, OverTime, NotCompeting, Active, Inactive). Also: Finished (finished, not yet validated) → ok, SportingWithdrawal → dnf; Moved and MovedUp — no record in this group (the person is in the new one), DidNotEnter and Cancelled — the stored participant is removed. An unknown status rejects only that record (record_invalid) and does not remove an already stored participant.
  • If the race given by race does not exist yet, the upload creates it (name from Event/Name, day = race number); an existing race is left unchanged.
  • A participant’s identifier is Person/Id, a team’s is EntryId. If absent, it is built from group, name and club — uploading the same file again finds the same records.
  • Times without a time zone are taken in the event’s time zone.
  • Uploading the same file again changes nothing: everything goes to stale.

Complete and Delta

The status attribute of the root element decides what happens to participants missing from the file:

status Behavior
Complete, Snapshot participants and teams of groups present in the file that are missing from it are marked deleted; other groups are untouched
Delta add and replace only
absent ResultList — same as Complete (the IOF.xsd default); StartList — same as Delta

Only records created by IOF XML upload (ID starts with iof:) are deleted: data sent by a program through Push stays.

Errors

iof_invalid (HTTP 400, file not parsed), iof_encoding (400, not UTF-8), iof_too_large (413), and key errors as in Push: key_invalid, key_expired, key_revoked (401), ingest_stopped (409), rate_limited (429).