Unibandh · Help centre
Recording planSign in
Unibandh · School management for Indian schools · Home
    Help centre/Transport/Lesson 3

    Vehicles, document expiry and the GPS token

    Add buses and vans with permit, insurance, fitness and PUC dates, read the expiry badges, copy the one-time GPS token and rotate it, retire a vehicle.

    Open /transport/vehiclesRecording script
    6 min5 stepsOwner, Admin, Principal, TransportDemo: sign in as Principal

    Steps

    0 of 5 done
    1. You should see: A table: Vehicle (registration, type, "retired" if inactive), Seats, Documents (four badges: Permit, Insurance, Fitness, PUC with a short date), GPS ("Device …" or "Token only") and Actions. Active / All links above switch the list.

      Open /transport/vehicles
    2. You should see: "Vehicle added" and the dialog changes to GPS device token — shown once with the token in a box and a copy button.

    3. You should see: The dialog closes. The vehicle row shows "Token only" or "Device <id>" in the GPS column.

      GPS device setup: configure the device (or its tracking app) to send POST /api/transport/gps with the header Authorization: Bearer <token> and a JSON body { "lat": 25.01, "lng": 88.14, "speed": 32, "at": "2026-10-03T07:05:00+05:30" }. Pings closer than 5 seconds are ignored and only the last 48 hours are kept.

    4. You should see: A New GPS token · <registration> dialog shows the new token once; the old one is rejected from now on.

    5. You should see: "Vehicle updated" / "Vehicle retired". A retired vehicle no longer accepts GPS pings, is hidden from pickers and only shows under All.

    What you have now

    • A vehicle with four document dates feeding the expiry alerts and a GPS token ready for the device.

    If something goes wrong

    The token dialog did not appear when adding a vehicle
    The registration was rejected (check the inline error) or the dialog was closed early. Use Token on the row to issue a fresh one.
    The GPS device gets 401 unauthorized
    The token is wrong, was rotated, or the vehicle is retired. Issue a new token and update the device.
    The device gets 403 device mismatch
    The vehicle has a GPS device id and the device sends a different deviceId. Edit the vehicle and match the id, or clear it.

    Related guides

    • Live view: where is the bus?
    • Create a route and read the overview
    • Fuel and maintenance logs
    Add and order the stops on a routeNext: Drivers and attendants