Truck Jobs — Integrations

Truck Job Webhook Payload Reference

Reference the Truck Job webhook envelope, job, trailer and mod payloads.

Truck Jobs
This page documents Truck Jobs.

Car Jobs and Coach Jobs have separate documentation because their setup and data will differ. Choose a job type.

#Payload Structure

The following properties are returned in our payload structure:

PropertyTypeDescription
objectstringWe only send the object event at this time
typestringEvent type posted e.g. job.delivered, job.cancelled
datadictThe data relating to the event type above.
json
{
  "object": "event",
  "type": "...",
  "data": {}
}

#Job Webhook Object

This is an example payload for the webhook events job.delivered and job.cancelled.

json
{
  "object": {
      "id": 1,
      "object": "job",
      "driver": {
        "id": 1,
        "steam_id": "76561198171686422",
        "username": "Nathan7471",
        "profile_photo_url": "https://tracksim.app/example-profile-pic.png",
        "client": {
          "version": {
            "name": "1.0.0",
            "branch_name": "stable",
            "platform": "windows"
          }
        },
        "last_active": "2023-01-27T16:13:08Z"
      },
      "start_time": "2023-01-26T22:52:07Z",
      "stop_time": "2023-01-26T23:49:49Z",
      "time_spent": 3461,
      "planned_distance": 160,
      "driven_distance": 184,
      "adblue_used": -3,
      "fuel_used": -59.91,
      "is_special": false,
      "is_late": true,
      "market": "cargo_market",
      "cargo": {
        "unique_id": "carb_water",
        "name": "Carbonated Water",
        "mass": 24961.20,
        "damage": 0.0
      },
      "game": {
        "short_name": "eut2",
        "language": "en_gb",
        "had_police_enabled": false
      },
      "multiplayer": {
        "mode": "truckersmp",
        "meta": {
          "player_id": "241", 
          "server": "Simulation 1"
        }
      },
      "source_city": {
        "unique_id": "joetsu",
        "name": "Joetsu"
      },
      "source_company": {
        "unique_id": "dans_jardin",
        "name": "Dans le Jardin"
      },
      "destination_city": {
        "unique_id": "toyonaka",
        "name": "Toyonaka"
      },
      "destination_company": {
        "unique_id": "wilnet_trans",
        "name": "Wilnet Transport"
      },
      "truck": {
        "unique_id": "vehicle.mercedes.actros",
        "name": "Actros",
        "brand": {
          "unique_id": "mercedes",
          "name": "Mercedes-Benz"
        },
        "odometer": 528,
        "initial_odometer": 345,
        "wheel_count": 4,
        "license_plate": " 54-57",
        "license_plate_country": {
          "unique_id": "osaka",
          "name": "osaka"
        },
        "current_damage": {
          "cabin": 0.01,
          "chassis": 0.01,
          "engine": 0,
          "transmission": 0,
          "wheels": 0
        },
        "total_damage": {
          "cabin": 0.05,
          "chassis": 0.07,
          "engine": 0.03,
          "transmission": 0.02,
          "wheels": 0.02
        },
        "top_speed": 25.71,
        "average_speed": 10.71
      },
      "trailers": [
        ...
      ],
      "events": [
        ...
      ]
  }
}

Properties

