API - Version 1 (current)
Useful links:
https://app.coolfarmtool.org/docs/api/v1/index.html
https://app.coolfarmtool.org/docs/api/v1/data-schemas.html
Communicate with the Cool Farm Tool to:
fetch input and emissions data stored in the CFT for visualisation or further analysis (see Retrieving information with the API),
send input data, and receive immediate emissions estimates (see Calculating using the CFT)
pre-fill information for a product assessment (see Sending information to the CFT with the API )
Mentioned on this page:
Input formats (Data Schemas):
Crop Calculate
Water Calculate
Dairy Calculate
Reference Data tables (https://app.coolfarmtool.org/docs/reference-data/index.html )
Crop Calculate
type | object | |||||
properties | ||||||
| type | object | ||||
properties | ||||||
| Farm’s latitude (Farm settings → Lat/lon) | |||||
type | number | |||||
multipleOf | 0.001 | |||||
| Farm’s longitude (Farm settings → Lat/lon) | |||||
type | number | |||||
multipleOf | 0.001 | |||||
| Country name or ID (Farm Settings → Country) | |||||
type | integer / string | |||||
examples | Ghana | |||||
| Territory name or ID; send | |||||
type | integer / string / null | |||||
examples | Alabama | |||||
| Climate (Farm Settings → Climate) | |||||
type | integer / string | |||||
examples | Warm Temperate Dry | |||||
| type | object | ||||
properties | ||||||
| (Farm Settings → Average Annual Temperature Value) | |||||
type | number | |||||
| Temperature Unit name or ID (Farm Settings → Average Annual Temperature Unit) | |||||
type | string / number | |||||
examples | °C | |||||
type | object | |||||
| (Farm Settings → Farm Identifier) | |||||
type | string / number | |||||
| soil_characteristics (Farm Settings → Soil Characteristics) | |||||
type | integer / string | |||||
examples | Sandy Soils | |||||
1 | ||||||
| local_calculations (Farm Settings → Local Calculations) | |||||
type | boolean | |||||
examples | True | |||||
False | ||||||
| Local climate (Farm Settings → Local Climate) | |||||
type | string | |||||
examples | Wet | |||||
Dry | ||||||
type | object | |||||
| type | object | ||||
properties | ||||||
| type | object | ||||
properties | ||||||
| Fresh product yield (Crop → Gross Yield) | |||||
type | number | |||||
examples | 10 | |||||
minimum | 0 | |||||
| Weight, volume or unit Unit name or ID (Crop → Gross Yield Unit) | |||||
type | integer / string | |||||
examples | tonne | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| Fresh product yield (Crop → Net Yield) | |||||
type | number | |||||
examples | 10 | |||||
minimum | 0 | |||||
| Weight, volume or unit Unit name or ID (Crop → Net Yield Unit)* | |||||
type | integer / string | |||||
examples | tonne | |||||
type | object | |||||
| Crop type (Crop → Crop Name) | |||||
type | integer / string | |||||
examples | Barley | |||||
| Choose a relevant harvesting year (Crop → Harvesting year) | |||||
type | integer | |||||
minimum | 1980 | |||||
| type | object | ||||
properties | ||||||
| Growing area size (Crop → Crop Area) | |||||
Growing area size (Crop → Crop Area) | ||||||
examples | 1 | |||||
minimum | 0 | |||||
| Area Unit name or ID (Crop → Crop Area Unit) | |||||
type | integer / string | |||||
examples | ha | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| Soil texture (Soil → Soil Texture) | |||||
type | integer | |||||
examples | 1 | |||||
| Soil organic matter (Soil → Soil Organic Matter) | |||||
type | integer | |||||
examples | 2 | |||||
| Custom SOM (send | |||||
type | number / null | |||||
examples | 2 | |||||
minimum | 0 | |||||
| Custom Measured years ago (send | |||||
type | number / null | |||||
examples | 2 | |||||
minimum | 0 | |||||
| Soil drainage (Soil → Soil Drainage) | |||||
type | integer | |||||
examples | 1 | |||||
| Soil ph (Soil → Soil pH) | |||||
type | integer | |||||
examples | 4 | |||||
type | object | |||||
| Crop residue (send | |||||
type | object | |||||
properties | ||||||
| Amount of crop residue (send | |||||
type | number / string / null | |||||
examples | 2.5 | |||||
minimum | 0 | |||||
| Weight-per-area Unit (Crop → Residue Unit)* | |||||
type | number / string / null | |||||
examples | tonne / ha | |||||
| Residue management type (Crop → Residue Management) | |||||
type | integer / string / null | |||||
examples | 4 | |||||
Crop residue (send | ||||||
type | object | |||||
| Seed quantity (potato only, send | |||||
type | object | |||||
properties | ||||||
| type | number | ||||
examples | 10 | |||||
minimum | 0 | |||||
| Unit name or ID (Crop → Seed Amount Unit) | |||||
type | integer / string | |||||
Seed quantity (potato only, send | ||||||
type | object | |||||
| Irrigation Calculation Type (default or IPCC 2019) (Irrigation → Irrigation Calculation Type) | |||||
type | string / integer | |||||
examples | 1 | |||||
2 | ||||||
default_irrigation_type | ||||||
volume_irrigation_type | ||||||
type | object | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| Pesticide type (Inputs → Crop Protection → Type) | |||||
type | integer | |||||
examples | 1 | |||||
minimum | 0 | |||||
| Pesticide category (Inputs → Crop Protection → Category) | |||||
type | integer | |||||
examples | 3 | |||||
| % active ingredient (Inputs → Crop Protection → Active ingredient %) | |||||
type | number / null | |||||
examples | 100 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
default | 100 | |||||
| type | object | ||||
properties | ||||||
| Application rate (Inputs → Crop Protection → Application Rate) | |||||
type | number | |||||
examples | 1 | |||||
minimum | 0 | |||||
| Weight-per-area Unit name or ID (Inputs → Crop Protection → Application Rate) | |||||
type | integer / string | |||||
examples | kg / ha | |||||
type | object | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
Machinery fuel use estimates (custom fuel use not yet supported) | ||||||
type | object | |||||
properties | ||||||
| (Fuel & Energy → Field Operations → Number of Operations) | |||||
type | number | |||||
examples | 1 | |||||
minimum | 0 | |||||
| (Fuel & Energy → Field Operations → Number of Bales) | |||||
type | number | |||||
examples |