GET/api/v1/waste-bins/map
Generate and return a map of waste bin locations
Responses
| Status | Description |
|---|
| 200 | HTML content with interactive map |
| 422 | Validation Error |
GET/api/v1/waste-bins
Get all waste bins with optional filtering
Parameters
| Name | Type | Required | Description |
|---|
| waste_type | string | No | Filter by waste type |
| requires_maintenance | boolean | No | Filter by maintenance status |
| min_fill_level | integer | No | Minimum fill level (0-100) |
| max_fill_level | integer | No | Maximum fill level (0-100) |
| area | string | No | Filter by area |
| skip | integer | No | Number of records to skip |
| limit | integer | No | Maximum records to return |
Responses
| Status | Description |
|---|
| 200 | List of waste bins |
| 422 | Validation Error |
GET/api/v1/waste-bins/{bin_id}
Get a specific waste bin by ID
Parameters
| Name | Type | Required | Description |
|---|
| bin_id | string | Yes | Bin ID |
Responses
| Status | Description |
|---|
| 200 | Waste bin details |
| 404 | Waste bin not found |
| 422 | Validation Error |
PUT/api/v1/waste-bins/{bin_id}
Update a waste bin's information
Parameters
| Name | Type | Required | Description |
|---|
| bin_id | string | Yes | Bin ID |
| location_lat | number | No | Latitude coordinate |
| location_long | number | No | Longitude coordinate |
| capacity | integer | No | Bin capacity |
| waste_type | string | No | Type of waste |
| current_fill_level | integer | No | Current fill level (0-100) |
| requires_maintenance | boolean | No | Maintenance status |
| last_collection | string | No | Last collection timestamp |
Responses
| Status | Description |
|---|
| 200 | Updated waste bin details |
| 404 | Waste bin not found |
| 422 | Validation Error |
DELETE/api/v1/waste-bins/{bin_id}
Delete a waste bin from the system
Parameters
| Name | Type | Required | Description |
|---|
| bin_id | string | Yes | Bin ID |
Responses
| Status | Description |
|---|
| 200 | Waste bin deleted successfully |
| 404 | Waste bin not found |
| 422 | Validation Error |
POST/api/v1/waste-bins/create
Create a new waste bin
Parameters
| Name | Type | Required | Description |
|---|
| location_lat | number | Yes | Latitude coordinate |
| location_long | number | Yes | Longitude coordinate |
| capacity | integer | Yes | Bin capacity |
| waste_type | string | Yes | Type of waste |
| current_fill_level | integer | Yes | Current fill level (0-100) |
| requires_maintenance | boolean | Yes | Maintenance status |
Responses
| Status | Description |
|---|
| 201 | Waste bin created successfully |
| 422 | Validation Error |
POST/api/v1/waste-bins/{bin_id}/maintenance
Request maintenance for a waste bin
Parameters
| Name | Type | Required | Description |
|---|
| bin_id | string | Yes | Bin ID |
Responses
| Status | Description |
|---|
| 200 | Maintenance requested successfully |
| 404 | Waste bin not found |
| 422 | Validation Error |
POST/api/v1/waste-bins/{bin_id}/collect
Mark a waste bin as collected and reset its fill level
Parameters
| Name | Type | Required | Description |
|---|
| bin_id | string | Yes | Bin ID |
Responses
| Status | Description |
|---|
| 200 | Waste collected successfully |
| 404 | Waste bin not found |
| 422 | Validation Error |
GET/api/v1/waste-bins/stats/overview
Get overview statistics of all waste bins
Responses
| Status | Description |
|---|
| 200 | Waste bin statistics |
| 422 | Validation Error |