PropertyTypeDescription
idintTrackSim ID assigned to Job
objectstringType of object returned
driver.idintTrackSim assigned driver ID
driver.steam_idstringSteam 64 ID related to the driver
driver.usernamestringUsername for driver
driver.profile_photo_urlstringProfile picture for driver
driver.client.version.namestringTracker version name used to log job
driver.client.version.branch_namestringTracker version branch used to log job
driver.client.version.platformstringTracker version platform used to log job
driver.last_activestringLast time the driver was active
start_timedatetimeJob Start time
stop_timedatetimeJob End Time
time_spentintTime spent on job in Seconds
planned_distanceintJob planned distance in KMs
driven_distanceintJob driven distance in KMs
adblue_usedfloatAdblue used in litres
fuel_usedfloatFuel used in litres
is_specialbooleanIf the job is a special Transport job
is_latebooleanIf the job was delivered late
marketstringThe market the job was collected from. cargo_market e.g.
cargo.unique_idstringCargo game unique ID
cargo.namestringCargo name (Can be Null)
cargo.massfloatCargo mass in KG
cargo.damagefloatCargo damage
game.short_namestringGame used ats for American Truck Simulator & eut2 for Euro Truck Simulator 2
game.languagestringLanguage returned by game (Can be Null)
game.had_police_enabledbooleanif police were enabled
multiplayer.modestringJob multiplayer mode type e.g. truckersmp, multiplayer is Convoy Mode (Can be Null)
multiplayer.meta.player_idstringPlayer ID if in truckersmp (Can be Null)
multiplayer.meta.serverstringPlayer server if in truckersmp (Can be Null)
source_city.unique_idstringSource City game unique ID
source_city.namestringSource City name (Can be Null)
source_company.unique_idstringSource Company game unique ID
source_company.namestringSource Company name (Can be Null)
destination_city.unique_idstringDestination City game unique ID
destination_city.namestringDestination City Name (Can be Null)
destination_company.unique_idstringDestination Company game unique ID
destination_company.namestringDestination Company name (Can be Null)
truck.unique_idstringTruck unique game ID
truck.namestringTruck Name (Can be Null)
truck.brand.unique_idstringTruck Brand unique ID
truck.brand.namestringTruck Brand name (Can be Null)
truck.odometerintTruck odometer on job end in KMs
truck.initial_odometerintTruck odometer on job start in KMs
truck.wheel_countintNumber of wheels on Truck
truck.license_platestringTruck License Plate
truck.license_plate_country.unique_idstringTruck License Plate Country ID
truck.license_plate_country.namestringTruck License Plate Country Name (Can be Null)
truck.current_damage.cabinfloatTruck Current Damage - Cabin
truck.current_damage.chassisfloatTruck Current Damage - Chassis
truck.current_damage.enginefloatTruck Current Damage - Engine
truck.current_damage.transmissionfloatTruck Current Damage - Transmission
truck.current_damage.wheelsfloatTruck Current Damage - Wheels
truck.total_damage.cabinfloatTruck Total Damage - Cabin
truck.total_damage.chassisfloatTruck Total Damage - Chassis
truck.total_damage.enginefloatTruck Total Damage - Engine
truck.total_damage.transmissionfloatTruck Total Damage - Transmission
truck.total_damage.wheelsfloatTruck Total Damage - Wheels
truck.top_speedintTruck top speed over Job
truck.average_speedintTruck average speed over Job
trailersarrayList of trailers on truck
eventsarrayList of events which happened during Job

#Trailers payload

json
{
  "name": null,
  "body_type": "_chciernsoor",
  "chain_type": "single",
  "wheel_count": 6,
  "brand": null,
  "license_plate": "I-2604",
  "license_plate_country": {
    "unique_id": "latvia",
    "name": "Latvia"
  },
  "current_damage": {
    "cargo": 0,
    "chassis": 0,
    "wheels": 0
  },
  "total_damage": {
    "cargo": 0,
    "chassis": 0,
    "wheels": 0
  }
}

Properties

PropertyTypeDescription
namestringName of the trailer
body_typestringBody type of trailer
chain_typestringChain type of trailer e.g. single, double
wheel_countintWheel count of trailer
branddictTrailer Brand, returns unique_id & name (Can be NULL)
license_platestringTrailer License Plate
license_plate_country.unique_idstringTrailer License Plate Country Unique ID
license_plate_country.namestringTraier License Plate Country name (Can be NULL)
current_damage.cargofloatTrailer current damage - Cargo
current_damage.chassisfloatTrailer current damage - Chassis
current_damage.wheelsfloatTrailer current damage - Wheels
total_damage.cargofloatTrailer total damage - Cargo
total_damage.chassisfloatTrailer total damage - Chassis
total_damage.wheelsfloatTrailer total damage - Wheels

#Mods Payload

json
{
  "name": "Example Mod",
  "package": "example_mod"
}

Properties

PropertyTypeDescription
namestringName of the mod
packagestringID of the mod