Skip to main content

Get Nearest Stations

GET 

/truckers/map/stations/nearest

Returns the nearest gas stations to the user's current location. Requires authentication via JWT token and is subject to rate limiting.

Key features:

  • Sorts stations by distance (from nearest to farthest)
  • Uses the device's location if available
  • Ideal for finding urgent refueling options

Usage examples:

  • Display nearby stations when fuel is low
  • Suggest immediate stops during emergencies
  • Integration with roadside assistance systems

Example response:

[
{
id: d4e5f6g7-h8i9-0123,
name: Nearest Station,
location: {
lat: 40.416900,
lng: -3.703900
},
services: [petrol, diesel, air],
rating: 4.0,
distance: 0.5
}
]

Responses

Stations successfully obtained