Unified GeoTagged Dataset [NTFP] API Documentation
Endpoint: api/v1/dataset/geo-data
This endpoint provides a unified API to retrieve geo-tagged data for Non-Timber Forest Products (NTFPs), including coordinates, timestamps, and blockchain metadata, with support for pagination and filtering by commodity.
Method: GET
Query Parameters:
commodity
(string, optional): Filter data by the name of the commodity.page
(integer, optional): The page number for paginated results. Defaults to 1.limit
(integer, optional): The number of results per page. Defaults to 10.
Response Structure:
Success Response:
- Status:
200 OK
- Content:
{ "currentPage": 1, "totalPages": 5, "totalRecords": 50, "data": [ { "latitude": 12.9716, "longitude": 77.5946, "ntfp": "Honey", "timestamp": "2025-01-02T12:00:00Z", "blockchainHash": "abcd1234efgh5678" }, { "latitude": 13.0827, "longitude": 80.2707, "ntfp": "Bamboo", "timestamp": "2025-01-01T15:30:00Z", "blockchainHash": "ijkl9012mnop3456" } ] }
Error Responses:
-
Status:
400 Bad Request
(If query parameters are invalid){ "error": "Invalid query parameters" }
-
Status:
404 Not Found
(If no data matches the query){ "error": "No data found" }
Notes:
- This API supports advanced filtering by commodity and pagination for efficient data retrieval.
- Blockchain metadata ensures data integrity and traceability.
- Ensure query parameters are URL-encoded if they contain special characters.