Get visible vehicle types
GET/vehicles_types/
This endpoint returns a paginated list of vehicle types visible in the system.Functionality:- Filters only vehicle types marked as visible- Supports pagination with standard parameters (limit, page)- Allows sorting by vehicle license plate- Returns basic information such as vehicle type, license plate, image, and ITVUse Cases:1. List vehicles available to assign to carriers2. Display vehicle options in creation forms3. Integration with mobile apps to show available fleetResponse Example:json{ docs: [ { _id: 60a1b2c3d4e5f67890123456, code: TRUCK, name: Truck, description: Heavy vehicle for cargo transport, visible: true, createdAt: 2023-05-15T10:30:00Z, updatedAt: 2023-05-15T10:30:00Z } ], total: 1, limit: 10, page: 1, pages: 1}
Responses
- 200
Successful response containing a paginated list of vehicle types.Response Format:- Always return an object with the pagination structure- Even for empty results, return the object with docs=[]Alternative Status Codes:- 400: Query parameter error- 401: Unauthorized (invalid or expired JWT token)- 500: Internal server errorError Example:json{ error: Invalid token, message: The authentication token is invalid or expired, statusCode: 401}