Saltar al contenido principal
Routal
API ReferenceVehicle

Which of these vehicles has a live driver-app session

Returns { sessions: { <vehicleid: boolean } } for the vehicle ids given — meant for the rows currently on screen.

POST
/v2/vehicles/sessions

Returns { sessions: { <vehicle_id>: boolean } } for the vehicle ids given — meant for the rows currently on screen. Split out of POST /v2/vehicles/performance (where it used to live behind include_sessions) because answering it requires a Redis keyspace scan: SCAN walks every key whatever the MATCH pattern, which put a serial 300 ms-1,5 s step on the fleet list's critical path. Safe to defer precisely because this field is no part of ordering or pagination — the column is not sortable — so the table paints without it and fills it in after.

private_key<token>

Pass your API key as the private_key query string parameter. Generate and rotate keys in Developer Settings of your Routal workspace.

Keys stay server-side. Never ship them to a browser or mobile app.

In: query

Query Parameters

project_id*string

Project ID

Match^[0-9a-f]{24}

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v2/vehicles/sessions?project_id=string" \  -H "Content-Type: application/json" \  -d '{    "vehicle_ids": [      "4f75d991ac359f8c4c79d762"    ]  }'
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
Empty
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
Empty
Empty