{"openapi":"3.1.0","info":{"title":"Satrovia Public API","description":"Free public tools for fields and gardens: Sentinel-2 vegetation check for any point or polygon, weather with frost and watering hints, place search and an EU CAP funding estimate. No authentication required.","version":"1.0.0","contact":{"email":"contact@satrovia.com"}},"servers":[{"url":"https://satrovia.com"}],"paths":{"/api/public/field-check":{"post":{"tags":["public"],"summary":"Field Check","description":"Latest Sentinel-2 vegetation reading for a point (200 m square) or a polygon,\ncompared with the same time last year. Real measurements only: if no clear\nobservation exists the status is \"no_data\" with a reason code.","operationId":"field_check_api_public_field_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/weather":{"get":{"tags":["public"],"summary":"Public Weather","description":"Daily forecast plus frost and watering hints (codes, not prose).","operationId":"public_weather_api_public_weather_get","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","maximum":85.0,"minimum":-85.0,"title":"Lat"}},{"name":"lng","in":"query","required":true,"schema":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lng"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeatherResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/geocode":{"get":{"tags":["public"],"summary":"Geocode","description":"Place search for the map (towns, streets, addresses).","operationId":"geocode_api_public_geocode_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":120,"title":"Q"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","pattern":"^(de|en)$","default":"de","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeocodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/funding-estimate":{"post":{"tags":["public"],"summary":"Estimate Funding","description":"Estimate EU CAP funding for given farm parameters.","operationId":"estimate_funding_api_public_funding_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingEstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/report/{token}":{"get":{"tags":["public"],"summary":"Public Report","description":"Read-only report for a shared field. `insights` has the shape of\nGET /api/farms/{id}/insights without `farm_id`: while\n`insights.series_complete` is false, call again after a few seconds.","operationId":"public_report_api_public_report__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":120,"minimum":0,"description":"History span in months; 0 = full archive (since 2017)","default":12,"title":"Months"},"description":"History span in months; 0 = full archive (since 2017)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/report/{token}/image":{"get":{"tags":["public"],"summary":"Public Report Image","description":"Map overlay for a shared field; same response as GET /api/farms/{id}/image.","operationId":"public_report_image_api_public_report__token__image_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","pattern":"^(ndvi|ndmi|change|truecolor|infrared)$","default":"ndvi","title":"Kind"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(field|area)$","default":"field","title":"Scope"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"A date from latest/last_year/series; default: latest","title":"Date"},"description":"A date from latest/last_year/series; default: latest"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"FieldCheckRequest":{"properties":{"lat":{"anyOf":[{"type":"number","maximum":85.0,"minimum":-85.0},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Lng"},"geometry":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Geometry","description":"GeoJSON Polygon (lon/lat)"},"include_series":{"type":"boolean","title":"Include Series","default":false}},"type":"object","title":"FieldCheckRequest"},"FieldCheckResponse":{"properties":{"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"area_ha":{"type":"number","title":"Area Ha"},"too_small_for_satellite":{"type":"boolean","title":"Too Small For Satellite"},"center":{"$ref":"#/components/schemas/LatLng"},"latest":{"anyOf":[{"$ref":"#/components/schemas/LatestObservation"},{"type":"null"}]},"last_year":{"anyOf":[{"$ref":"#/components/schemas/LastYearObservation"},{"type":"null"}]},"ndvi_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi Change"},"trend":{"type":"string","title":"Trend"},"vegetation":{"type":"string","title":"Vegetation"},"moisture":{"type":"string","title":"Moisture"},"series":{"anyOf":[{"items":{"$ref":"#/components/schemas/SeriesPoint"},"type":"array"},{"type":"null"}],"title":"Series"},"series_complete":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Series Complete"},"attribution":{"type":"string","title":"Attribution"}},"type":"object","required":["status","area_ha","too_small_for_satellite","center","trend","vegetation","moisture","attribution"],"title":"FieldCheckResponse"},"FundingEstimateRequest":{"properties":{"hectares":{"type":"number","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Hectares"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"crop_type":{"type":"string","title":"Crop Type"},"is_organic":{"type":"boolean","title":"Is Organic","default":false},"eco_scheme":{"type":"boolean","title":"Eco Scheme","default":false},"young_farmer":{"type":"boolean","title":"Young Farmer","default":false}},"type":"object","required":["hectares","country","crop_type"],"title":"FundingEstimateRequest"},"FundingEstimateResponse":{"properties":{"total":{"type":"number","title":"Total"},"breakdown":{"items":{"$ref":"#/components/schemas/FundingBreakdownItem"},"type":"array","title":"Breakdown"},"disclaimer":{"type":"string","title":"Disclaimer"}},"type":"object","required":["total","breakdown","disclaimer"],"title":"FundingEstimateResponse"},"GeocodeResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/GeocodeResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"GeocodeResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageResponse":{"properties":{"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"kind":{"type":"string","title":"Kind"},"scope":{"type":"string","title":"Scope","default":"field"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"compare_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compare Date"},"bounds":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Bounds"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"legend":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Legend"},"stats":{"anyOf":[{"$ref":"#/components/schemas/ImageStats"},{"type":"null"}]},"attribution":{"type":"string","title":"Attribution"}},"type":"object","required":["status","kind","attribution"],"title":"ImageResponse"},"PublicReport":{"properties":{"name":{"type":"string","title":"Name"},"crop_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crop Type"},"area_hectares":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Area Hectares"},"boundary":{"$ref":"#/components/schemas/GeoJSONPolygon"},"insights":{"$ref":"#/components/schemas/InsightsBody"},"weather":{"anyOf":[{"$ref":"#/components/schemas/WeatherResponse"},{"type":"null"}]}},"type":"object","required":["name","boundary","insights"],"title":"PublicReport"},"WeatherResponse":{"properties":{"daily":{"items":{"$ref":"#/components/schemas/DailyWeather"},"type":"array","title":"Daily"},"frost":{"anyOf":[{"$ref":"#/components/schemas/FrostWarning"},{"type":"null"}]},"rain_next_7d_mm":{"type":"number","title":"Rain Next 7D Mm"},"watering":{"type":"string","title":"Watering"},"water_balance":{"anyOf":[{"$ref":"#/components/schemas/WaterBalance"},{"type":"null"}]},"attribution":{"type":"string","title":"Attribution"}},"type":"object","required":["daily","rain_next_7d_mm","watering","attribution"],"title":"WeatherResponse"},"LatLng":{"properties":{"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"}},"type":"object","required":["lat","lng"],"title":"LatLng"},"SeriesPoint":{"properties":{"date":{"type":"string","title":"Date"},"ndvi":{"type":"number","title":"Ndvi"},"ndmi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndmi"}},"type":"object","required":["date","ndvi"],"title":"SeriesPoint"},"FundingBreakdownItem":{"properties":{"program":{"type":"string","title":"Program"},"amount":{"type":"number","title":"Amount"},"per_ha":{"type":"number","title":"Per Ha"},"description":{"type":"string","title":"Description"}},"type":"object","required":["program","amount","per_ha","description"],"title":"FundingBreakdownItem"},"GeocodeResult":{"properties":{"label":{"type":"string","title":"Label"},"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"}},"type":"object","required":["label","lat","lng"],"title":"GeocodeResult"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"GeoJSONPolygon":{"properties":{"type":{"type":"string","title":"Type","default":"Polygon"},"coordinates":{"items":{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},"type":"array","title":"Coordinates"}},"type":"object","required":["coordinates"],"title":"GeoJSONPolygon"},"InsightsBody":{"properties":{"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"area_ha":{"type":"number","title":"Area Ha"},"too_small_for_satellite":{"type":"boolean","title":"Too Small For Satellite"},"center":{"$ref":"#/components/schemas/LatLng"},"latest":{"anyOf":[{"$ref":"#/components/schemas/LatestObservation"},{"type":"null"}]},"last_year":{"anyOf":[{"$ref":"#/components/schemas/LastYearObservation"},{"type":"null"}]},"ndvi_change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndvi Change"},"trend":{"type":"string","title":"Trend"},"vegetation":{"type":"string","title":"Vegetation"},"moisture":{"type":"string","title":"Moisture"},"series":{"anyOf":[{"items":{"$ref":"#/components/schemas/SeriesPoint"},"type":"array"},{"type":"null"}],"title":"Series"},"series_complete":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Series Complete"},"attribution":{"type":"string","title":"Attribution"},"months":{"type":"integer","title":"Months"},"series_start":{"type":"string","title":"Series Start"}},"type":"object","required":["status","area_ha","too_small_for_satellite","center","trend","vegetation","moisture","attribution","months","series_start"],"title":"InsightsBody"},"DailyWeather":{"properties":{"date":{"type":"string","title":"Date"},"t_min":{"type":"number","title":"T Min"},"t_max":{"type":"number","title":"T Max"},"precip_mm":{"type":"number","title":"Precip Mm"},"wind_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wind Max"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}},"type":"object","required":["date","t_min","t_max","precip_mm"],"title":"DailyWeather"}}}}