List Stations
Retrieve a list of pickup and dropoff stations where vehicles are available. Stations are physical locations managed by the agency where users can pick up and return vehicles.
This endpoint is commonly used to:
- Display nearby stations on a map view
- Show available stations for vehicle pickup during the booking flow
- Let users browse all stations in a list view
- Filter stations by proximity to the user's current location
When you provide the user's coordinates (latitude and longitude), the response will include the distance to each station and sort results by proximity. This helps users quickly find the nearest location with available vehicles.
Endpoint
INFO
GET /api/v1/client/stations
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
X-Agency-Signature | {signature} | Yes |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
latitude | decimal | - | User's latitude for distance calculation |
longitude | decimal | - | User's longitude for distance calculation |
radius_km | integer | 50 | Search radius in kilometers |
Example Request
bash
curl -X GET "https://api.daakey.com/api/v1/client/stations?latitude=40.7128&longitude=-74.0060&radius_km=25" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-H "X-Agency-Signature: {signature}"Response
Success (200)
json
{
"success": true,
"message": "Stations retrieved",
"data": [
{
"id": 1,
"name": "Downtown Station",
"address": "123 Main St, New York, NY",
"latitude": 40.7128,
"longitude": -74.0060,
"distance_km": 0.5,
"available_vehicles": 8,
"total_vehicles": 12,
"image": "https://api.daakey.com/storage/stations/1/image.jpg",
"operating_hours": {
"monday": "06:00-22:00",
"tuesday": "06:00-22:00",
"wednesday": "06:00-22:00",
"thursday": "06:00-22:00",
"friday": "06:00-23:00",
"saturday": "07:00-23:00",
"sunday": "07:00-21:00"
},
"amenities": ["parking", "charging", "restroom"]
},
{
"id": 2,
"name": "Airport Terminal",
"address": "456 Airport Blvd, Queens, NY",
"latitude": 40.6413,
"longitude": -73.7781,
"distance_km": 12.3,
"available_vehicles": 15,
"total_vehicles": 25,
"image": "https://api.daakey.com/storage/stations/2/image.jpg",
"operating_hours": {
"monday": "00:00-23:59",
"tuesday": "00:00-23:59",
"wednesday": "00:00-23:59",
"thursday": "00:00-23:59",
"friday": "00:00-23:59",
"saturday": "00:00-23:59",
"sunday": "00:00-23:59"
},
"amenities": ["parking", "charging", "restroom", "24h_access"]
}
],
"meta": {
"agency_id": 123,
"agency_code": "AGENCY123",
"total": 2
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Results are sorted by distance when coordinates are provided
- Only stations with available vehicles are shown by default