Portal API
Portal API provides programmatic access to batch scan data from the portal. Your application authenticates to obtain a short-lived token, then uses that token to access the batch data endpoints.
You can also check out the api playground.
Quick Start
Curl
Step 1 — Get a token
curl -X POST https://portal-api.test-visiontrack.nl/v1/auth \
-d "client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&grant_type=client_credentials"
Step 2 — Fetch your batch data
Python
# /// script
# dependencies = [
# "httpx",
# ]
# ///
import httpx
BASE_URL = "https://portal-api.test-visiontrack.nl"
auth = httpx.post(
f"{BASE_URL}/v1/auth",
data={
"client_id": "<CLIENT_ID>",
"client_secret": "<CLIENT_SECRET>",
"grant_type": "client_credentials",
},
)
auth.raise_for_status()
access_token = auth.json()["access_token"]
resp = httpx.get(
f"{BASE_URL}/v1/batches",
headers={"Authorization": f"Bearer {access_token}"},
)
resp.raise_for_status()
print(resp.json())
You can just copy code above and run it with uv:
uv run script.py
no need to install anything.
Credentials
Make sure to replace <CLIENT_ID> and <CLIENT_SECRET> from the secrets provided
by Track32. For more details, see Authentication
API Versions
Two versions are available. v1 is kept for backwards compatible, but please prefer v2 for obtaining your batches.
| Endpoint | Response shape | |
|---|---|---|
| v1 | POST /v1/auth · GET /v1/batches |
Flat list of batch objects |
| v2 | POST /v2/auth · GET /v2/batches |
{ "data": [...], "next_token": "..." } |
Use v2 if you have more than 1000 batches for the particular time frame. Otherwise, the APIs are identical.