Select an endpoint to begin
Send a request to see the response
Select an endpoint to begin
Send a request to see the response
The Vadodara Maps Platform supports real-time location streaming and ETA updates for delivery services using WebSockets. These real-time endpoints are managed by the Go Routing service (go-service) and proxied through Nginx at the /ws/ gateway path.
All WebSocket URLs use standard protocols (ws:// for unencrypted local dev, wss:// for production SSL).
| Role | Endpoint Path | Authentication | Protocol Purpose |
|---|---|---|---|
| Rider App | /ws/track?token=<rider_token> |
Query Parameter token |
Streams rider GPS coordinates to the server. |
| Customer App | /ws/order?order_id=<id>&token=<token> |
Query Parameter token |
Receives real-time rider coordinates and ETA updates. |
/ws/track)The rider client app initiates a connection to stream coordinates.
ws://localhost/ws/track?token=rider-123
{
"type": "location",
"lat": 22.311000,
"lng": 73.176000,
"bearing": 120.5,
"speed": 18.5
}
Field Details:
type: Must be set exactly to "location".lat: Numeric latitude (WGS 84 coordinate).lng: Numeric longitude (WGS 84 coordinate).bearing: Direction of travel in degrees (0.0 to 360.0).speed: Instantaneous velocity in km/h.Server-Side Behavior:
GEOADD key: riders).order:<rider_token>)./ws/order)The customer client app connects to receive live updates.
ws://localhost/ws/order?order_id=rider-123&token=vmp_live_...
{
"type": "rider_update",
"lat": 22.311000,
"lng": 73.176000,
"bearing": 120.5,
"eta_mins": 0.0
}
Connection Maintenance (Ping/Pong Keep-Alive):
opcode: 9) to the client every 25 seconds to prevent Nginx or firewall timeouts.opcode: 10).rider-123).Order ID to match your rider token (e.g. rider-123).