Fleet Operations API

Fleet operations endpoints cover day-to-day setup and automation primitives: grouping vehicles, assigning driver records, geofence management, and alert preferences.

Drivers and groups

  • Name
    POST /api/drivers
    Description
    Create driver profile.
  • Name
    GET /api/drivers
    Description
    List drivers.
  • Name
    PUT /api/drivers/:id
    Description
    Update driver profile.
  • Name
    DELETE /api/drivers/:id
    Description
    Delete driver profile.
  • Name
    POST /api/vehicle-groups
    Description

    Create vehicle group (supports parent_group and geofences).

  • Name
    GET /api/vehicle-groups?populateVehicles=
    Description

    List vehicle groups with vehicles.

  • Name
    GET /api/vehicle-groups?folderView=true
    Description

    List groups as a folder tree.

  • Name
    GET /api/vehicle-groups/:id
    Description
    Get one vehicle group.
  • Name
    GET /api/vehicle-groups/:id/list-sub-groups
    Description

    List sub-groups of a group.

  • Name
    PUT /api/vehicle-groups/:id
    Description
    Update vehicle group.
  • Name
    DELETE /api/vehicle-groups/:id
    Description

    Delete vehicle group.

Create vehicle group

curl -X POST "$LIVEPIN_API_BASE_URL/api/vehicle-groups" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Mumbai Fleet","vehicles":[3001,3002],"parent_group":12}'

List sub-groups

curl "$LIVEPIN_API_BASE_URL/api/vehicle-groups/12/list-sub-groups" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY"

Folder view

curl -G "$LIVEPIN_API_BASE_URL/api/vehicle-groups" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -d folderView=true

Routes

Create named routes, snap coordinates to the road network, and link routes to vehicles.

  • Name
    GET /api/routes
    Description
    List routes.
  • Name
    GET /api/routes/:id
    Description
    Get one route.
  • Name
    POST /api/routes
    Description
    Create a route.
  • Name
    PUT /api/routes/:id
    Description
    Update a route.
  • Name
    DELETE /api/routes/:id
    Description
    Delete a route.
  • Name
    POST /api/routes/snap-to-road
    Description
    Snap coordinates to the road network.
  • Name
    GET /api/vehicles/:vehicleId/list-linked-routes
    Description
    Routes linked to a vehicle.
  • Name
    POST /api/vehicles/:vehicleId/link-route
    Description
    Link routes to a vehicle.
  • Name
    POST /api/vehicles/:vehicleId/unlink-route
    Description
    Unlink routes from a vehicle.

Snap route to road

curl -X POST "$LIVEPIN_API_BASE_URL/api/routes/snap-to-road" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coordinates":[{"lat":13.1269,"lng":80.2074},{"lat":13.129,"lng":80.209}]}'

Link routes to vehicle

curl -X POST "$LIVEPIN_API_BASE_URL/api/vehicles/:vehicleId/link-route" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"route_ids":[5,6,7]}'

Geofence and alerts

  • Name
    POST /api/geofences
    Description
    Create geofence.
  • Name
    GET /api/geofences
    Description
    List geofences.
  • Name
    GET /api/geofences/:id
    Description
    Get one geofence.
  • Name
    PUT /api/geofences/:id
    Description
    Update geofence.
  • Name
    DELETE /api/geofences/:id
    Description
    Delete geofence.
  • Name
    GET /api/devices/reverse-geocode
    Description
    Reverse geofencing/address lookup.
  • Name
    GET /api/devices/geocode
    Description
    Geocode an address string.
  • Name
    GET /api/devices/auto-suggest-address
    Description
    Address autocomplete suggestions.
  • Name
    GET /api/devices/generate-route
    Description
    Route from a vehicle to a destination.
  • Name
    POST /api/notifications/update-fcm-token
    Description
    Register FCM token.
  • Name
    GET /api/notifications/types
    Description
    List notification event types.
  • Name
    GET /api/notifications/vehicle-notifications/:vehicleId
    Description
    Vehicle notifications stream/list.
  • Name
    POST /api/notifications/update-preferences/:vehicleId
    Description
    Update notification preferences.
  • Name
    GET /api/notifications/vehicle-preferences/:vehicleId
    Description
    Read notification preferences.

Create geofence

curl -X POST "$LIVEPIN_API_BASE_URL/api/geofences" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Warehouse","coordinates":[[80.1,13.2],[80.2,13.2],[80.2,13.3]]}'

Get reverse geocode

curl -G "$LIVEPIN_API_BASE_URL/api/devices/reverse-geocode" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -d latitude=22.64044 \
  -d longitude=88.4169131

Address autocomplete

curl -G "$LIVEPIN_API_BASE_URL/api/devices/auto-suggest-address" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -d query="KIAL" \
  -d latitude=13.2 \
  -d longitude=77.7

Vehicle notifications

curl -G "$LIVEPIN_API_BASE_URL/api/notifications/vehicle-notifications/:vehicleId" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -d record_date=29/4/2026 \
  -d type=sos

Update notification preferences

curl -X POST "$LIVEPIN_API_BASE_URL/api/notifications/update-preferences/:vehicleId" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"notification_types":["sos","overspeed"]}'

Register FCM token

curl -X POST "$LIVEPIN_API_BASE_URL/api/notifications/update-fcm-token" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -H "x-api-key: $LIVEPIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fcm_token":"<FCM_TOKEN>"}'

Preferences

  • Name
    GET /api/user-preferences/me
    Description

    Read logged-in user preferences.

  • Name
    PUT /api/user-preferences/me
    Description

    Update user preferences.

  • Name
    PUT /api/global-config
    Description

    Update SMS/FCM global config.

Was this page helpful?