Client portal

Client report API

Access published reports, submit scientific results, track samples, and receive signed webhook events.

https://technicalengineeringsolutions.com

Test console

Integration examples use server environment variables. TES_BEARER_TOKEN is the full returned token, including Bearer . Keep API keys in your backend configuration.

Environment variables and report workflow
TES_CLIENT_ID
Application ID from the client portal.
TES_API_KEY
Client-specific API credential issued by TES.
TES_BEARER_TOKEN
Complete token value from generate-token, valid for 60 minutes.
TES_REPORT_ID
report.id from a created draft or the report list.
TES_SAMPLE_NUMBER
Sample number for the individual sample lookup.
TES_CLIENT_SESSION
Current tes_client_session cookie, used only for vehicle tracking.

Shell: export NAME='value'. Windows Command Prompt: set "NAME=value". JavaScript examples run in a Node.js .mjs file; PHP requires the cURL extension.

Authentication

Generate a Bearer token

POST/api/archive/share/generate-token

Exchange your client application ID and API key for a one-hour access token.

Authentication: client-id + api-key headers

POSIX shell
curl --fail --silent --show-error -X POST \
  -H "client-id: $TES_CLIENT_ID" \
  -H "api-key: $TES_API_KEY" \
  -H "Accept: application/json" \
  "https://technicalengineeringsolutions.com/api/archive/share/generate-token"

client-id is the application ID displayed in the client portal. api-key is the client-specific credential issued by TES.

The returned token already includes the Bearer prefix. Store the complete value in TES_BEARER_TOKEN and use it unchanged. Generate a replacement after 60 minutes.

Response examples

200 / Token issued

{
  "token": "Bearer <token>",
  "expiry": 60
}
Errors and access

400: client-id missing. 401: API key invalid or revoked. 403: client-id belongs to another credential. 503: token service unavailable.

Read-only test console

Generate a five-minute token from your signed-in client portal session. It can read reports and exports but cannot submit results or register webhooks.