{
  "openapi": "3.0.3",
  "info": {
    "title": "IAME Motorsport API",
    "version": "2.1.0",
    "description": "Read-only access to championships, events, registration forms and registered drivers.\n\n**Authentication** — send your key in the `X-API-KEY` header. Each key is limited to the championships (and, if set, the events) agreed with the organiser.\n\n**Versions** — `v1` (paths like `/championship/list`) keeps working unchanged **until 30 June 2027**, its end-of-support date. After that date v1 is retired and the calls without a version in the path will serve the current API. `v2` (paths under `/v2/`) is the recommended version for new integrations: pagination with `limit`/`offset`, JSON errors with proper HTTP status codes, a consistent `{data, meta}` envelope, `ETag` caching, `updated_since` for incremental updates and no personal contact details.\n\n**Limits** — v2 accepts up to 300 requests per minute for each key. Every v2 response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`; over the limit you get `429` with `Retry-After`. v1 responses carry the `Sunset` header with its end-of-support date.\n\n**Keeping a copy in sync** — call `/v2/entries` with `updated_since` set to the time of your previous call: you receive the entries registered or changed since then (number, category, transponder, status, driver data, form answers). Cancelled entries stay in the list with `status: cancelled`; entries removed altogether are listed by `/v2/entries/deleted`. Changes are tracked from 9 November 2026.\n"
  },
  "servers": [
    {
      "url": "https://api.iame-motorsport.com/index.php"
    }
  ],
  "tags": [
    {
      "name": "v2",
      "description": "Recommended for new integrations."
    },
    {
      "name": "v1",
      "description": "Supported until 30 June 2027. Existing integrations should move to v2 before then."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "parameters": {
      "LimitParam": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 10
        },
        "description": "Maximum number of results to return"
      },
      "V2Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500,
          "default": 50
        },
        "description": "Page size (1–500)"
      },
      "V2Offset": {
        "name": "offset",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 0,
          "default": 0
        },
        "description": "Number of records to skip"
      }
    },
    "schemas": {
      "Meta": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "example": 50
          },
          "offset": {
            "type": "integer",
            "example": 0
          },
          "count": {
            "type": "integer",
            "description": "Records returned in this page",
            "example": 3
          },
          "total": {
            "type": "integer",
            "description": "Records matching the request, ignoring `limit` and `offset`. Use it to know when to stop paging.",
            "example": 234
          },
          "changes_tracked": {
            "type": "boolean",
            "description": "Only on `/v2/entries` and `/v2/entries/deleted`: `false` when the change history is not available and `updated_at` falls back to the registration date.",
            "example": true
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "invalid_api_key"
              },
              "message": {
                "type": "string",
                "example": "The API key is not valid or not authorized."
              }
            }
          }
        }
      },
      "Championship": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 4
          },
          "name": {
            "type": "string",
            "example": "IAME Series Benelux"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "logo": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "description_national": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "facebook": {
            "type": "string"
          },
          "instagram": {
            "type": "string"
          },
          "telephone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "organizer": {
            "type": "string"
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 366
          },
          "id_championship": {
            "type": "integer",
            "example": 4
          },
          "name": {
            "type": "string"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "example": "2026-05-01"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "image": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "description_national": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "example": "France"
          },
          "track": {
            "type": "string"
          },
          "track_lenght": {
            "type": "string",
            "description": "Track length (field name kept as returned by the API)"
          }
        }
      },
      "Form": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "date_time": {
            "type": "string",
            "description": "Last update"
          },
          "id_championship": {
            "type": "integer"
          },
          "id_category": {
            "type": "integer"
          },
          "id_event": {
            "type": "integer"
          },
          "event_pass": {
            "type": "integer"
          },
          "status": {
            "type": "integer"
          }
        }
      },
      "Entry": {
        "type": "object",
        "description": "A driver entered in an event. Contact details (email, phone, address) are not part of v2.",
        "properties": {
          "entry_id": {
            "type": "integer",
            "example": 4521
          },
          "driver_id": {
            "type": "integer",
            "description": "Stable ID of the driver, the same in `/v2/drivers`",
            "example": 1873
          },
          "racenumber": {
            "type": "string",
            "example": "12"
          },
          "first_name": {
            "type": "string",
            "example": "Mario"
          },
          "last_name": {
            "type": "string",
            "example": "ROSSI"
          },
          "license_number": {
            "type": "string",
            "example": "123456"
          },
          "category": {
            "type": "string",
            "example": "X30 JUNIOR"
          },
          "engine": {
            "type": "string",
            "example": "IAME X30"
          },
          "chassis": {
            "type": "string",
            "example": "KR"
          },
          "team": {
            "type": "string",
            "nullable": true,
            "example": "Example Racing Team"
          },
          "nationality": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2 code, lower case",
            "example": "it"
          },
          "transponder": {
            "type": "string",
            "nullable": true,
            "description": "Transponder number written in the registration or, if empty, the driver's own",
            "example": "1234567"
          },
          "transponder_rental": {
            "type": "boolean",
            "description": "`true` when the driver has no transponder and asked to rent one",
            "example": false
          },
          "photo": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "form_type": {
            "type": "string",
            "enum": [
              "event",
              "season_pass"
            ],
            "example": "event"
          },
          "status": {
            "type": "string",
            "enum": [
              "confirmed",
              "pending_payment",
              "cancelled",
              "pending"
            ],
            "description": "`confirmed`: registration accepted and paid. `pending_payment`: registered, payment not received yet. `cancelled`: withdrawn. `pending`: not completed.",
            "example": "confirmed"
          },
          "track_status": {
            "type": "string",
            "enum": [
              "accepted",
              "pending",
              "rejected"
            ],
            "description": "Check-in at the track for this event: `accepted` once the organiser has accepted the driver at the circuit, `pending` before that.",
            "example": "pending"
          },
          "registered_at": {
            "type": "string",
            "description": "Date and time of the registration (event local time)",
            "example": "2026-02-10 10:45:04"
          },
          "updated_at": {
            "type": "string",
            "description": "Date and time of the last change to the entry, the driver or the form answers (event local time). It is what `updated_since` compares with.",
            "example": "2026-03-02 18:12:40"
          }
        }
      },
      "Category": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 31
          },
          "name": {
            "type": "string",
            "example": "X30 JUNIOR"
          },
          "engine": {
            "type": "string",
            "example": "IAME X30"
          },
          "id_event": {
            "type": "integer",
            "nullable": true,
            "description": "Set when the category belongs to a single event"
          },
          "id_championship": {
            "type": "integer",
            "example": 4
          }
        }
      },
      "NamedItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 12
          },
          "name": {
            "type": "string",
            "example": "Example"
          }
        }
      },
      "Country": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 106
          },
          "name": {
            "type": "string",
            "example": "Italy"
          },
          "code": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code",
            "example": "it"
          }
        }
      },
      "KeyScope": {
        "type": "object",
        "properties": {
          "championships": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "example": [
              4
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "example": []
          },
          "all_championships": {
            "type": "boolean",
            "example": false
          },
          "all_events": {
            "type": "boolean",
            "example": true
          },
          "max_page_size": {
            "type": "integer",
            "example": 500
          },
          "rate_limit_per_minute": {
            "type": "integer",
            "example": 300
          }
        }
      },
      "LiveDriverInfo": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "homeTown": {
            "type": "string"
          },
          "nationality": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string",
            "format": "uri"
          },
          "vehicle": {
            "type": "object",
            "properties": {
              "chassis": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "engines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "imageUrl": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "RegisteredDriver": {
        "type": "object",
        "properties": {
          "driver_email": {
            "type": "string",
            "format": "email",
            "example": "driver@example.com"
          },
          "driver_last_name": {
            "type": "string",
            "example": "ROSSI"
          },
          "driver_first_name": {
            "type": "string",
            "example": "Mario"
          },
          "driver_address": {
            "type": "string",
            "example": "Via Roma 1"
          },
          "driver_gender": {
            "type": "string",
            "enum": [
              "M",
              "F"
            ],
            "example": "M"
          },
          "driver_license_number": {
            "type": "string",
            "example": "123456"
          },
          "driver_telephone": {
            "type": "string",
            "example": "+390000000000"
          },
          "transponder_n": {
            "type": "integer",
            "example": 1234567
          },
          "category": {
            "type": "string",
            "example": "X30 JUNIOR"
          },
          "chassis": {
            "type": "string",
            "example": "KR"
          },
          "photo": {
            "type": "string",
            "format": "uri"
          },
          "racenumber": {
            "type": "string",
            "example": "12"
          },
          "latest_modification": {
            "type": "string",
            "example": "2026-02-10 10:45:04"
          },
          "form_type": {
            "type": "string",
            "enum": [
              "Event Form",
              "Season Pass"
            ],
            "example": "Event Form"
          }
        }
      },
      "DeletedEntry": {
        "type": "object",
        "description": "An entry removed from the event",
        "properties": {
          "entry_id": {
            "type": "integer",
            "example": 4521
          },
          "racenumber": {
            "type": "string",
            "nullable": true,
            "example": "12"
          },
          "first_name": {
            "type": "string",
            "nullable": true,
            "example": "Mario"
          },
          "last_name": {
            "type": "string",
            "nullable": true,
            "example": "ROSSI"
          },
          "license_number": {
            "type": "string",
            "nullable": true,
            "example": "123456"
          },
          "deleted_at": {
            "type": "string",
            "description": "Event local time",
            "example": "2026-11-09 17:40:11"
          }
        }
      },
      "Driver": {
        "type": "object",
        "description": "A driver of the championship. Contact details are not part of v2.",
        "properties": {
          "id": {
            "type": "integer",
            "example": 1873
          },
          "first_name": {
            "type": "string",
            "example": "Mario"
          },
          "last_name": {
            "type": "string",
            "example": "ROSSI"
          },
          "license_number": {
            "type": "string",
            "nullable": true,
            "example": "123456"
          },
          "transponder": {
            "type": "string",
            "nullable": true,
            "example": "1234567"
          },
          "category": {
            "type": "string",
            "nullable": true,
            "description": "Usual category in the driver's profile",
            "example": "X30 JUNIOR"
          },
          "chassis": {
            "type": "string",
            "nullable": true,
            "example": "KR"
          },
          "photo": {
            "type": "string",
            "format": "uri",
            "nullable": true
          }
        }
      },
      "DriverInfo": {
        "type": "object",
        "description": "Driver card for live graphics",
        "properties": {
          "first_name": {
            "type": "string",
            "example": "Mario"
          },
          "last_name": {
            "type": "string",
            "example": "Rossi"
          },
          "hometown": {
            "type": "string",
            "nullable": true,
            "example": "Milano"
          },
          "nationality": {
            "type": "string",
            "nullable": true,
            "example": "ITA"
          },
          "photo": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "chassis": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "nullable": true,
                "example": "KR"
              },
              "logo": {
                "type": "string",
                "format": "uri",
                "nullable": true
              }
            }
          },
          "engine": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "nullable": true,
                "example": "IAME X30"
              },
              "logo": {
                "type": "string",
                "format": "uri",
                "nullable": true
              }
            }
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests: more than 300 per minute for this key. Wait for the seconds in the `Retry-After` header.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "rate_limited",
                "message": "Too many requests: the limit is 300 per minute. Retry in 12 seconds."
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/v2/championships": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List championships available to your key",
        "parameters": [
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Page of championships",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Championship"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/events": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List events, optionally for one championship",
        "description": "Events are ordered by start date.",
        "parameters": [
          {
            "name": "championship",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Championship ID"
          },
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Page of events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/forms": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List registration forms of an event",
        "parameters": [
          {
            "name": "event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Event ID"
          },
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Page of forms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Form"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing `event` parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/me": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "What your key can access",
        "description": "Returns the championships and events your key is limited to. No secrets are returned.",
        "responses": {
          "200": {
            "description": "Scope of the key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/KeyScope"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/entries": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List the drivers entered in an event",
        "description": "Drivers with their number, category, engine, chassis, team, nationality, transponder, photo, registration status and track check-in status. One row per driver. Cancelled entries are included with `status: cancelled`: filter with `status=confirmed` if you only need the drivers admitted to the event. Email, phone and address are not included in v2.",
        "parameters": [
          {
            "name": "event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Event ID"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-11-01T10:00:00"
            },
            "description": "Only entries registered or changed on or after this moment (see `updated_at`). Format `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SS`, event local time, no time zone suffix. Use it to fetch only what is new since your last call."
          },
          {
            "name": "license_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Licence number of the driver (exact match)"
          },
          {
            "name": "racenumber",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Race number (exact match)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "X30 JUNIOR"
            },
            "description": "Category name, as returned by `/v2/categories`"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "confirmed",
                "pending_payment",
                "cancelled"
              ]
            },
            "description": "Only entries in this status"
          },
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The response carries an `ETag`; send it back in `If-None-Match` to get `304 Not Modified` when nothing changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Entry"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified (the `ETag` you sent is still current)"
          },
          "400": {
            "description": "Missing or invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key cannot access that event",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/entries/deleted": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List the entries removed from an event",
        "description": "Entries that were deleted (not just cancelled) after 9 November 2026, when change tracking started. Use it with `updated_since` to drop from your copy the drivers that are no longer entered.",
        "parameters": [
          {
            "name": "event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Event ID"
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-11-09T10:00:00"
            },
            "description": "Only entries removed on or after this moment. Same format as in `/v2/entries`."
          },
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DeletedEntry"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key cannot access that event",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/drivers": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List the drivers of a championship",
        "description": "Drivers with at least one registration in the championship, without contact details. Not available to keys limited to single events: use `/v2/entries` there.",
        "parameters": [
          {
            "name": "championship",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Championship ID. Required unless your key is limited to one championship."
          },
          {
            "name": "license_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Licence number of the driver (exact match)"
          },
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Driver"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key cannot access that championship",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/driver_info": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "Driver card for live graphics",
        "description": "Name, home town, nationality, photo, chassis and engine (with logos) of one driver in an event. It replaces `/livedriverinfo/list` of v1.",
        "parameters": [
          {
            "name": "event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Event ID"
          },
          {
            "name": "license_number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Licence number of the driver (exact match)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "X30 JUNIOR"
            },
            "description": "Category name. Give it when the same driver races in more than one category of the event."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DriverInfo"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key cannot access that event",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Event, category or driver not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/categories": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List the categories of an event",
        "description": "Categories valid for the event, including those defined for the whole championship.",
        "parameters": [
          {
            "name": "event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Event ID"
          },
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The response carries an `ETag`; send it back in `If-None-Match` to get `304 Not Modified` when nothing changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Category"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified (the `ETag` you sent is still current)"
          },
          "400": {
            "description": "Missing or invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key cannot access that event",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/chassis": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List chassis makes",
        "description": "Reference list, useful to match the `chassis` value of entries.",
        "parameters": [
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The response carries an `ETag`; send it back in `If-None-Match` to get `304 Not Modified` when nothing changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NamedItem"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified (the `ETag` you sent is still current)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/teams": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List teams",
        "description": "Reference list of teams.",
        "parameters": [
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The response carries an `ETag`; send it back in `If-None-Match` to get `304 Not Modified` when nothing changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NamedItem"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified (the `ETag` you sent is still current)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v2/countries": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List countries",
        "description": "Reference list. `code` matches the `nationality` value of entries.",
        "parameters": [
          {
            "$ref": "#/components/parameters/V2Limit"
          },
          {
            "$ref": "#/components/parameters/V2Offset"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The response carries an `ETag`; send it back in `If-None-Match` to get `304 Not Modified` when nothing changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Country"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified (the `ETag` you sent is still current)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/championship/list": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Get list of accessible championships",
        "parameters": [
          {
            "$ref": "#/components/parameters/LimitParam"
          }
        ],
        "responses": {
          "200": {
            "description": "List of championships",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Championship"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/events/list": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Get list of events",
        "parameters": [
          {
            "name": "championship",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Championship ID"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          }
        ],
        "responses": {
          "200": {
            "description": "List of events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Event"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/forms/list": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Get list of registration forms for an event",
        "parameters": [
          {
            "name": "event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Event ID"
          }
        ],
        "responses": {
          "200": {
            "description": "List of registration forms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Form"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/drivers/list": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Get list of drivers",
        "parameters": [
          {
            "$ref": "#/components/parameters/LimitParam"
          }
        ],
        "responses": {
          "200": {
            "description": "List of drivers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RegisteredDriver"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/registrationdrivers/list": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Get list of registered drivers for an event",
        "parameters": [
          {
            "name": "event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Event ID"
          }
        ],
        "responses": {
          "200": {
            "description": "List of registered drivers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RegisteredDriver"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/driversphoto/list": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Get the driver's photo",
        "description": "Returns the image associated with an email address.",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Driver's email"
          }
        ],
        "responses": {
          "200": {
            "description": "Photo found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "photo": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/livedriverinfo/list": {
      "get": {
        "tags": [
          "v1"
        ],
        "summary": "Get live driver info by license, category name and event",
        "parameters": [
          {
            "in": "query",
            "name": "licenseNumber",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "event",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Driver found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveDriverInfo"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          },
          "404": {
            "description": "Driver or category not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}