Developer access
Connect to your TES reports
Use your API key to list archived reports, retrieve sample results, and download the available exports.
01 / Authenticate
Your API key stays with you
Send the key in the x-api-key header. The server matches it to the active client account and applies ownership checks.
Use the tester only with a development key. Production integrations must keep API keys in a server-side environment variable.
02 / List reports
Start with the report list
This returns archived reports available to the authenticated client, including report IDs, sample counts, export links, and the sample-results endpoint.
curl -sS \
-H "x-api-key: $TES_API_KEY" \
"https://technicalandengineeringsolutions.com/api/archive/share/reports"03 / Use JavaScript
Bring reports into your system
Use this from server-side JavaScript with the API key stored in an environment variable. The developer guide includes a complete sync example for reports, sample results, and CSV export.
const response = await fetch("https://technicalandengineeringsolutions.com/api/archive/share/reports", {
headers: {
"x-api-key": serverConfig.tesApiKey,
Accept: "application/json"
}
});
if (!response.ok) throw new Error("TES API request failed");
const { reports } = await response.json();
console.log(reports);PHP
Use PHP cURL
Load the key from the server environment, then request and parse the report list using the PHP cURL extension.
<?php
$apiKey = getenv("TES_API_KEY");
$curl = curl_init("https://technicalandengineeringsolutions.com/api/archive/share/reports");
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Accept: application/json", "x-api-key: " . $apiKey],
]);
$body = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($status < 200 || $status >= 300) throw new RuntimeException("TES API request failed");
$reports = json_decode($body, true, 512, JSON_THROW_ON_ERROR)["reports"];04 / Track vehicle
Connect to the tracking page
The signed-in tracking page uses the session-protected bus-tracking endpoint. It does not use the report API key, keeping live tracking separate from report sharing.
const query = new URLSearchParams({ registration: "T123ABC", minutes: "30" });
const response = await fetch("/api/bus-tracking?" + query, {
credentials: "same-origin",
cache: "no-store",
});
const tracking = await response.json();
if (!response.ok) throw new Error(tracking.error || "Tracking request failed");
console.log(tracking.data);cURL
Use a signed-in session
Use this only from a trusted environment with a current client portal session. Session cookies must never be committed or shared.
curl -sS \
--cookie "tes_client_session=$TES_CLIENT_SESSION" \
"https://technicalandengineeringsolutions.com/api/bus-tracking?registration=T123ABC&minutes=30"05 / Download
Get the report document
Replace REPORT_ID with the ID returned by the list request. Change the format to csv or xlsx when needed.
-H "x-api-key: $TES_API_KEY" \\
-o report.pdf
Endpoint
GET /api/archive/share/reports
Authentication
x-api-key header
Exports
PDF, CSV, XLSX