Computed
This document provides a detailed overview of the available API endpoints under the /api2/computed
route.
Base URL
- Bas path
/api2/computed
.
Authorization
- Requires
Cookie
:JSESSIONID=session_id
Connect Mileage
Connects or creates a mileage attribute for a specific vehicle and assigns it to the user.
🛠Endpoint:
POST /mileage
Request Body:
Property | Type | Required | Description |
---|---|---|---|
vehicleId |
string |
Yes | The ID of the vehicle |
mileage |
string |
No | The mileage value (e.g., 20 km/L) |
cURL Request:
curl -X POST "https://api.trackongps.com/api2/computed/mileage" \
-H "Cookie: JSESSION_COOKIE_FROM_TRACKON_SERVER" \
-H "Content-Type: application/json" \
-d '{
"vehicleId": "12345",
"mileage": "20"
}'
200/201 Success Response
{
"message": "Mileage Connected!"
}
400/401 Error Response
{
"message": "Some requests failed",
"error": "Invalid input data"
}