Get list of service stations
GET/api/oil/
Endpoint to retrieve a paginated list of all fuel stations registered in the system. It allows filtering and sorting the results according to different criteria.
Functionality:
- Returns an array of OilStation objects with detailed information for each station
- Supports pagination via query parameters (limit, page)
- Allows sorting results by different fields (e.g., createdAt)
- Includes only relevant fields in the response to optimize the payload
Use Cases:
- Displaying the station list in an administrative panel
- Integration with geolocation systems
- Synchronization with mobile applications
Response Example:
[
{
id: 5f8d0d55b54764421b7156da,
name: Central Station,
address: Calle Mayor 123,
city: Madrid,
country: ES,
latitude: 40.4168,
longitude: -3.7038,
fuels: [diesel, gasoline95],
isActive: true
}
]
Request
Responses
- 200
Successful operation. Returns an array of service stations.