Implements are agricultural equipment and attachments used with tractors for various farming operations. This resource manages the catalog of available implements with their specifications, soil compatibility, and power requirements.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/David9604/BackMaqagr/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Implement resource represents agricultural implements such as plows, harrows, seeders, and other farming equipment. Each implement has detailed specifications including power requirements, working dimensions, and soil type compatibility.Key Features
- Public catalog access for all implements
- Search and filter by type, soil compatibility, and power requirements
- Availability tracking (available, maintenance, inactive)
- Admin-only create, update, and delete operations
- Soft delete implementation (status changes to inactive)
Data Model
The Implement model contains the following fields:Unique identifier for the implement (auto-generated)
Name or description of the implement
Manufacturer brand (e.g., “Baldan”, “Jumil”)
Minimum tractor power required in horsepower (HP). Must be a positive number.
Working width in meters. Must be a positive number.
Compatible soil type (e.g., “clay”, “sandy”, “loamy”, “All”)
Working depth in centimeters. Must be a positive number if provided.
Total weight in kilograms. Must be a positive number if provided.
Type of implement. Allowed values:
plow, harrow, seeder, sprayer, harvester, cultivator, mower, trailer, otherCurrent status. Allowed values:
available, maintenance, inactiveCommon Operations
List All Implements
Retrieve all implements with pagination support. This endpoint is publicly accessible.Get Implement by ID
Retrieve a specific implement by its unique identifier.Search Implements
Search and filter implements by type, soil type compatibility, brand, and maximum power requirement.Get Available Implements
Retrieve only implements withavailable status, sorted by type and power requirement.
Create Implement
Create a new implement in the catalog.Update Implement
Update an existing implement. Only provided fields are updated (partial update using COALESCE).Delete Implement
Implements use soft delete. The implement’s status is changed to
inactive rather than being removed from the database.Implement Types
The API supports the following implement types:Plow
Used for soil turning and preparation
Harrow
For soil smoothing and leveling
Seeder
Planting and seeding equipment
Sprayer
Chemical and fertilizer application
Harvester
Crop harvesting machinery
Cultivator
Soil cultivation and weed control
Mower
Grass and crop cutting
Trailer
Transport and hauling
Other
Miscellaneous implements
Validation Rules
When creating or updating implements, the following validation rules apply:Required Fields (Create)
implement_name: Must be a non-empty stringbrand: Must be a non-empty stringpower_requirement_hp: Required, must be a positive numberworking_width_m: Required, must be a positive numberimplement_type: Required, must be one of:plow,harrow,seeder,sprayer,harvester,cultivator,mower,trailer,other
Optional Fields
soil_type: String (compatible soil type)working_depth_cm: Positive number if providedweight_kg: Positive number if providedstatus: One ofavailable,maintenance,inactive(defaults toavailable)
Validation Examples
Soil Type Compatibility
Implements can specify soil type compatibility. When searching, implements marked as"All" will match any soil type query.
Example: Finding implements for clay soil
Error Responses
400 Bad Request
Returned when validation fails or invalid ID format is provided.401 Unauthorized
Returned when authentication token is missing or invalid (admin operations).403 Forbidden
Returned when a non-admin user attempts admin operations.404 Not Found
Returned when the specified implement does not exist.Related Resources
- Tractors - Tractors that can power these implements
- Recommendations - Get tractor-implement compatibility recommendations
- API Reference - Complete API endpoint documentation
Source Code References
- Model:
src/models/Implement.js - Controller:
src/controllers/implementController.js - Routes:
src/routes/implement.routes.js - Validation:
src/middleware/validation.middleware.js
