Explore
Fish Farm System API
1.0
OAS 3.0
Exhaustive API documentation for monitoring and managing fish farms.
Authorize
Health Check
GET
/api
/v1
/health
Run system health checks
Users
POST
/api
/v1
/users
Create a new manager user
GET
/api
/v1
/users
Get all users (paginated)
POST
/api
/v1
/users
/admin
Create a new admin user
PUT
/api
/v1
/users
/roles
/{role}
/modules
Update accessible modules for a role
PATCH
/api
/v1
/users
/{id}
Update user details (Role/Farms)
PATCH
/api
/v1
/users
/{id}
/modules
Update accessible modules for a specific user
GET
/api
/v1
/users
/farm
/{farmId}
Get all users and their roles in a farm
Metadata
GET
/api
/v1
/meta
Get system-wide metadata (enums, modules, etc.)
Authentication
POST
/api
/v1
/auth
/pre-login
Check account and get farm access
POST
/api
/v1
/auth
/login
Login or request 2FA OTP
POST
/api
/v1
/auth
/signup
Create a new user (Manager/Admin only)
POST
/api
/v1
/auth
/token
/refresh
Refresh JWT token
POST
/api
/v1
/auth
/password
/reset-request
Request a password reset
POST
/api
/v1
/auth
/password
/reset
Reset password using token
PUT
/api
/v1
/auth
/2FA
/enable
Enable 2FA for the current user
PUT
/api
/v1
/auth
/2FA
/disable
Disable 2FA for the current user
2FA
POST
/api
/v1
/2FA
/request
Request a new 2FA OTP
POST
/api
/v1
/2FA
/verify
Verify 2FA OTP and get tokens
POST
/api
/v1
/2FA
/resend
Resend 2FA OTP
Fish Types
POST
/api
/v1
/farm
/fish-types
Create a new fish type
GET
/api
/v1
/farm
/fish-types
Get all fish types
PUT
/api
/v1
/farm
/fish-types
/{id}
Update fish type details
GET
/api
/v1
/farm
/fish-types
/{id}
Get fish type by ID
DELETE
/api
/v1
/farm
/fish-types
/{id}
Delete a fish type
GET
/api
/v1
/farm
/fish-types
/{id}
/feeding-rate
Get feeding rate by fish weight and temperature
GET
/api
/v1
/farm
/fish-types
/{id}
/protein-requirement
Get protein requirement by fish weight
Farms
POST
/api
/v1
/farms
Create a new farm
GET
/api
/v1
/farms
Get all farms
GET
/api
/v1
/farms
/{id}
Get farm by ID
PUT
/api
/v1
/farms
/{id}
Update farm details
DELETE
/api
/v1
/farms
/{id}
Delete a farm
GET
/api
/v1
/farms
/user
Get farms for the current user
Tanks
POST
/api
/v1
/tanks
Create a new tank
GET
/api
/v1
/tanks
Get all tanks in the current farm
GET
/api
/v1
/tanks
/{id}
Get tank by ID
DELETE
/api
/v1
/tanks
/{id}
Delete a tank
GET
/api
/v1
/tanks
/{id}
/dashboard
Get tank dashboard data
GET
/api
/v1
/tanks
/{id}
/batches
Get batches in a tank
GET
/api
/v1
/tanks
/{id}
/water-quality
Get water quality history for a tank
GET
/api
/v1
/tanks
/{id}
/feeding-history
Get feeding history for a tank
GET
/api
/v1
/tanks
/{id}
/growth-metrics
Get growth metrics for a tank
Food Types
POST
/api
/v1
/aquaculture
/food-types
Create a new food type
GET
/api
/v1
/aquaculture
/food-types
Get all food types
GET
/api
/v1
/aquaculture
/food-types
/species
Get food types by species
GET
/api
/v1
/aquaculture
/food-types
/{id}
Get food type by ID
PUT
/api
/v1
/aquaculture
/food-types
/{id}
Update food type details
DELETE
/api
/v1
/aquaculture
/food-types
/{id}
Delete a food type
Water Quality
POST
/api
/v1
/tanks
/water-quality
/{batchId}
Create a new water quality reading for a batch
GET
/api
/v1
/tanks
/water-quality
/status
/requiring-action
Get water quality parameters requiring attention
GET
/api
/v1
/tanks
/water-quality
/batch
/{batchId}
/latest
Get latest water quality reading for a batch
GET
/api
/v1
/tanks
/water-quality
/batch
/{batchId}
/assessment
Assess water quality health for a batch
GET
/api
/v1
/tanks
/water-quality
/batch
/{batchId}
Get water quality history for a batch
GET
/api
/v1
/tanks
/water-quality
/{id}
Get water quality reading by ID
PATCH
/api
/v1
/tanks
/water-quality
/{id}
Update a water quality reading
DELETE
/api
/v1
/tanks
/water-quality
/{id}
Delete a water quality reading
Growth Measurements
POST
/api
/v1
/tanks
/growth
/{batchId}
Record a new growth measurement
GET
/api
/v1
/tanks
/growth
/batch
/{batchId}
Get growth history for a specific batch
GET
/api
/v1
/tanks
/growth
/batch
/{batchId}
/latest
Get latest growth measurement for a batch
GET
/api
/v1
/tanks
/growth
/batch
/{batchId}
/analysis
Analyze growth performance for a batch
GET
/api
/v1
/tanks
/growth
/{id}
Get growth measurement by ID
PUT
/api
/v1
/tanks
/growth
/{id}
Update growth measurement by ID
DELETE
/api
/v1
/tanks
/growth
/{id}
Delete a growth measurement
Feeding Records
POST
/api
/v1
/tanks
/feeding-records
/{batchId}
Record a new feeding event
GET
/api
/v1
/tanks
/feeding-records
/{id}
Get a specific feeding record
DELETE
/api
/v1
/tanks
/feeding-records
/{id}
Delete a feeding record
GET
/api
/v1
/tanks
/feeding-records
/batch
/{batchId}
Get feeding records for a batch
GET
/api
/v1
/tanks
/feeding-records
/calculation
/tank
/{tankId}
Calculate recommended feeding for all batches in a tank
GET
/api
/v1
/tanks
/feeding-records
/calculation
/batch
/{batchId}
Calculate recommended feeding for a batch
Tank Assignments
POST
/api
/v1
/tanks
/{tankId}
/assign
/{userId}
Assign a user to a specific tank
DELETE
/api
/v1
/tanks
/{tankId}
/unassign
/{userId}
Unassign a user from a specific tank
GET
/api
/v1
/tanks
/{tankId}
/users
Get all users assigned to a specific tank
IoT Sensors
POST
/api
/v1
/iot
/ingest
Receive sensor data from ESP32 device
GET
/api
/v1
/iot
/stream
/{tankId}
Open SSE stream for live sensor data on a tank
POST
/api
/v1
/iot
/devices
/register
Register an ESP32 device and link it to a tank
GET
/api
/v1
/iot
/devices
List all registered IoT devices
DELETE
/api
/v1
/iot
/devices
/{deviceId}
Unregister an IoT device
Health Checks
POST
/api
/v1
/tanks
/health-checks
/{batchId}
Record a new health check for a batch
GET
/api
/v1
/tanks
/health-checks
/batch
/{batchId}
Get health history for a batch
GET
/api
/v1
/tanks
/health-checks
/{id}
Get health check by ID
PATCH
/api
/v1
/tanks
/health-checks
/{id}
Update a health check
DELETE
/api
/v1
/tanks
/health-checks
/{id}
Delete a health check
Inventory Batches
GET
/api
/v1
/inventory
/batches
Get all inventory batches
GET
/api
/v1
/inventory
/batches
/{id}
Get inventory batch by ID
PATCH
/api
/v1
/inventory
/batches
/{id}
/quarantine
Move a batch to quarantine
PATCH
/api
/v1
/inventory
/batches
/{id}
/health-check
Record a health check for a batch
PATCH
/api
/v1
/inventory
/batches
/{id}
/allocate
Allocate inventory from a batch
Feed Inventory
POST
/api
/v1
/inventory
/feed
Receive new feed stock
GET
/api
/v1
/inventory
/feed
Get current feed inventory
GET
/api
/v1
/inventory
/feed
/food-type
/{foodId}
Get feed inventory by food type
GET
/api
/v1
/inventory
/feed
/{id}
Get feed inventory record by ID
DELETE
/api
/v1
/inventory
/feed
/{id}
Delete a feed inventory record
Inventory - Medicine
POST
/api
/v1
/inventory
/medicine
Receive new medicine stock
GET
/api
/v1
/inventory
/medicine
Get all medicine inventory for farm
GET
/api
/v1
/inventory
/medicine
/total
Get total stock for a medicine
GET
/api
/v1
/inventory
/medicine
/{id}
Get inventory batch by ID
DELETE
/api
/v1
/inventory
/medicine
/{id}
Delete inventory batch
PATCH
/api
/v1
/inventory
/medicine
/{id}
/quantity
Update batch quantity
Tasks
POST
/api
/v1
/tasks
Create a task from a template
GET
/api
/v1
/tasks
Get all tasks for the farm (manager/admin)
GET
/api
/v1
/tasks
/mine
Get tasks assigned to me
GET
/api
/v1
/tasks
/tank
/{tankId}
Get all tasks for a specific tank
PATCH
/api
/v1
/tasks
/{id}
/status
Update my task status
DELETE
/api
/v1
/tasks
/{id}
Cancel a task (manager/admin)
Task Templates
GET
/api
/v1
/task-templates
List all active task templates
PATCH
/api
/v1
/task-templates
/{id}
Update a task template (admin)
Notifications
GET
/api
/v1
/notifications
Get current user notifications
GET
/api
/v1
/notifications
/unread-count
Get count of unread notifications
PATCH
/api
/v1
/notifications
/{id}
/read
Mark notification as read
GET
/api
/v1
/notifications
/stream
Open an SSE stream for real-time notifications
Notification Templates
GET
/api
/v1
/notification-templates
Get all notification templates
PATCH
/api
/v1
/notification-templates
/{id}
Update a notification template
POST
/api
/v1
/notification-templates
/refresh-cache
Refresh the notification template cache
Harvest Events
GET
/api
/v1
/harvest
/events
Get harvest history for current farm
GET
/api
/v1
/harvest
/events
/tank
/{tankId}
Get harvest history for a specific tank
GET
/api
/v1
/harvest
/events
/{id}
/gradings
Get grading records for a harvest event
GET
/api
/v1
/harvest
/events
/prediction
/batch
/{batchId}
Predict harvest results for a batch
POST
/api
/v1
/harvest
/events
/start
Start a new harvest event
POST
/api
/v1
/harvest
/events
/{id}
/grading
Add a grading record to a harvest event
POST
/api
/v1
/harvest
/events
/{id}
/complete
Complete a harvest event
GET
/api
/v1
/harvest
/events
/active-tanks
Get tanks with active (draft) harvest events
Harvest Pricing
POST
/api
/v1
/harvest
/pricing
Create fish grade pricing
GET
/api
/v1
/harvest
/pricing
/fish-type
/{fishTypeId}
Get pricing by fish type
PATCH
/api
/v1
/harvest
/pricing
/{id}
Update fish grade pricing
DELETE
/api
/v1
/harvest
/pricing
/{id}
Delete pricing
Harvested Inventory
GET
/api
/v1
/harvested-inventory
/find
Find harvested inventory with filters
GET
/api
/v1
/harvested-inventory
/valuation
Get total valuation of harvested inventory
GET
/api
/v1
/harvested-inventory
/traceability
/{lotNumber}
Get harvest-to-sale traceability for a specific lot
GET
/api
/v1
/harvested-inventory
/summary
Get summarized inventory of all harvested fish
GET
/api
/v1
/harvested-inventory
/fish-type
/{id}
Get harvested inventory summary for a specific fish type
GET
/api
/v1
/harvested-inventory
/grade
/{id}
Get harvested inventory summary for a specific fish grade
Storage Locations
POST
/api
/v1
/storage-locations
Create a new storage location
GET
/api
/v1
/storage-locations
Get all storage locations for the farm
GET
/api
/v1
/storage-locations
/{id}
Get storage location by ID
DELETE
/api
/v1
/storage-locations
/{id}
Delete a storage location
Sales - Customers
POST
/api
/v1
/sales
/customers
Create a new customer
GET
/api
/v1
/sales
/customers
List all customers
GET
/api
/v1
/sales
/customers
/{id}
Get customer details
PATCH
/api
/v1
/sales
/customers
/{id}
Update customer details
DELETE
/api
/v1
/sales
/customers
/{id}
Deactivate customer
Sales - Orders
POST
/api
/v1
/sales
/orders
Create a new sales order
GET
/api
/v1
/sales
/orders
List all sales orders
POST
/api
/v1
/sales
/orders
/{id}
/approve
Approve a pending order
GET
/api
/v1
/sales
/orders
/available-inventory
Get available harvested stock
GET
/api
/v1
/sales
/orders
/{id}
Get sales order details
PATCH
/api
/v1
/sales
/orders
/{id}
Update pending order
POST
/api
/v1
/sales
/orders
/{id}
/fulfill
Mark order as fulfilled
POST
/api
/v1
/sales
/orders
/{id}
/cancel
Cancel order
Sales - Analytics
GET
/api
/v1
/sales
/analytics
/dashboard
Get sales dashboard metrics
GET
/api
/v1
/sales
/analytics
/stock-dashboard
Get harvested stock dashboard metrics
Fish Purchase Orders
POST
/api
/v1
/procurement
/fish-orders
Create a new fish purchase order
GET
/api
/v1
/procurement
/fish-orders
Get all fish purchase orders
PATCH
/api
/v1
/procurement
/fish-orders
/{id}
/status
Update overall status of a purchase order
PATCH
/api
/v1
/procurement
/fish-orders
/{id}
/items
/{itemId}
/status
Update status of a specific line item
GET
/api
/v1
/procurement
/fish-orders
/{id}
Get fish purchase order by ID
Feed Purchase Orders
POST
/api
/v1
/procurement
/feed-orders
Create a new feed purchase order
GET
/api
/v1
/procurement
/feed-orders
Get all feed purchase orders
PATCH
/api
/v1
/procurement
/feed-orders
/{id}
/status
Update overall status of a purchase order
PATCH
/api
/v1
/procurement
/feed-orders
/{id}
/delivery-status
Update delivery status for a delivered feed purchase order
PATCH
/api
/v1
/procurement
/feed-orders
/{id}
/items
/{itemId}
/status
Update status of a specific line item
GET
/api
/v1
/procurement
/feed-orders
/{id}
Get feed purchase order by ID
Procurement - Medicine Purchase Orders
POST
/api
/v1
/procurement
/medicine-orders
Create medicine purchase order
GET
/api
/v1
/procurement
/medicine-orders
Get all medicine purchase orders
PATCH
/api
/v1
/procurement
/medicine-orders
/{id}
/status
Update medicine purchase order status
PATCH
/api
/v1
/procurement
/medicine-orders
/{id}
/delivery-status
Update medicine order delivery status
PATCH
/api
/v1
/procurement
/medicine-orders
/{id}
/line-items
/{itemId}
/status
Update medicine order line item status
GET
/api
/v1
/procurement
/medicine-orders
/{id}
Get medicine purchase order by id
Suppliers
POST
/api
/v1
/procurement
/suppliers
Create a new supplier
GET
/api
/v1
/procurement
/suppliers
Get all suppliers
GET
/api
/v1
/procurement
/suppliers
/{id}
Get supplier by ID
Dashboard
GET
/api
/v1
/dashboard
Accounting - Expenses
POST
/api
/v1
/accounting
/expenses
Record a new expense
GET
/api
/v1
/accounting
/expenses
Get all expenses for the farm
DELETE
/api
/v1
/accounting
/expenses
/{id}
Delete an expense record
Accounting Metrics
GET
/api
/v1
/api
/accounting
/metrics
Get accounting dashboard metrics
Accounting Reports
GET
/api
/v1
/api
/accounting
/reports
/inventory-valuation
Get current inventory valuation
GET
/api
/v1
/api
/accounting
/reports
/profit-loss
Generate Profit & Loss statement
GET
/api
/v1
/api
/accounting
/reports
/balance-sheet
Generate Balance Sheet
GET
/api
/v1
/api
/accounting
/reports
/traceability
/{lotNumber}
Get lot traceability report
GET
/api
/v1
/api
/accounting
/reports
/harvest-revenue
Generate Harvest Revenue report
Accounting Journal Entries
GET
/api
/v1
/api
/accounting
/journal-entries
Get all journal entries with filters
POST
/api
/v1
/api
/accounting
/journal-entries
Create a manual journal entry
GET
/api
/v1
/api
/accounting
/journal-entries
/{id}
Get a specific journal entry by ID
Accounting Accounts
GET
/api
/v1
/api
/accounting
/accounts
List all accounts
GET
/api
/v1
/api
/accounting
/accounts
/{id}
/ledger
Get account general ledger
Schemas
CreateUserBody
UpdateRoleModulesBody
UpdateUserBody
UpdateUserModulesBody
PreLoginBody
FarmInfo
PreLoginResponse
LoginBody
LoginResult
SignupBody
RefreshTokenBody
RequestPasswordResetBody
PasswordResetResponseDto
ResetPasswordBody
RequestOTPBody
OTPResponseDto
VerifyOTPBody
UserInfo
VerifyOTPResponseDto
ResendOTPBody
CreateFishTypeDTO
UpdateFishTypeDTO
CreateFarmDTO
UpdateFarmDTO
CreateTankDTO
TankInfoDataDto
TankSummaryItemDto
TankCapacityDataDto
TankBatchSummaryItemDto
TankDashboardResponseDto
TankBatchesResponseDto
TankWaterQualityTrendDto
TankWaterQualityResponseDto
TankFeedingScheduleItemDto
TankFeedingHistoryResponseDto
TankGrowthMetricsResponseDto
TankBiomassDto
TankWaterQualitySummaryDto
TankFeedingSummaryDto
TankSummaryResponseDto
CreateFoodTypeDto
UpdateFoodTypeDto
CreateWaterQualityReadingDTO
UpdateWaterQualityReadingDTO
CreateGrowthMeasurementDto
UpdateGrowthMeasurementDto
CreateFeedingRecordDto
FeedingRecordResponseDto
RecommendedFoodTypeDto
FeedingCalculationResponseDto
TankFeedingCalculationResponseDto
IngestSensorDataDTO
RegisterDeviceDTO
CreateHealthCheckDTO
UpdateHealthCheckDTO
MoveToQuarantineDto
RecordHealthCheckDto
AllocateInventoryDto
CreateTaskDto
UpdateTaskStatusDto
UpdateTaskTemplateDto
UpdateTemplateDto
HarvestEventResponseDto
GradeDistributionDto
HarvestPredictionResponseDto
StartHarvestDto
AddGradingRecordDto
CompleteHarvestDto
ActiveHarvestSummaryDto
CreateFishGradePricingDto
UpdateFishGradePricingDto
CreateStorageLocationDto
CreateCustomerDto
ApiResponse
CustomerResponseDto
SalesOrderItemDto
CreateSalesOrderDto
ApproveSalesOrderDto
SalesOrderItemResponseDto
SalesOrderResponseDto
SalesDashboardMetricsDto
HarvestedStockItemDto
HarvestedStockDashboardDto
CreateFishPurchaseOrderLineItemDto
CreateFishPurchaseOrderDto
UpdateFishPurchaseOrderDto
UpdatePurchaseOrderLineItemStatusDto
CreateFeedPurchaseOrderLineItemDto
CreateFeedPurchaseOrderDto
UpdateFeedPurchaseOrderDto
UpdateDeliveryDto
CreateMedicinePurchaseOrderLineItemDto
CreateMedicinePurchaseOrderDto
UpdateMedicinePurchaseOrderDto
CreateSupplierDto
ExpenseResponseDto
CreateExpenseDto
DashboardSummaryDto
MonthlyTrendDto
DashboardResponseDto
InventoryValuationResponseDto
ProfitLossBreakdownDto
ProfitLossResponseDto
BalanceSheetBreakdownDto
BalanceSheetResponseDto
HarvestRevenueTransactionDto
HarvestRevenueResponseDto
JournalEntryItemResponseDto
JournalEntryResponseDto
CreateJournalEntryItemDto
CreateJournalEntryDto
AccountResponseDto
LedgerTransactionDto
LedgerResponseDto