Fetch API¶
Fetch API enables you to retrieve data that has been previously processed via the Core APIs and Batch APIs. It performs real-time querying capabilities on user-provided and processed supply base data, to return plot-level sustainability metrics (LUC emissions, biodiversity, deforestation), as well as statistically representative comparison to reference areas (watershed or administrative unit).
Available Endpoints¶
The current Fetch API requests are the following:
Core Data Retrieval¶
- Fetch Biomass Data (
/fetch_biomass_data) - Retrieve user-provided and processed plots data with comprehensive sustainability metrics. - Fetch Statistical Biomass Data (
/fetch_stat_biomass_data) - Retrieve statistical reference areas (watersheds or administrative units) where the user-uploaded supply base is located. - Fetch Supply Shed Data (
/fetch_supply_shed_data) - Retrieve supply shed analysis and traceability information.
Simple Fetch Endpoints¶
- Fetch Deforestation Check (
/fetch_deforestation_check) - Retrieve deforestation analysis data for individual plots with EUDR compliance support. - Fetch Biomass Emissions (
/fetch_biomass_emissions) - Retrieve biomass emissions and land use change data for individual plots. - Fetch Biodiversity (
/fetch_biodiversity) - Retrieve biodiversity metrics including canopy height and landscape connectivity for individual plots. - Fetch Water Stress (
/fetch_water_stress) - Retrieve water stress metrics including precipitation, soil moisture, and evapotranspiration data for individual plots. - Fetch Sampling Design (
/fetch_samples) - Retrieve statistically valid field sampling plans (strata and sample points) generated via the Batch API.
EUDR / TRACES¶
- Fetch EUDR Risk Assessment (
/fetch_eudr_risk_assessment) - Retrieve EUDR risk assessment data according to Article 10 clauses. - Export EUDR Due Diligence Statement (
/export_eudr_dds) - Generate a TRACES-ready DDS package (GeoJSON + PDF audit trail). - Submit EUDR Due Diligence Statement (
/submit_eudr_dds) - Submit a DDS to EU TRACES (EUDR SOAP API). - Retrieve EUDR Due Diligence Statement (
/retrieve_eudr_dds) - Retrieve DDS info/status from EU TRACES.
Legacy Endpoints¶
- /fetch_non_biomass_data for retrieving farmgate management practices-related emissions data (currently not documented).
- /fetch_stat_non_biomass_data for retrieving farmgate management practices-related emissions data corresponding to statistical reference areas (currently not documented).
Response Format¶
All Fetch API endpoints return streaming responses in NDJSON format (newline-delimited JSON). This means that the server streams the database table rows as they become available, allowing for efficient handling of large datasets and real-time data population in dashboards.
Each line in the response contains a single JSON object representing either: - A GeoJSON Feature with plot-level data and geometry - Statistical summary data for reference areas - EUDR compliance information and risk assessments
Usage Patterns¶
Real-time Dashboard Integration¶
The streaming nature of these endpoints makes them ideal for populating dashboards incrementally, providing users with immediate access to data as it becomes available.
Batch Data Processing¶
For programmatic access, you can process the streaming response line by line to extract specific metrics or perform custom analysis on the plot-level data.
EUDR Compliance Workflows¶
The EUDR-specific endpoints provide structured data for compliance reporting, risk assessment, audit trail generation required under European Union regulations.
Authentication¶
All Fetch API endpoints require authentication using Bearer tokens. See the Authentication documentation for details on obtaining and using access tokens.