Overview
The Waste API (Mermas) manages production waste records associated with batches. It tracks different types of waste that occur during the dairy production process.Base URL
Get Waste Types
Response
Array of waste type strings:
- Natural: Natural waste occurring during production processes
- Tecnica: Technical waste due to equipment or process issues
- Administrativa: Administrative waste from handling or documentation errors
- Danio: Waste from damaged products
Create Waste Record
Request Body
UUID of the batch this waste is associated with
Type of waste. Must be one of:
- “Natural”
- “Tecnica”
- “Administrativa”
- “Danio”
Amount of waste (in the same unit as the batch)
Additional notes or observations about the waste
Response
UUID of the created waste record
UUID of the associated batch
Waste type
Waste amount
Observations (may be null)
Timestamp of waste record creation (ISO 8601)
List All Waste Records
Response
Get Waste Record by ID
Path Parameters
UUID of the waste record
Response
Update Waste Record
Path Parameters
UUID of the waste record to update
Request Body
All fields are optional. Only include fields you want to update.New waste type (must be a valid type)
New waste amount
Updated observations
Response
Delete Waste Record
Path Parameters
UUID of the waste record to delete
Response
Waste Types Reference
Natural
Waste that occurs naturally during production processes, such as evaporation, settling, or natural spoilage.Tecnica
Waste caused by technical issues, equipment malfunction, or process errors during production.Administrativa
Waste resulting from administrative errors, mishandling, incorrect documentation, or storage issues.Danio
Waste from physically damaged products that cannot be sold or used.Error Responses
400 Bad Request
- Invalid waste type
- Invalid quantity (must be positive)
- Validation errors
404 Not Found
- Waste record does not exist
- Associated batch does not exist
500 Internal Server Error
- Unexpected server error
