Plug your VTC’s stats into your website or Discord bot. Read-only, JSON, open CORS — built for widgets, overlays and integrations.
The simplest option: no key, no boost, for every VTC. Replace ma-vtc with your VTC’s identifier (the address of its page /vtcs/ma-vtc). JSON, read-only, open CORS, 120 requests / minute / IP.
GET https://hdispatch.eu/api/vtc list of available endpoints
GET https://hdispatch.eu/api/vtc/ma-vtc/stats members, online, km (total and month), next event, certification
GET https://hdispatch.eu/api/vtc/ma-vtc/online online drivers (positions included)
GET https://hdispatch.eu/api/vtc/ma-vtc/jobs?limit=10 latest deliveries (1 to 50, 10 by default)
GET https://hdispatch.eu/api/vtc/ma-vtc/events?limit=5 upcoming public events (1 to 20, 5 by default)
GET https://hdispatch.eu/api/vtc/ma-vtc/members active members ranked by kilometres (1 to 200, 50 by default), if the VTC makes them public
GET https://hdispatch.eu/api/vtc/ma-vtc/certification verifiable certification status
fetch('https://hdispatch.eu/api/vtc/ma-vtc/stats')
.then((r) => r.json())
.then((d) => console.log(d.members.online + ' en ligne · ' + d.month.km + ' km ce mois-ci'));
Respects the VTC’s settings: names hidden if “show members” is off, revenue missing if revenue isn’t public, API can be fully disabled in Settings → API. Responses are cached from 5 seconds (online) to 5 minutes (certification). Errors: 404 {"error":"not_found"} if the VTC doesn’t exist, is blacklisted or has turned off its API; 429 {"success":false,"message":…} beyond the limit. For detailed data, use the key-based v1 API below.
Online members, latest jobs, kilometres this month, next event, recruitment, full card or live mini map. Free, in 9 languages, light or dark theme. Ready-to-paste codes are in Dashboard → your VTC → Widgets & badge.
<div class="hd-widget" data-vtc="ma-vtc" data-type="online"></div>
<script src="https://hdispatch.eu/widgets/embed.js" async></script>
online · jobs · km · event · recruit · card · mapdark · light · autofr en de es it nl pl pt trdata-accent="ff8800" · data-limit="1..15" · data-header="0" · data-height="360" · data-game="ats" (map)Without JavaScript, every widget also works as an iframe: https://hdispatch.eu/widgets/vtc/ma-vtc/online?theme=dark. Widgets refresh on their own (30 s for “online”, up to 10 min for “recruitment”) and show an error if the VTC has turned off its API. Certification badge: https://hdispatch.eu/badges/vtc/ma-vtc.svg (or .png), options ?style=flat, ?theme=light, ?lang=en, verifiable at https://hdispatch.eu/verify/ma-vtc.
pk_ and is safe to expose.x-api-key header (or as the ?key= parameter).curl -H "x-api-key: pk_VOTRE_CLE" https://hdispatch.eu/api/v1/vtc
https://hdispatch.eu/api/v1x-api-key: pk_…GET (read-only)*GET https://hdispatch.eu/api/v1 returns the list of endpoints. Errors look like {"error":"…"} (see below).
⚠️ Don’t mix up your public key (pk_…, read) with your tracker key (secret, write): the latter must never appear in a web page. A VTC can turn off its API or hide some fields (revenue, members) from its settings.
/api/v1/vtc
VTC info and totals (members, km, creation date…).
{
"id": "6600…", "name": "Horizon Dispatch", "slug": "horizon-dispatch",
"tag": "[HDX]", "description": "…", "game": "ets2", "color": "#cfd4dc",
"recruitmentOpen": true, "hdPartner": false, "premium": false,
"memberCount": 42,
"totals": { "distanceKm": 1284000, "deliveries": 3120, "revenue": 9800000 },
"createdAt": "2025-01-08T12:00:00.000Z"
}
/api/v1/members?limit=1..500
VTC members, sorted by mileage (100 by default).
{
"count": 42,
"members": [
{ "discordId": "1234…", "name": "Marco", "avatar": "…", "role": "driver",
"traction": false, "joinedAt": "…",
"stats": { "distanceKm": 84210, "deliveries": 190, "revenue": 512000 } }
]
}
/api/v1/events
The VTC’s upcoming events, both public and members-only (50 max).
{
"count": 2,
"events": [
{ "id": "…", "title": "Convoi du dimanche", "game": "ets2", "server": "Simulation 1",
"departureCity": "Paris", "arrivalCity": "Berlin", "plannedKm": 1050,
"meetupAt": "…", "startAt": "…", "slots": { "total": 20, "taken": 12 },
"going": 18, "externalUrl": "" }
]
}
/api/v1/deliveries?limit=1..200
Recent deliveries (50 by default).
{
"count": 50,
"deliveries": [
{ "driverDiscordId": "…", "game": "ets2", "cargo": "Ciment", "from": "Lyon",
"to": "Milan", "distanceKm": 480, "damagePercent": 0, "truck": "Scania S",
"at": "…", "income": 42000 }
]
}
/api/v1/live
Online drivers (presence < 60 s).
{
"count": 3,
"drivers": [
{ "discordId": "…", "name": "Marco", "avatar": "…", "game": "ETS2",
"onJob": true, "cargo": "Bois", "from": "Oslo", "to": "Stockholm",
"truck": "Volvo FH", "speed": 88, "distanceLeft": 120, "progressPct": 64 }
]
}
/api/v1/news?limit=1..100
The VTC’s public, published announcements.
{
"count": 5,
"news": [
{ "id": "…", "title": "Recrutement ouvert !", "content": "…", "coverUrl": "…",
"pinned": true, "authorName": "Léa", "at": "…", "updatedAt": "…" }
]
}
/api/v1/partners
Accepted partnerships (partner VTCs).
{
"count": 3,
"partners": [
{ "id": "…", "name": "Nordic Logistics", "slug": "nordic-logistics",
"tag": "[NL]", "logoUrl": "…", "game": "ets2", "since": "…" }
]
}
/api/v1/divisions
The VTC’s transport divisions.
{
"count": 4,
"divisions": [
{ "id": "…", "name": "Frigo", "description": "…", "imageUrl": "…",
"color": "#4ea1ff", "trucks": ["Scania S"], "trailers": ["Krone Cool"],
"position": 0 }
]
}
/api/v1/gallery?limit=1..100
The VTC’s public photo galleries (albums published from the dashboard).
{
"count": 6,
"galleries": [
{ "id": "…", "title": "Convoi de Noël", "description": "…",
"images": ["https://…/1.jpg", "https://…/2.jpg"], "photoCount": 2,
"authorName": "Léa", "discordUrl": "https://discord.com/channels/…",
"at": "…" }
]
}
/api/v1/hd/events?limit=1..100
Horizon Dispatch events (global, all public VTCs).
{
"count": 10,
"events": [
{ "id": "…", "title": "Grand convoi HD", "game": "ets2", "server": "Simulation 1",
"departureCity": "Madrid", "arrivalCity": "Lisbonne", "plannedKm": 620,
"meetupAt": "…", "startAt": "…",
"vtc": { "name": "Horizon Dispatch", "slug": "horizon-dispatch", "tag": "[HDX]", "logoUrl": "…" },
"externalUrl": "" }
]
}
401missing_api_key403invalid_api_key403boost_required403api_disabled403members_hidden429rate_limited500server_errorAdd “Sign in with Horizon Dispatch” to your website. Create the application in Dashboard → your VTC → Ecosystem: the secret is shown only once.
GET https://hdispatch.eu/connect/authorize?client_id=…&redirect_uri=…&scope=identity%20profile%20vtc&state=…
(PKCE: add code_challenge, computed with S256)
POST https://hdispatch.eu/connect/token client_id, client_secret, code, redirect_uri (code_verifier si PKCE)
→ { "access_token": "…", "token_type": "Bearer", "expires_in": 2592000, "scope": "…" }
GET https://hdispatch.eu/connect/userinfo Authorization: Bearer <access_token>
The authorization code is valid for 5 minutes and can only be used once; the token, 30 days. Scopes: identity (identifier), profile (profile), vtc (the user’s VTC).
Paste this into your website and replace pk_VOTRE_CLE with your public key:
<div id="hd-stats">Chargement…</div>
<script>
fetch("https://hdispatch.eu/api/v1/vtc", { headers: { "x-api-key": "pk_VOTRE_CLE" } })
.then(function (r) { return r.json(); })
.then(function (v) {
document.getElementById("hd-stats").innerHTML =
"<b>" + v.name + "</b> — " + v.memberCount + " membres · " +
v.totals.distanceKm.toLocaleString() + " km";
});
</script>