{
  "info": {
    "name": "TopHeats API v1",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Public competition data. Open this collection's **Variables** tab and enter your own values.\n\n- `base_url`: Use `https://topheats.ru/api/v1` with the Russian guide or `https://topheats.com/api/v1` with the English guide.\n- `event_id`: Copy the ID from your event's page URL. For example, the ID in `/events/272` is `272`.\n- `sport_id`: Send **List sports** (`GET {{base_url}}/sports?locale=ru`) and copy the `id` of your sport from the `data` array.\n\nBefore sending requests, add `topheats-api-key` to Postman Local Vault and set **Allowed domains** to the hostname in `base_url`.\n\nFor the local example, use `http://localhost:3000/api/v1`, sport ID `10`, and event ID `272`. Use a local API key scoped to event 272, set **Allowed domains** to `localhost`, and enable the preset `from` and `to` filters in **List events** to reproduce the example date range."
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{vault:topheats-api-key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://topheats.ru/api/v1",
      "description": "Use https://topheats.ru/api/v1 with the Russian guide or https://topheats.com/api/v1 with the English guide."
    },
    {
      "key": "sport_id",
      "value": "10",
      "description": "Replace the sample ID with your sport's id from the data array returned by GET {{base_url}}/sports?locale=ru."
    },
    {
      "key": "event_id",
      "value": "272",
      "description": "Replace the sample ID with the ID from your event's page URL. For example, /events/272 has event ID 272."
    }
  ],
  "item": [
    {
      "name": "List sports",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{base_url}}/sports?locale=ru",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "sports"
          ],
          "query": [
            {
              "key": "locale",
              "value": "ru",
              "description": "Response language (ru, en, zh)",
              "disabled": false
            }
          ]
        },
        "description": "Lists sports with published events accessible to the API key."
      },
      "response": []
    },
    {
      "name": "List events",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{base_url}}/events?sport_id={{sport_id}}&locale=ru&page=1&limit=20",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "events"
          ],
          "query": [
            {
              "key": "sport_id",
              "value": "{{sport_id}}",
              "description": "Sport ID",
              "disabled": false
            },
            {
              "key": "locale",
              "value": "ru",
              "description": "Response language (ru, en, zh)",
              "disabled": false
            },
            {
              "key": "page",
              "value": "1",
              "description": "Page number",
              "disabled": false
            },
            {
              "key": "limit",
              "value": "20",
              "description": "Events per page (max 100)",
              "disabled": false
            },
            {
              "key": "status",
              "value": "finish",
              "description": "Event status",
              "disabled": true
            },
            {
              "key": "from",
              "value": "2026-10-17T00:00:00Z",
              "description": "Earliest event start (inclusive, UTC)",
              "disabled": true
            },
            {
              "key": "to",
              "value": "2026-10-17T23:59:59.999Z",
              "description": "Latest event start (inclusive, UTC)",
              "disabled": true
            }
          ]
        },
        "description": "Lists published events. Use the **List sports** request to get available sport IDs."
      },
      "response": []
    },
    {
      "name": "Get event details",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{base_url}}/events/{{event_id}}?locale=ru",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "events",
            "{{event_id}}"
          ],
          "query": [
            {
              "key": "locale",
              "value": "ru",
              "description": "Response language (ru, en, zh)",
              "disabled": false
            }
          ]
        },
        "description": "Returns event details and divisions."
      },
      "response": []
    },
    {
      "name": "Get final results",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{base_url}}/events/{{event_id}}/results?locale=ru&page=1&limit=2&result_page=1&result_limit=1",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "events",
            "{{event_id}}",
            "results"
          ],
          "query": [
            {
              "key": "locale",
              "value": "ru",
              "description": "Response language (ru, en, zh)",
              "disabled": false
            },
            {
              "key": "division_id",
              "value": "803",
              "description": "Filter by division ID",
              "disabled": true
            },
            {
              "key": "page",
              "value": "1",
              "description": "Page of divisions",
              "disabled": false
            },
            {
              "key": "limit",
              "value": "2",
              "description": "Divisions per page (max 20)",
              "disabled": false
            },
            {
              "key": "result_page",
              "value": "1",
              "description": "Page of athletes within each division",
              "disabled": false
            },
            {
              "key": "result_limit",
              "value": "1",
              "description": "Athletes per page within each division (max 100)",
              "disabled": false
            }
          ]
        },
        "description": "Returns saved final results. The response includes separate fields for the competition result and rating points. To reproduce the Men's Open example, enable `division_id=803`, keep `page=1`, and set `result_page=2`."
      },
      "response": []
    }
  ]
}
