List Tractors
Retrieve all tractors from the catalog with pagination, sorting, and filtering capabilities. This endpoint is public and does not require authentication.
Endpoint
Query Parameters
Page number for pagination
Number of records per page (maximum 100)
Field to sort by. Available fields: brand, model, engine_power_hp, weight_kg, status
Sort order: asc (ascending) or desc (descending)
Response Fields
Indicates if the request was successful
Array of tractor objects Unique identifier for the tractor
Display name of the tractor (e.g., “John Deere 6130M”)
Tractor brand/manufacturer
Engine power in horsepower (HP)
Total weight in kilograms
Traction force in kilonewtons (kN)
Type of traction system. Values: 4x2, 4x4, track
Type of tires (e.g., “radial”, “bias”)
Tire width in millimeters
Tire diameter in millimeters
Recommended tire pressure in PSI
Current status. Values: available, maintenance, inactive
Example Request
curl -X GET "http://localhost:4000/api/tractors?page=1&limit=10&sort=engine_power_hp&order=desc" \
-H "Content-Type: application/json"
Example Response
{
"success" : true ,
"data" : [
{
"tractor_id" : 1 ,
"name" : "John Deere 6130M" ,
"brand" : "John Deere" ,
"model" : "6130M" ,
"engine_power_hp" : 130 ,
"weight_kg" : 5200 ,
"traction_force_kn" : 45.5 ,
"traction_type" : "4x4" ,
"tire_type" : "radial" ,
"tire_width_mm" : 540 ,
"tire_diameter_mm" : 1600 ,
"tire_pressure_psi" : 15 ,
"status" : "available"
},
{
"tractor_id" : 2 ,
"name" : "Case IH Magnum 280" ,
"brand" : "Case IH" ,
"model" : "Magnum 280" ,
"engine_power_hp" : 280 ,
"weight_kg" : 11200 ,
"traction_force_kn" : 85.3 ,
"traction_type" : "4x4" ,
"tire_type" : "radial" ,
"tire_width_mm" : 710 ,
"tire_diameter_mm" : 1880 ,
"tire_pressure_psi" : 18 ,
"status" : "available"
}
],
"pagination" : {
"page" : 1 ,
"limit" : 10 ,
"total" : 25 ,
"totalPages" : 3
}
}
Search Tractors Filter tractors by brand, model, and power range
Get Available Tractors Get only tractors with “available” status
Get Tractor by ID Retrieve a specific tractor’s details
Create Tractor Add a new tractor (admin only)
This endpoint is cached for 24 hours. Changes made through create, update, or delete operations will invalidate the cache automatically.