Vestigio API Documentation

RESTful API for accessing Vestigio route rankings and athlete data

v1.0 Base URL: https://vestigio.app

Overview

The Vestigio API provides programmatic access to route rankings, trial data, and athlete information. All endpoints return JSON responses and follow RESTful conventions.

Authentication

Currently, the API endpoints are publicly accessible. Future versions may require API keys or OAuth authentication.

GET /api/ranking

Returns the complete ranking for a specific route, including all trial details and athlete information.

Query Parameters

Parameter Type Required Description
id string Yes The route GUID (not the numeric ID)

Request Example

GET /api/ranking?id=abc123-def456-ghi789

Response

Returns a JSON object with route information and an array of ranking entries.

Success Response (200 OK)
{
  "route": {
    "id": 1,
    "name": "Cerro San Cristóbal",
    "description": "Ruta desde Plaza Italia hasta la cumbre",
    "meters": 3500,
    "minutes": 45,
    "city": "Santiago",
    "country": "Chile",
    "guid": "abc123-def456-ghi789"
  },
  "ranking": [
    {
      "trialId": 123,
      "seconds": 1845,
      "timeFormatted": "00:30:45",
      "startMillis": 1704067200000,
      "endMillis": 1704069045000,
      "daysOld": 5,
      "valid": true,
      "suspicious": false,
      "discipline": "Running",
      "user": {
        "id": 45,
        "guid": "user-guid-123",
        "email": "athlete@example.com",
        "publicName": "John Doe",
        "alias": "SpeedRunner",
        "gender": 1,
        "age": 28,
        "city": "Santiago",
        "country": "Chile",
        "instagram": "@speedrunner"
      },
      "startLocation": {
        "id": 10,
        "name": "Plaza Italia",
        "latLong": "-33.4378,-70.6504",
        "city": "Santiago",
        "country": "Chile"
      },
      "endLocation": {
        "id": 11,
        "name": "Cerro San Cristóbal",
        "latLong": "-33.4245,-70.6389",
        "city": "Santiago",
        "country": "Chile"
      }
    }
  ]
}
Error Responses
400 Bad Request

Missing required parameter

{
  "error": "Missing routeId parameter"
}
404 Not Found

Route not found

{
  "error": "Route not found for id=abc123-def456-ghi789"
}

Response Schema

Root Object
  • route (object) - Route information
  • ranking (array) - Array of trial/ranking entries, sorted by time (fastest first)
Route Object
  • id (number) - Route numeric ID
  • name (string) - Route name
  • description (string) - Route description
  • meters (number) - Route distance in meters
  • minutes (number) - Estimated time in minutes
  • city (string) - City where route is located
  • country (string) - Country where route is located
  • guid (string) - Route unique identifier (use this for API calls)
Ranking Entry Object
  • trialId (number) - Trial ID
  • seconds (number) - Elapsed time in seconds
  • timeFormatted (string) - Formatted time (HH:MM:SS)
  • startMillis (number) - Start timestamp in milliseconds
  • endMillis (number) - End timestamp in milliseconds
  • daysOld (number) - Days since the trial was completed
  • valid (boolean) - Whether the trial is valid
  • suspicious (boolean) - Whether the trial is flagged as suspicious
  • discipline (string|null) - Discipline name (e.g., "Running", "Cycling")
  • user (object|null) - Athlete/user information
  • startLocation (object|null) - Start location details
  • endLocation (object|null) - End location details
User Object
  • id (number) - User numeric ID
  • guid (string) - User unique identifier
  • email (string) - User email address
  • publicName (string) - Public display name (alias or email prefix)
  • alias (string|null) - User alias/username
  • gender (number) - Gender (0 = female, 1 = male)
  • age (number) - User age
  • city (string|null) - User city
  • country (string|null) - User country
  • instagram (string|null) - Instagram handle
Location Object
  • id (number) - Location numeric ID
  • name (string) - Location name
  • latLong (string) - Coordinates in "lat,lng" format
  • city (string|null) - City
  • country (string|null) - Country

Notes

  • The ranking is sorted by time (fastest first)
  • Only trials from the last 10 years are included
  • Maximum of 1000 results are returned
  • Use the route guid (not the numeric id) in API calls
  • Timestamps are in milliseconds since Unix epoch

Coming Soon

Additional API endpoints will be documented here as they become available. Check back regularly for updates.

Support

For questions, issues, or feature requests related to the API, please contact us.