EcoEase API Documentation
Welcome to the EcoEase API documentation. EcoEase is a platform designed to facilitate the management of street trash in urban areas using innovative technology. This API enables the creation, display, and editing of tasks associated with garbage collection, leveraging data from video footage analysis.
EcoEase revolutionizes urban cleanliness by analyzing video footage from delivery riders' bikes to pinpoint street trash. Tasks are generated for workers via the app, ensuring efficient garbage collection and a cleaner cityscape.
EcoEase introduces an innovative solution to address inner-city street trash. In collaboration with a leading food delivery company, EcoEase integrates camera technology onto delivery riders' bikes. This footage undergoes monthly machine learning analysis to identify individual pieces of garbage efficiently. Subsequently, EcoEase automatically generates tasks for workers, directing them to areas with the highest concentration of trash. Utilizing the EcoEase app, workers mark completed garbage collection tasks, ensuring prompt and effective cleanup operations. Join EcoEase in reshaping urban cleanliness and fostering a greener, healthier environment for all.
To get started with the EcoEase API, you will need an API key for authentication. Please refer to the Authentication section for details on obtaining an API key.
EcoEase API uses API keys for authentication. To obtain an API key, please contact the administrator. Once you have the API key, include it in the request headers as follows:
Authorization: secretkey
GET /api/tasks/nearby?latitude={latitude}&longitude={longitude}&radius={radius}
This endpoint retrieves all tasks near a specified area on the map.
latitude
(required): Latitude coordinate of the center point.longitude
(required): Longitude coordinate of the center point.radius
(optional): Radius in meters to define the search area. Default is 1000 meters.
[
{
"id": 1,
"description": "Collect trash at corner of Main St and Elm St",
"workerId": 12,
"location":{"latitude": 37.7749,
"longitude": -122.4194},
"status": "pending"
},
{
"id": 2,
"workerId": 13,
"description": "Remove garbage bags near City Park",
"location":{"latitude": 37.7662,
"longitude": -122.4761,},
"status": "completed"
}
]
POST /api/tasks
This endpoint creates a new task.
{
"workerId": 13,
"description": "Remove garbage bags near City Park",
"location":{"latitude": 37.7662,
"longitude": -122.4761,},
"status": "completed"
}
{
"id": 3,
"workerId": 13,
"description": "Remove garbage bags near City Park",
"location":{"latitude": 37.7662,
"longitude": -122.4761,},
"status": "completed"
}
GET /api/tasks/{taskId}
This endpoint retrieves a specific task by its ID.
{
"id": 3,
"workerId": 13,
"description": "Remove garbage bags near City Park",
"location":{"latitude": 37.7662,
"longitude": -122.4761,},
"status": "completed"
}
PUT /api/tasks/{taskId}
This endpoint updates an existing task.
{
"description": "Collect trash near the subway station entrance",
"status": "completed"
}
{
"id": 3,
"workerId": 13,
"description": "Remove garbage bags near City Park",
"location":{"latitude": 37.7662,
"longitude": -122.4761,},
"status": "completed"
}
DELETE /api/tasks/{taskId}
This endpoint deletes a task by its ID.
Status: 204 No Content
curl -X GET \
'https://api.ecoease.com/api/tasks/nearby?latitude=37.7749&longitude=-122.4194&radius=1000' \
-H 'Authorization: YOUR_API_KEY'
curl -X POST \
https://api.ecoease.com/api/tasks \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"workerId": 13,
"description": "Remove garbage bags near City Park",
"location":{"latitude": 37.7662,
"longitude": -122.4761,},
"status": "completed"
}'
curl -X PUT \
https://api.ecoease.com/tasks/3 \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"description": "Collect trash near the subway station entrance",
"status": "completed"
}'