Get nearest parkings
GET/truckers/map/parkings/nearest
Returns the nearest truck parking locations relative to the user's current location.
Requires JWT token authentication and is subject to rate limiting.
Key features:
- Sorts parking locations by distance (nearest to farthest)
- Uses the device's location when available
- Ideal for finding urgent rest areas
Example use cases:
- Display nearby parking when rest is needed
- Suggest immediate stops during long trips
- Integration with roadside assistance systems
Example response:
[
{
id: m3n4o5p6-q7r8-9012,
name: Nearest Parking,
location: {
lat: 40.417300,
lng: -3.704300
},
capacity: 35,
price: 10.00,
rating: 4.2,
distance: 0.8,
features: [security, wifi]
}
]
Responses
- 200
- 401
- 429
- 500
Parkings obtained successfully
Unauthorized - Invalid or missing JWT token. Include a valid token in the Authorization header: Bearer {token}
Too many requests - The rate limit has been exceeded.
Wait before making new requests.
Internal Server Error