GET
/update/all
Update all

Runs all seven update endpoints. Office is fetched first to obtain the current season and race; the remaining six run in parallel batches of 3. Failures are captured in errors[] without aborting the batch.

Request headers

HeaderNotes
AuthorizationRequired. Bearer <token> — API JWT.
x-tenant-idRequired. Tenant identifier.

Response

{
  "data": {
    "office": {},
    "driverProfile": {},
    "tdProfile": {},
    "raceAnalysis": {},
    "economyHistory": {},
    "testing": {},
    "car": {}
  }
}

An optional errors array lists any endpoints that failed.

GET
/update/office
Update office

Fetches the manager's current office snapshot and upserts manager_office. Also upserts driver_face when face SVG data is present. Returns the current season and race numbers.

Request headers

HeaderNotes
AuthorizationRequired. Bearer <token> — API JWT.
x-tenant-idRequired. Tenant identifier.

Response

{
  "data": {
    "office": {
      "season": 75,
      "race": 16,
      "trackName": "Monaco",
      "endOfSeason": 0
    }
  }
}
GET
/update/driver-profile
Update driver profile

Fetches the contracted driver's stats and attributes and upserts driver_profile. Also upserts driver_face. Stores favourite tracks as JSON; extracts dri_id from the face image path.

Request headers

HeaderNotes
AuthorizationRequired. Bearer <token> — API JWT.
x-tenant-idRequired. Tenant identifier.

Response

{
  "data": {
    "driverProfile": {
      "driName": "John Smith",
      "overall": 85,
      "energy": 92
    }
  }
}
GET
/update/td-profile
Update TD profile

Fetches the contracted Technical Director's stats and upserts td_profile. Returns null for tdProfile without writing to the database when no TD is under contract.

Request headers

HeaderNotes
AuthorizationRequired. Bearer <token> — API JWT.
x-tenant-idRequired. Tenant identifier.

Response

{
  "data": {
    "tdProfile": {
      "tdName": "Jane Doe",
      "overall": 78
    }
  }
}

tdProfile is null when no TD is contracted.

GET
/update/race-analysis
Update race analysis

Fetches the most recent race result and upserts race_analysis. Per-lap data is written to race_analysis_laps (DELETE + bulk INSERT). Season and race are taken directly from the API response.

Request headers

HeaderNotes
AuthorizationRequired. Bearer <token> — API JWT.
x-tenant-idRequired. Tenant identifier.

Response

{
  "data": {
    "raceAnalysis": {
      "season": 75,
      "race": 15,
      "q1Pos": 3,
      "finishPos": 5
    }
  }
}
GET
/update/economy-history
Update economy history

Fetches a page of economy transactions and appends new rows to economy_transactions using INSERT IGNORE. Safe to re-fetch — duplicates are silently skipped.

Request headers

HeaderNotes
AuthorizationRequired. Bearer <token> — API JWT.
x-tenant-idRequired. Tenant identifier.

Query parameters

ParamNotes
pageOptional. Page number, default 1.

Response

{
  "data": {
    "economyHistory": {
      "page": 1,
      "totalPages": 4,
      "rowsInserted": 20
    }
  }
}
GET
/update/testing
Update testing

Fetches the pre-race testing session state and upserts testing_session. Testing stints are written to testing_stints (DELETE + bulk INSERT for the current season/race).

Request headers

HeaderNotes
AuthorizationRequired. Bearer <token> — API JWT.
x-tenant-idRequired. Tenant identifier.

Response

{
  "data": {
    "testing": {
      "season": 75,
      "race": 16,
      "lapsLeft": 18,
      "stintsLeft": 3
    }
  }
}
GET
/update/car
Update car

Fetches the current car state and upserts manager_car. Stores performance ratings, individual part levels (lvl_*), wear percentages (wear_*), R&D breakdowns, and financial totals. Options and selected part details are excluded.

Request headers

HeaderNotes
AuthorizationRequired. Bearer <token> — API JWT.
x-tenant-idRequired. Tenant identifier.

Response

{
  "data": {
    "car": {
      "carPower": 92,
      "carHandl": 96,
      "carAccel": 91,
      "lvl_engine": 6,
      "wear_engine": 84
    }
  }
}