Get Tractor
Retrieve tractor information using different methods: by ID, available only, or with search filters.Get by ID
Endpoint
Path Parameters
Unique identifier of the tractor to retrieve. Must be a positive integer.
Response Fields
Indicates if the request was successful
Tractor object with complete details
Example Request
Example Responses
Error Cases
400 Bad Request
400 Bad Request
Returned when the provided ID is invalid (not a positive integer).Examples of invalid IDs:
- Negative numbers:
-1 - Zero:
0 - Non-numeric values:
abc,null - Decimal numbers:
1.5
404 Not Found
404 Not Found
Returned when no tractor exists with the specified ID.The ID may be valid, but the tractor might have been deleted or never existed.
500 Internal Server Error
500 Internal Server Error
Returned when an unexpected server error occurs (e.g., database connection issues).
Use Cases
Tractor Details Page
Display complete specifications for a specific tractor in your application
Equipment Comparison
Fetch multiple tractors by ID to compare specifications side-by-side
Recommendation Context
Get detailed specs after receiving tractor recommendations
Verification
Verify tractor exists and is available before creating calculations
Get Available Tractors
Endpoint
Query Parameters
Number of results per page
Number of records to skip for pagination
Examples
Response Example (200 OK)
Search Tractors
Endpoint
Query Parameters
Filter by brand name (partial match, case-insensitive)
Filter by model name (partial match, case-insensitive)
Minimum engine power in HP
Maximum engine power in HP
Filter by traction type:
4x2, 4x4, or trackNumber of results per page
Number of records to skip
Examples
Response Example (200 OK)
Related Endpoints
List All Tractors
Get paginated list of all tractors
Create Tractor
Add new tractor (admin only)
Update Tractor
Modify tractor details (admin only)
Delete Tractor
Remove tractor from catalog (admin only)
