{
  "openapi": "3.1.0",
  "info": {
    "title": "Tacho API",
    "version": "1",
    "description": "Read your own company's data on Tacho: the company, its members, jobs, stats and upcoming convoys. A key belongs to one company and only ever reads that company. Distances are km, money is in the game's currency (EUR for ETS2, USD for ATS), times are UTC. Guide with examples: https://testing.tachoapp.net/developers"
  },
  "servers": [
    {
      "url": "https://testing.tachoapp.net/api/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/company": {
      "get": {
        "operationId": "getCompany",
        "summary": "Your company, with member count and totals",
        "responses": {
          "200": {
            "description": "The company.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/members": {
      "get": {
        "operationId": "listMembers",
        "summary": "Active members with role, rank and what they delivered for the company",
        "responses": {
          "200": {
            "description": "Every active member.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/jobs": {
      "get": {
        "operationId": "listJobs",
        "summary": "The company's jobs, newest first, a page at a time",
        "description": "Every status is listed unless you filter by `status`; only delivered jobs count in totals. Follow `nextCursor` until it is null.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Jobs per page, 1 to 100.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`nextCursor` from the page before.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Jobs finished at or after this time.",
            "example": "2026-11-01T00:00:00Z",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "description": "Jobs finished before this time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "driver",
            "in": "query",
            "required": false,
            "description": "One driver's id.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "delivered",
                "cancelled",
                "flagged",
                "rejected"
              ]
            }
          },
          {
            "name": "game",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ets2",
                "ats"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of jobs.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/jobs/{jobId}": {
      "get": {
        "operationId": "getJob",
        "summary": "One job of the company",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/stats": {
      "get": {
        "operationId": "getStats",
        "summary": "This month and all time: distance, jobs, income, fuel, games, routes",
        "responses": {
          "200": {
            "description": "The numbers.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stats"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Upcoming convoys the company runs on TruckersMP and TrucklineMP",
        "responses": {
          "200": {
            "description": "Upcoming convoys.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A key the company's owner made in the company admin, API tab. It starts with `tacho_`."
      }
    },
    "headers": {
      "RateLimitLimit": {
        "description": "Requests allowed per minute for this key.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in this minute.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "When the minute is over, in Unix seconds.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "No key (`missing_key`), or a wrong or revoked one (`invalid_key`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests (`rate_limited`). Wait `Retry-After` seconds.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "BadRequest": {
        "description": "A query parameter isn't right (`bad_request`); `details` says which.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not in your company (`not_found`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "missing_key",
                  "invalid_key",
                  "rate_limited",
                  "not_found",
                  "bad_request",
                  "method_not_allowed",
                  "internal_error"
                ],
                "description": "Stable; check this, not the message."
              },
              "message": {
                "type": "string",
                "description": "For people; may change."
              },
              "details": {
                "description": "For bad_request: which query parameter is wrong.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "param": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "param",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "cm3w9x1y20000abcd1234efgh"
          },
          "name": {
            "type": "string",
            "example": "Nordic Haulage"
          },
          "slug": {
            "type": "string",
            "example": "nordic-haulage"
          },
          "tag": {
            "example": "NH",
            "type": [
              "string",
              "null"
            ]
          },
          "logoUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string",
            "description": "The company's page on Tacho."
          },
          "verified": {
            "type": "boolean",
            "description": "Checked against TruckersMP, or verified by Tacho's admins."
          },
          "truckersmpVtcId": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-18T19:04:05.000Z"
          },
          "members": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Active members."
          },
          "totals": {
            "type": "object",
            "properties": {
              "allTime": {
                "type": "object",
                "properties": {
                  "km": {
                    "type": "number",
                    "description": "Kilometres."
                  },
                  "jobs": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Delivered jobs."
                  }
                },
                "required": [
                  "km",
                  "jobs"
                ],
                "additionalProperties": false
              },
              "thisMonth": {
                "type": "object",
                "properties": {
                  "km": {
                    "type": "number",
                    "description": "Kilometres."
                  },
                  "jobs": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991,
                    "description": "Delivered jobs."
                  },
                  "month": {
                    "type": "string",
                    "description": "A calendar month in UTC.",
                    "example": "2026-11"
                  }
                },
                "required": [
                  "km",
                  "jobs",
                  "month"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "allTime",
              "thisMonth"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "tag",
          "logoUrl",
          "url",
          "verified",
          "truckersmpVtcId",
          "createdAt",
          "members",
          "totals"
        ],
        "additionalProperties": false
      },
      "Member": {
        "type": "object",
        "properties": {
          "driverId": {
            "type": "string",
            "example": "cm3w9x1y20000abcd1234efgh"
          },
          "name": {
            "type": "string",
            "example": "Kasper"
          },
          "discordId": {
            "description": "The driver's Discord user id. Null: not linked.",
            "example": "238746823648726016",
            "type": [
              "string",
              "null"
            ]
          },
          "steamId64": {
            "description": "The driver's SteamID64. Null: Steam not linked.",
            "example": "76561198000000001",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "manager",
              "driver"
            ]
          },
          "rank": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "cm3w9x1y20000abcd1234efgh"
                  },
                  "name": {
                    "type": "string",
                    "example": "Senior driver"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Null below the lowest rank, or when the company has no ranks."
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-18T19:04:05.000Z"
          },
          "totals": {
            "type": "object",
            "properties": {
              "km": {
                "type": "number",
                "description": "Kilometres."
              },
              "jobs": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Delivered jobs."
              }
            },
            "required": [
              "km",
              "jobs"
            ],
            "additionalProperties": false,
            "description": "Delivered for this company."
          }
        },
        "required": [
          "driverId",
          "name",
          "discordId",
          "steamId64",
          "role",
          "rank",
          "joinedAt",
          "totals"
        ],
        "additionalProperties": false
      },
      "MemberList": {
        "type": "object",
        "properties": {
          "rankMetric": {
            "type": "string",
            "enum": [
              "km",
              "jobs",
              "convoys"
            ],
            "description": "What the company's rank ladder counts."
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "description": "Owner first, then managers, then drivers; longest-serving first."
          }
        },
        "required": [
          "rankMetric",
          "members"
        ],
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "cm3w9x1y20000abcd1234efgh"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-18T19:04:05.000Z"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-18T19:04:05.000Z"
          },
          "driver": {
            "type": "string",
            "description": "The driver's name.",
            "example": "Kasper"
          },
          "driverId": {
            "type": "string",
            "example": "cm3w9x1y20000abcd1234efgh"
          },
          "driverDiscordId": {
            "description": "The driver's Discord user id. Null: not linked.",
            "example": "238746823648726016",
            "type": [
              "string",
              "null"
            ]
          },
          "driverSteamId64": {
            "description": "The driver's SteamID64. Null: Steam not linked.",
            "example": "76561198000000001",
            "type": [
              "string",
              "null"
            ]
          },
          "game": {
            "type": "string",
            "enum": [
              "ets2",
              "ats"
            ]
          },
          "multiplayer": {
            "type": "boolean",
            "description": "Driven on TruckersMP."
          },
          "promods": {
            "type": "boolean"
          },
          "kind": {
            "type": "string",
            "enum": [
              "cargo",
              "car",
              "passengers"
            ],
            "description": "Cargo by truck, a delivery by car (ATS), or passengers by coach."
          },
          "cargo": {
            "type": "string",
            "example": "Electronics"
          },
          "cargoMassKg": {
            "type": "number"
          },
          "passengers": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "object",
            "properties": {
              "city": {
                "type": "string"
              },
              "company": {
                "type": "string"
              }
            },
            "required": [
              "city",
              "company"
            ],
            "additionalProperties": false
          },
          "destination": {
            "type": "object",
            "properties": {
              "city": {
                "type": "string"
              },
              "company": {
                "type": "string"
              }
            },
            "required": [
              "city",
              "company"
            ],
            "additionalProperties": false
          },
          "drivenKm": {
            "type": "number",
            "description": "Driven, from the odometer. This is what counts."
          },
          "plannedKm": {
            "type": "number",
            "description": "Kilometres."
          },
          "income": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Promised when the job was taken."
          },
          "revenue": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "What the game paid on delivery. Null for a cancelled job."
          },
          "currency": {
            "type": "string",
            "enum": [
              "EUR",
              "USD"
            ]
          },
          "fuelUsedL": {
            "description": "Litres. Null: not measured.",
            "type": [
              "number",
              "null"
            ]
          },
          "damagePct": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "delivered",
              "cancelled",
              "flagged",
              "rejected"
            ],
            "description": "Only delivered jobs count. Flagged jobs wait for a manager; rejected ones never count."
          },
          "flagReasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "avg_speed"
            ]
          }
        },
        "required": [
          "id",
          "finishedAt",
          "startedAt",
          "driver",
          "driverId",
          "driverDiscordId",
          "driverSteamId64",
          "game",
          "multiplayer",
          "promods",
          "kind",
          "cargo",
          "cargoMassKg",
          "passengers",
          "source",
          "destination",
          "drivenKm",
          "plannedKm",
          "income",
          "revenue",
          "currency",
          "fuelUsedL",
          "damagePct",
          "status",
          "flagReasons"
        ],
        "additionalProperties": false
      },
      "JobPage": {
        "type": "object",
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            },
            "description": "Newest first."
          },
          "nextCursor": {
            "description": "Pass as `cursor` for the next page. Null on the last page.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "jobs",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "Stats": {
        "type": "object",
        "properties": {
          "thisMonth": {
            "type": "object",
            "properties": {
              "month": {
                "type": "string",
                "description": "A calendar month in UTC.",
                "example": "2026-11"
              },
              "from": {
                "type": "string",
                "format": "date-time",
                "example": "2026-11-18T19:04:05.000Z"
              },
              "to": {
                "type": "string",
                "format": "date-time",
                "example": "2026-11-18T19:04:05.000Z"
              },
              "partial": {
                "type": "boolean",
                "description": "The month isn't over: numbers so far."
              },
              "km": {
                "type": "number",
                "description": "Kilometres."
              },
              "jobs": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "drivers": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Members who delivered at least one job."
              },
              "avgKmPerJob": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "income": {
                "type": "object",
                "properties": {
                  "eur": {
                    "type": "number",
                    "description": "From ETS2 jobs, in euros."
                  },
                  "usd": {
                    "type": "number",
                    "description": "From ATS jobs, in US dollars."
                  }
                },
                "required": [
                  "eur",
                  "usd"
                ],
                "additionalProperties": false,
                "description": "What the game paid on delivery, or what the job promised when the tracker didn't say."
              },
              "fuelLitres": {
                "type": "number"
              },
              "lPer100Km": {
                "description": "Over jobs with fuel data only.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "games": {
                "type": "object",
                "properties": {
                  "ets2": {
                    "type": "object",
                    "properties": {
                      "km": {
                        "type": "number",
                        "description": "Kilometres."
                      },
                      "jobs": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Delivered jobs."
                      }
                    },
                    "required": [
                      "km",
                      "jobs"
                    ],
                    "additionalProperties": false
                  },
                  "ats": {
                    "type": "object",
                    "properties": {
                      "km": {
                        "type": "number",
                        "description": "Kilometres."
                      },
                      "jobs": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Delivered jobs."
                      }
                    },
                    "required": [
                      "km",
                      "jobs"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "ets2",
                  "ats"
                ],
                "additionalProperties": false
              },
              "multiplayerShare": {
                "description": "Share of jobs driven on TruckersMP, 0 to 1.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "members": {
                "type": "object",
                "properties": {
                  "atEnd": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "joined": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "left": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "atEnd",
                  "joined",
                  "left"
                ],
                "additionalProperties": false
              },
              "cancelled": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "waitingForReview": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991,
                "description": "Flagged jobs not reviewed yet."
              }
            },
            "required": [
              "month",
              "from",
              "to",
              "partial",
              "km",
              "jobs",
              "drivers",
              "avgKmPerJob",
              "income",
              "fuelLitres",
              "lPer100Km",
              "games",
              "multiplayerShare",
              "members",
              "cancelled",
              "waitingForReview"
            ],
            "additionalProperties": false
          },
          "allTime": {
            "type": "object",
            "properties": {
              "km": {
                "type": "number",
                "description": "Kilometres."
              },
              "jobs": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "drivers": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "income": {
                "type": "object",
                "properties": {
                  "eur": {
                    "type": "number",
                    "description": "From ETS2 jobs, in euros."
                  },
                  "usd": {
                    "type": "number",
                    "description": "From ATS jobs, in US dollars."
                  }
                },
                "required": [
                  "eur",
                  "usd"
                ],
                "additionalProperties": false,
                "description": "What the game paid on delivery, or what the job promised when the tracker didn't say."
              },
              "fuelLitres": {
                "type": "number"
              },
              "lPer100Km": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "games": {
                "type": "object",
                "properties": {
                  "ets2": {
                    "type": "object",
                    "properties": {
                      "km": {
                        "type": "number",
                        "description": "Kilometres."
                      },
                      "jobs": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Delivered jobs."
                      }
                    },
                    "required": [
                      "km",
                      "jobs"
                    ],
                    "additionalProperties": false
                  },
                  "ats": {
                    "type": "object",
                    "properties": {
                      "km": {
                        "type": "number",
                        "description": "Kilometres."
                      },
                      "jobs": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991,
                        "description": "Delivered jobs."
                      }
                    },
                    "required": [
                      "km",
                      "jobs"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "ets2",
                  "ats"
                ],
                "additionalProperties": false
              },
              "firstJobAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-11-18T19:04:05.000Z"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "km",
              "jobs",
              "drivers",
              "income",
              "fuelLitres",
              "lPer100Km",
              "games",
              "firstJobAt"
            ],
            "additionalProperties": false
          },
          "months": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "km": {
                  "type": "number",
                  "description": "Kilometres."
                },
                "jobs": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Delivered jobs."
                },
                "month": {
                  "type": "string",
                  "description": "A calendar month in UTC.",
                  "example": "2026-11"
                }
              },
              "required": [
                "km",
                "jobs",
                "month"
              ],
              "additionalProperties": false
            },
            "description": "The last 12 months, oldest first; the last is this month."
          },
          "topRoutes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "from": {
                  "type": "string"
                },
                "to": {
                  "type": "string"
                },
                "jobs": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "km": {
                  "type": "number",
                  "description": "Kilometres."
                }
              },
              "required": [
                "from",
                "to",
                "jobs",
                "km"
              ],
              "additionalProperties": false
            },
            "description": "The most-driven routes of the last 12 months."
          }
        },
        "required": [
          "thisMonth",
          "allTime",
          "months",
          "topRoutes"
        ],
        "additionalProperties": false
      },
      "Event": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "enum": [
              "truckersmp",
              "trucklinemp"
            ]
          },
          "id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The event's id on its platform."
          },
          "name": {
            "type": "string"
          },
          "game": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ets2",
                  "ats"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "server": {
            "type": [
              "string",
              "null"
            ]
          },
          "from": {
            "type": "object",
            "properties": {
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "city",
              "location"
            ],
            "additionalProperties": false
          },
          "to": {
            "type": "object",
            "properties": {
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "city",
              "location"
            ],
            "additionalProperties": false
          },
          "meetupAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "example": "2026-11-18T19:04:05.000Z"
              },
              {
                "type": "null"
              }
            ]
          },
          "startAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-18T19:04:05.000Z"
          },
          "attending": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Confirmed or going."
          },
          "url": {
            "type": "string",
            "description": "The event's page on its platform."
          }
        },
        "required": [
          "platform",
          "id",
          "name",
          "game",
          "server",
          "from",
          "to",
          "meetupAt",
          "startAt",
          "attending",
          "url"
        ],
        "additionalProperties": false
      },
      "EventList": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "description": "Soonest first."
          },
          "unavailable": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "truckersmp",
                "trucklinemp"
              ]
            },
            "description": "Platforms that didn't answer just now; try again later."
          }
        },
        "required": [
          "events",
          "unavailable"
        ],
        "additionalProperties": false
      }
    }
  }
}