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 | 1 | |||||
minimum | 0 | |||||
| Machine (provide this or | |||||
type | integer / string | |||||
examples | 24 | |||||
| Direct energy type (Fuel & Energy → Field Operations → Fuel use) | |||||
type | integer / string | |||||
enum | 102, 103, 1220, 1221, diesel (average biofuel blend), petrol (average biofuel blend), diesel (100% mineral diesel), petrol (100% mineral petrol) | |||||
Machinery fuel use estimates (custom fuel use not yet supported) | ||||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| Irrigation method (Irrigation → Irrigation Events → Method) | |||||
type | integer | |||||
examples | 1 | |||||
| % of area irrigated (N/A) | |||||
type | number | |||||
examples | 100 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
default | 100 | |||||
| type | object | ||||
properties | ||||||
| (Irrigation → Irrigation Events → Pumping Depth Value) | |||||
type | number | |||||
examples | 2 | |||||
minimum | 0 | |||||
| Distance Unit name or ID (Irrigation → Irrigation Events → Pumping Depth Unit) | |||||
type | integer / string | |||||
examples | 1 | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| (Irrigation → Irrigation Events → Horizontal Distance Value) | |||||
type | number | |||||
examples | 200 | |||||
minimum | 0 | |||||
| Distance Unit name or ID (Irrigation → Irrigation Events → Horizontal Distance Unit) | |||||
type | integer / string | |||||
examples | km | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| (Irrigation → Irrigation Events → Water Added Value) | |||||
type | number | |||||
examples | 0.1 | |||||
minimum | 0 | |||||
| Length (depth) or volume Unit(Irrigation → Irrigation Events → Water Added Unit) | |||||
type | integer / string | |||||
examples | litre | |||||
type | object | |||||
| Irrigation power source (Irrigation → Irrigation Events → Power Source) | |||||
type | integer / string | |||||
examples | 1 | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| Fertiliser type name or ID (Inputs → Fertiliser → Fertiliser Type) | |||||
type | integer / string | |||||
examples | Compose your own NPK | |||||
| Fertiliser production database (Inputs → Fertiliser → Manufactured In). Note, no production emissions will be calculated for all digestates, slurries, manures and litter. However for these inputs a production type is required e.g. “World” for the API to be validated correctly. | |||||
type | integer / string | |||||
examples | Europe 2014 | |||||
| type | object | ||||
properties | ||||||
| Unit name or ID (Inputs → Fertiliser → Application Rate Value) | |||||
type | number | |||||
examples | 1 | |||||
minimum | 0 | |||||
| Unit name or ID (Inputs → Fertiliser → Application Rate Unit) | |||||
type | integer / string | |||||
type | object | |||||
| Date in ‘yyyy-mm-dd’ format or ‘unknown’ (Inputs → Fertiliser → Application Date) | |||||
type | string | |||||
examples | 2022-11-01 | |||||
unknown | ||||||
| Send this data only for ‘Compose your own N/P/K’ ( | |||||
type | object | |||||
properties | ||||||
| Total of ammonia, urea and nitric percentages (Inputs → Fertiliser → %N) | |||||
type | number | |||||
examples | 0 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
| (Inputs → Fertiliser → %N (as ammonium-N)) | |||||
type | number | |||||
examples | 0 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
| (Inputs → Fertiliser → %N (as nitrate-N) | |||||
type | number | |||||
examples | 0 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
| (Inputs → Fertiliser → %N (as Urea-N)) | |||||
type | number | |||||
examples | 0 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
| (Inputs → Fertiliser → %P2O5 or %P) | |||||
type | number | |||||
examples | 0 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
| Fertiliser nutrient (Inputs → Fertiliser → %P2O5 or %P) | |||||
type | number | |||||
enum | 4, 2 | |||||
examples | 2 | |||||
| (Inputs → Fertiliser → %K2O or %K) | |||||
type | number | |||||
examples | 0 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
| Fertiliser nutrient (Inputs → Fertiliser → %K2O or %K) | |||||
type | number | |||||
enum | 3, 5 | |||||
examples | 5 | |||||
Send this data only for ‘Compose your own N/P/K’ ( | ||||||
type | object | |||||
| A Fertiliser nutrient ingredient, ‘product’ will be used when sending ‘’ (empty string) (Inputs → Fertiliser → Fertiliser Weight or Unit) | |||||
type | string | |||||
examples | product | |||||
| Fertiliser method name or ID (Inputs → Fertiliser → Application Method) | |||||
type | integer / string | |||||
examples | 2 | |||||
| Fertiliser inhibition (Inputs → Fertiliser → Emissions Inhibitors) | |||||
type | integer | |||||
examples | 1 | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| type | object | ||||
properties | ||||||
| (Fuel & Energy → Direct Energy → Energy Used) | |||||
type | number | |||||
examples | 4 | |||||
minimum | 0 | |||||
| Unit name or ID (Fuel & Energy → Direct Energy → Energy Used Unit) | |||||
type | string / integer | |||||
type | object | |||||
| Energy category (Fuel & Energy → Direct Energy → Category) | |||||
type | integer / string | |||||
| Direct energy type (Fuel & Energy → Direct Energy → Source) | |||||
type | integer / string | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty object | |||||
type | object | |||||
properties | ||||||
| Changes in ‘soil organic carbon’ due to management practices | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| Year of change (Carbon → Carbon changes & sequestration -> Year of change) | |||||
type | number | |||||
examples | 2019 | |||||
minimum | 0 | |||||
| % of field changed (Carbon → Percentage of Field) | |||||
type | number | |||||
examples | 100 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
default | 100 | |||||
| ||||||
type | object | |||||
properties | ||||||
| type | integer / string | ||||
examples | 2 | |||||
native-forest | ||||||
| type | integer / string | ||||
examples | 2 | |||||
native-forest | ||||||
type | object | |||||
| ||||||
type | object | |||||
properties | ||||||
| type | integer / string | ||||
examples | 1 | |||||
full | ||||||
| type | integer / string | ||||
examples | 1 | |||||
full | ||||||
type | object | |||||
| ||||||
type | object | |||||
properties | ||||||
| type | integer / string | ||||
examples | 4 | |||||
medium-c-input | ||||||
| type | integer / string | ||||
examples | 4 | |||||
medium-c-input | ||||||
type | object | |||||
type | object | |||||
Changes in ‘soil organic carbon’ due to management practices | ||||||
type | array | |||||
| forest data (only provide if your change is to or from forest, otherwise | |||||
type | object | |||||
properties | ||||||
| Forest age, in years (Carbon → Forest Age) | |||||
type | number | |||||
examples | 2 | |||||
minimum | 0 | |||||
| Forest type (Carbon → Forest Type) | |||||
type | integer / string | |||||
examples | 3 | |||||
temperate continental forest | ||||||
forest data (only provide if your change is to or from forest, otherwise | ||||||
type | object | |||||
Send an empty object | ||||||
type | object | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| Transport type (Transport → Mode) | |||||
type | string / integer | |||||
examples | road LGV diesel (light goods vehicle <3.5t) | |||||
| type | object | ||||
properties | ||||||
| (Transport → Weight Value) | |||||
type | number | |||||
examples | 4 | |||||
minimum | 0 | |||||
| Unit name or ID (Transport → Weight Value) | |||||
type | string / number | |||||
examples | tonne | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| (Transport → Distance Value) | |||||
type | number | |||||
examples | 2000 | |||||
minimum | 0 | |||||
| Unit name or ID (Transport → Distance Value) | |||||
type | string / integer | |||||
examples | km | |||||
type | object | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| Tree type (Carbon → Out of Crop .. → Choose Tree Species) | |||||
type | integer / string | |||||
examples | 5 | |||||
| type | object | ||||
properties | ||||||
| Unit name or ID (Carbon → Out of Crop .. → Density Last Year Value) | |||||
type | number | |||||
examples | 100 | |||||
minimum | 0 | |||||
| Unit name or ID (Carbon → Out of Crop .. → Density Last Year Unit) | |||||
type | string / number | |||||
examples | trees / hectare | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| (Carbon → Out of Crop .. → Size Last Year Value) | |||||
type | number | |||||
examples | 2000 | |||||
minimum | 0 | |||||
| Unit name or ID (Carbon → Out of Crop .. → Size Last Year Unit) | |||||
type | string / integer | |||||
examples | cm | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| (Carbon → Out of Crop .. → Size This Year Value) | |||||
type | number | |||||
examples | 2000 | |||||
minimum | 0 | |||||
| Unit name or ID (Carbon → Out of Crop .. → Size This Year Unit) | |||||
type | string / integer | |||||
examples | cm | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| (Carbon → Out of Crop .. → Trees Planted / Lost Value) | |||||
type | number | |||||
examples | 2000 | |||||
-3 | ||||||
| Unit name or ID (Carbon → Out of Crop .. → Trees Planted / Lost Unit) | |||||
type | string / number | |||||
examples | trees / hectare | |||||
type | object | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| string name (Product → CoProduct → name) | |||||
type | string | |||||
examples | test_co_product | |||||
| int or float value (Product → CoProduct → percentage main value) | |||||
type | number | |||||
examples | 50 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| Processing type name or ID (Processing → Type) | |||||
type | integer / string | |||||
examples | 1 | |||||
washing | ||||||
| int or float (Processing → Allocation .. → Number) | |||||
type | number | |||||
examples | 100 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
| Factor name or ID (Processing → Power Source .. → Selection of relevant power sources) | |||||
type | string / integer | |||||
examples | 102 | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| Send an empty list | |||||
type | array | |||||
items | ||||||
type | object | |||||
properties | ||||||
| type | number | ||||
examples | 1 | |||||
minimum | 0 | |||||
| type | number | ||||
examples | 1 | |||||
minimum | 0 | |||||
| Factor name or ID (Storage → Power Source .. → Selection of relevant power sources) | |||||
type | integer / string | |||||
examples | 106 | |||||
| Factor name or ID (Storage → Power Source .. → Selection of relevant power sources) | |||||
type | integer / string | |||||
examples | 102 | |||||
| Factor name or ID (Storage → Power Source .. → Selection of relevant power sources) | |||||
type | integer / string | |||||
examples | 102 | |||||
| int or float (Storage → Stored Allocation .. → Number) | |||||
type | number | |||||
examples | 100 | |||||
maximum | 100 | |||||
minimum | 0 | |||||
| type | object | ||||
properties | ||||||
| Unit name or ID (Temperature) | |||||
type | integer / string | |||||
examples | °C | |||||
| type | number | ||||
examples | 5 | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| Unit name or ID (Storage time unit of measurement) | |||||
type | string / number | |||||
examples | second | |||||
| type | number | ||||
examples | 1 | |||||
type | object | |||||
type | object | |||||
Send an empty list | ||||||
type | array | |||||
| type | object | ||||
properties | ||||||
| type | object | ||||
properties | ||||||
| (Waste water → Waste water volume) | |||||
type | number | |||||
examples | 12 | |||||
minimum | 0 | |||||
| Unit name or ID (Waste water → Waste water volume) | |||||
type | string / number | |||||
examples | litres | |||||
type | object | |||||
| type | object | ||||
properties | ||||||
| (Waste water → Oxygen demand) | |||||
type | number | |||||
examples | 4 | |||||
minimum | 0 | |||||
| Unit name or ID (Waste water → Oxygen demand) | |||||
type | string / number | |||||
examples | kg / litre | |||||
type | object | |||||
| Unit name or ID (Waste water → Oxygen demand type) | |||||
type | string / number | |||||
examples | 1 | |||||
| Unit name or ID (Waste water → Water treatment type) | |||||
type | string / number | |||||
examples | 1 | |||||
type | object | |||||
| Flooding (Rice only, send an empty object {} if the rice field is not flooded) | |||||
type | object | |||||
properties | ||||||
| type | object | ||||
properties | ||||||
| (Inputs → Flooding → Time under cultivation) | |||||
type | number | |||||
examples | 1 | |||||
minimum | 0 | |||||
| (Inputs → Flooding → Time under cultivation) | |||||
type | string / number | |||||
examples | wk | |||||
type | object | |||||
| (Inputs → Water management → Before cultivation) | |||||
type | integer / string | |||||
examples | Flooded pre-season | |||||
| (Inputs → Water management → During cultivation) | |||||
type | integer / string | |||||
examples | Continuously flooded | |||||
Flooding (Rice only, send an empty object {} if the rice field is not flooded) | ||||||
type | object | |||||
| Crop green manure management, (Rice only, send an empty object {} if you do not use green manure) | |||||
type | object | |||||
properties | ||||||
| type | object | ||||
properties | ||||||
| (Inputs → Crop green manure management → Green manure amount (Dry Matter)) | |||||
type | number | |||||
examples | 1 | |||||
minimum | 1 | |||||
| (Inputs → Crop green manure management → Green manure amount (Dry Matter)) | |||||
type | string / number | |||||
examples | tonne / ha | |||||
type | object | |||||
Crop green manure management, (Rice only, send an empty object {} if you do not use green manure) | ||||||
type | object | |||||
type | object | |||||
definitions |
$ jsonschema api/v1/schemas/dairy_product-calculate-input.json \
-i api/v1/samples/dairy_product-calculate-input.json
Dairy 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 | |||||||
| soil_characteristics (Farm Settings → Soil Characteristics) | |||||||
type | integer / string | |||||||
examples | Sandy Soils | |||||||
1 | ||||||||
| (Farm Settings → Farm Identifier) | |||||||
type | string / number | |||||||
type | object | |||||||
| type | object | ||||||
properties | ||||||||
| type | object | ||||||
properties | ||||||||
| (Grazing → Grassland Fertilisation → Grassland Area Value) | |||||||
type | number | |||||||
examples | 12 | |||||||
| (Grazing → Grassland Fertilisation → Grassland Area Unit) | |||||||
type | string / integer | |||||||
examples | ha | |||||||
type | object | |||||||
| (Feed) | |||||||
type | string / integer | |||||||
examples | average | |||||||
| (Fertilisation Approach) | |||||||
type | string / integer / null | |||||||
examples | 1 | |||||||
2 | ||||||||
type | object | |||||||
| Basic information about your herd’s milk production. | |||||||
type | object | |||||||
properties | ||||||||
| Main breed. Note that if you have more than one breed you will need to select the most representative breed and adjust the default live weights to reflect your herd averages. | |||||||
type | string | |||||||
examples | Brown Swiss | |||||||
| Choose a relevant start year for your 12 month reference period (the end year will be set automatically). | |||||||
type | integer | |||||||
examples | 2015 | |||||||
| Choose the relevant start time for your start month (the end time will be set automatically). | |||||||
type | string | |||||||
examples | start | |||||||
middle | ||||||||
end | ||||||||
| Choose a relevant start month for your 12 month reference period (the end month will be set automatically). | |||||||
type | integer | |||||||
examples | 1 | |||||||
2 | ||||||||
12 | ||||||||
| Name of your assessment. | |||||||
type | string | |||||||
examples | test_api | |||||||
| type | object | ||||||
properties | ||||||||
| type | number | ||||||
examples | 10 | |||||||
minimum | 0 | |||||||
| type | integer / string | ||||||
examples | tonne | |||||||
type | object | |||||||
| type | number | ||||||
examples | 3.9 | |||||||
| type | number | ||||||
examples | 3.8 | |||||||
| True Protein Content or Crude Protein Content | |||||||
type | integer | |||||||
examples | 1 | |||||||
2 | ||||||||
Basic information about your herd’s milk production. | ||||||||
type | object | |||||||
| Send an empty list | |||||||
type | array | |||||||
items | ||||||||
type | object | |||||||
properties | ||||||||
| phase name (Inputs → Herd → Category) | |||||||
type | string / integer | |||||||
examples | Dairy calves | |||||||
default |
| |||||||
| animals count (Inputs → Herd → On-farm animals → Number) | |||||||
type | integer | |||||||
examples | 33 | |||||||
default | 0 | |||||||
| live_weight (Inputs → Herd → On-farm animals → Live Weight) | |||||||
type | object | |||||||
properties | ||||||||
| type | number | ||||||
examples | 152 | |||||||
152.3 | ||||||||
| type | string / integer | ||||||
examples | kg | |||||||
live_weight (Inputs → Herd → On-farm animals → Live Weight) | ||||||||
type | object | |||||||
| sold_animals count (Inputs → Herd → Sold animals → Number) | |||||||
type | integer | |||||||
examples | 0 | |||||||
default | 0 | |||||||
| sold_weight (Inputs → Herd → Sold animals → Live Weight) | |||||||
type | object | |||||||
properties | ||||||||
| type | number | ||||||
examples | 220 | |||||||
220.3 | ||||||||
| type | string / integer | ||||||
examples | kg | |||||||
sold_weight (Inputs → Herd → Sold animals → Live Weight) | ||||||||
type | object | |||||||
| purchased_animals count (Inputs → Herd → Purchased animals → Number) | |||||||
type | integer | |||||||
examples | 0 | |||||||
| type | object | ||||||
properties | ||||||||
| purchased_weight_value count (Inputs → Herd → Purchased animals → Live Weight) | |||||||
type | number | |||||||
examples | 220 | |||||||
220.3 | ||||||||
| Unit unit (Inputs → Herd → Live weight unit) | |||||||
type | string / integer | |||||||
examples | kg | |||||||
type | object | |||||||
type | object | |||||||
Send an empty list | ||||||||
type | array | |||||||
| Send an empty list | |||||||
type | array | |||||||
items | ||||||||
anyOf | type | object | ||||||
properties | ||||||||
| herd_section name (Inputs → Grazing → Category) | |||||||
type | string / integer | |||||||
examples | Dairy calves | |||||||
| days number (Inputs → Grazing → Days) | |||||||
type | integer | |||||||
examples | 208 | |||||||
| hours number (Inputs → Grazing → Hours/day) | |||||||
type | integer | |||||||
examples | 12 | |||||||
| category ID (Inputs → Grazing → Grazing type) | |||||||
type | integer | |||||||
examples | 2 | |||||||
| quality ID (Inputs → Grazing → Grazing quality) | |||||||
type | integer | |||||||
examples | 1 | |||||||
type | object | |||||||
Send an empty list | ||||||||
type | array | |||||||
| Send an empty list | |||||||
type | array | |||||||
items | ||||||||
type | object | |||||||
properties | ||||||||
| Fertiliser type name or ID (Inputs → Fertiliser → Fertiliser Type) | |||||||
type | integer / string | |||||||
examples | Compose your own NPK | |||||||
| Fertiliser production database (Inputs → Fertiliser → Manufactured In). Note, no production emissions will be calculated for all digestates, slurries, manures and litter. However for these inputs a production type is required e.g. “World” for the API to be validated correctly. | |||||||
type | integer / string | |||||||
examples | Europe 2014 | |||||||
| type | object | ||||||
properties | ||||||||
| Unit name or ID (Inputs → Fertiliser → Application Rate Value) | |||||||
type | number | |||||||
examples | 1 | |||||||
minimum | 0 | |||||||
| Unit name or ID (Inputs → Fertiliser → Application Rate Unit) | |||||||
type | integer / string | |||||||
type | object | |||||||
| Date in ‘yyyy-mm-dd’ format or ‘unknown’ (Inputs → Fertiliser → Application Date) | |||||||
type | string | |||||||
examples | 2022-11-01 | |||||||
unknown | ||||||||
| Send this data only for ‘Compose your own N/P/K’ ( | |||||||
type | object | |||||||
properties | ||||||||
| Total of ammonia, urea and nitric percentages (Inputs → Fertiliser → %N) | |||||||
type | number | |||||||
examples | 0 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
| (Inputs → Fertiliser → %N (as ammonium-N)) | |||||||
type | number | |||||||
examples | 0 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
| (Inputs → Fertiliser → %N (as nitrate-N) | |||||||
type | number | |||||||
examples | 0 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
| (Inputs → Fertiliser → %N (as Urea-N)) | |||||||
type | number | |||||||
examples | 0 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
| (Inputs → Fertiliser → %P2O5 or %P) | |||||||
type | number | |||||||
examples | 0 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
| Fertiliser nutrient (Inputs → Fertiliser → %P2O5 or %P) | |||||||
type | number | |||||||
enum | 4, 2 | |||||||
examples | 2 | |||||||
| (Inputs → Fertiliser → %K2O or %K) | |||||||
type | number | |||||||
examples | 0 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
| Fertiliser nutrient (Inputs → Fertiliser → %K2O or %K) | |||||||
type | number | |||||||
enum | 3, 5 | |||||||
examples | 5 | |||||||
Send this data only for ‘Compose your own N/P/K’ ( | ||||||||
type | object | |||||||
| A Fertiliser nutrient ingredient, or ‘’ / ‘product’ (Inputs → Fertiliser → Fertiliser Weight or Unit) | |||||||
type | string | |||||||
examples | product | |||||||
| Fertiliser inhibition (Grazing → Grassland Fertilisation → Emissions Inhibitors) | |||||||
type | integer / string | |||||||
examples | 1 | |||||||
2 | ||||||||
Nitrification inhibitor | ||||||||
type | object | |||||||
Send an empty list | ||||||||
type | array | |||||||
| Send an empty list | |||||||
type | array | |||||||
items | ||||||||
anyOf | type | object | ||||||
properties | ||||||||
| Feed components item name (Inputs → Feed → Feed component) | |||||||
type | integer / string | |||||||
examples | Straw | |||||||
| Feed item region name or ID (Inputs → Feed → Region) | |||||||
type | integer / string | |||||||
examples | Global (world) | |||||||
22 | ||||||||
| percentage name (Inputs → Feed → Percentage) | |||||||
type | integer | |||||||
examples | 50 | |||||||
| Deforestation-free (no land-use change for 20 years) (Inputs → Feed → Certified). | |||||||
type | boolean | |||||||
examples | True | |||||||
False | ||||||||
type | object | |||||||
type | object | |||||||
properties | ||||||||
| type | object | ||||||
properties | ||||||||
| Crop type (Crop → Crop Name) | |||||||
type | integer / string | |||||||
examples | Barley | |||||||
| type | object | ||||||
properties | ||||||||
| Net product yield (Crop → Net Yield) | |||||||
type | number | |||||||
examples | 10 | |||||||
minimum | 0 | |||||||
| Weight Unit name or ID (Crop → Net Yield Unit)* | |||||||
type | integer / string | |||||||
examples | tonne | |||||||
type | object | |||||||
| Feed components item type | |||||||
type | integer / string | |||||||
examples | Barley | |||||||
| type | object | ||||||
properties | ||||||||
| Emissions total calulated from crop_product/calculate endpoint | |||||||
type | number | |||||||
examples | 10 | |||||||
| Emissions in kg CO2e Unit name or ID | |||||||
type | integer / string | |||||||
examples | kg CO2e | |||||||
type | object | |||||||
type | object | |||||||
| percentage name (Inputs → Feed → Percentage) | |||||||
type | integer | |||||||
examples | 50 | |||||||
| Deforestation-free (no land-use change for 20 years) (Inputs → Feed → Certified) | |||||||
type | boolean | |||||||
examples | True | |||||||
False | ||||||||
type | object | |||||||
type | object | |||||||
properties | ||||||||
| Feed components item name or ID (Inputs → Feed → Feed component) | |||||||
type | integer / string | |||||||
examples | Straw | |||||||
| Feed item region name or ID (Inputs → Feed → Region) | |||||||
type | integer / string | |||||||
examples | Global (world) | |||||||
22 | ||||||||
| Herd section name (Inputs → Feed → Animal category) | |||||||
type | integer / string | |||||||
examples | Dairy calves | |||||||
| type | object | ||||||
properties | ||||||||
| (Feed → Dry Matter Value) | |||||||
type | number | |||||||
examples | 4 | |||||||
minimum | 0 | |||||||
| Unit name or ID (Feed → Dry Matter Value) | |||||||
type | string / number | |||||||
examples | tonne | |||||||
type | object | |||||||
| Deforestation-free (no land-use change for 20 years) (Inputs → Feed → Certified) | |||||||
type | boolean | |||||||
examples | True | |||||||
False | ||||||||
type | object | |||||||
type | object | |||||||
properties | ||||||||
| type | object | ||||||
properties | ||||||||
| Crop type (Crop → Crop Name) | |||||||
type | integer / string | |||||||
examples | Barley | |||||||
| type | object | ||||||
properties | ||||||||
| Net product yield (Crop → Net Yield) | |||||||
type | number | |||||||
examples | 10 | |||||||
minimum | 0 | |||||||
| Weight Unit name or ID (Crop → Net Yield Unit)* | |||||||
type | integer / string | |||||||
examples | tonne | |||||||
type | object | |||||||
| Feed components item type | |||||||
type | integer / string | |||||||
examples | Barley | |||||||
| type | object | ||||||
properties | ||||||||
| Emissions total calulated from crop_product/calculate endpoint | |||||||
type | number | |||||||
examples | 10 | |||||||
minimum | 0 | |||||||
| Emissions in kg CO2e Unit name or ID | |||||||
type | integer / string | |||||||
examples | kg CO2e | |||||||
type | object | |||||||
type | object | |||||||
| Herd section name (Inputs → Feed → Animal category) | |||||||
type | integer / string | |||||||
examples | Dairy calves | |||||||
| type | object | ||||||
properties | ||||||||
| (Feed → Dry Matter Value) | |||||||
type | number | |||||||
examples | 4 | |||||||
minimum | 0 | |||||||
| Unit name or ID (Feed → Dry Matter Value) | |||||||
type | string / number | |||||||
examples | tonne | |||||||
type | object | |||||||
| Deforestation-free (no land-use change for 20 years) (Inputs → Feed → Certified) | |||||||
type | boolean | |||||||
examples | True | |||||||
False | ||||||||
type | object | |||||||
Send an empty list | ||||||||
type | array | |||||||
| Send an empty list | |||||||
type | array | |||||||
items | ||||||||
anyOf | type | object | ||||||
properties | ||||||||
| herd_section name (Inputs → Feed additives → Animal category) | |||||||
type | integer / string | |||||||
examples | Dairy calves | |||||||
| type name (Inputs → Feed additives → Type) | |||||||
type | integer / string | |||||||
examples | Nitrate | |||||||
| dose value (Inputs → Feed additives → Dose) | |||||||
type | number | |||||||
examples | 80 | |||||||
| dose_unit value (Inputs → Feed additives → Dose unit) | |||||||
type | string | |||||||
examples | g / kg | |||||||
| days value (Inputs → Feed additives → Days) | |||||||
type | integer | |||||||
examples | 10 | |||||||
| herd_section_percentage value (Inputs → Feed additives → Herd section percentage) | |||||||
type | number | |||||||
examples | 70 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
type | object | |||||||
type | object | |||||||
properties | ||||||||
| herd_section name (Inputs → Feed additives → Animal category) | |||||||
type | integer / string | |||||||
examples | Dairy calves | |||||||
| type name (Inputs → Feed additives → Type) | |||||||
type | integer / string | |||||||
examples | 3NOP | |||||||
| dose value (Inputs → Feed additives → Dose) | |||||||
type | number | |||||||
examples | 80 | |||||||
| ndf value (Inputs → Feed additives → NDF) | |||||||
type | number | |||||||
examples | 10 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
| crude_fat value (Inputs → Feed additives → Crude fat) | |||||||
type | number | |||||||
examples | 10 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
| dose_unit value (Inputs → Feed additives → Dose unit) | |||||||
type | string | |||||||
examples | g / kg | |||||||
| days value (Inputs → Feed additives → Days) | |||||||
type | integer | |||||||
examples | 10 | |||||||
| herd_section_percentage value (Inputs → Feed additives → Herd section percentage) | |||||||
type | number | |||||||
examples | 70 | |||||||
maximum | 100 | |||||||
minimum | 0 | |||||||
type | object | |||||||
Send an empty list | ||||||||
type | array | |||||||
| Send an empty list | |||||||
type | array | |||||||
items | ||||||||
anyOf | type | object | ||||||
properties | ||||||||
| herd_section name (Inputs → Manure → Animal category) | |||||||
type | integer / string | |||||||
examples | Dairy calves | |||||||
| type name (Inputs → Manure → Type) | |||||||
type | integer / string | |||||||
examples | Deep bedding - no mixing | |||||||
| allocation value (Inputs → Manure → Percentage) | |||||||
type | integer | |||||||
examples | 70 | |||||||
type | object | |||||||
Send an empty list | ||||||||
type | array | |||||||
| Send an empty list | |||||||
type | array | |||||||
items | ||||||||
type | object | |||||||
properties | ||||||||
| type | object | ||||||
properties | ||||||||
| (Fuel & Energy → Direct Energy → Energy Used) | |||||||
type | number | |||||||
examples | 4 | |||||||
minimum | 0 | |||||||
| Unit name or ID (Fuel & Energy → Direct Energy → Energy Used Unit) | |||||||
type | string / integer | |||||||
type | object | |||||||
| Energy category (Fuel & Energy → Direct Energy → Category) | |||||||
type | integer / string | |||||||
| Direct energy type (Fuel & Energy → Direct Energy → Source) | |||||||
type | integer / string | |||||||
type | object | |||||||
Send an empty list | ||||||||
type | array | |||||||
| Send an empty list | |||||||
type | array | |||||||
items | ||||||||
type | object | |||||||
properties | ||||||||
| Transport type (Transport → Mode) | |||||||
type | string / integer | |||||||
examples | road LGV diesel (light goods vehicle <3.5t) | |||||||
| type | object | ||||||
properties | ||||||||
| (Transport → Weight Value) | |||||||
type | number | |||||||
examples | 4 | |||||||
minimum | 0 | |||||||
| Unit name or ID (Transport → Weight Value) | |||||||
type | string / number | |||||||
examples | tonne | |||||||
type | object | |||||||
| type | object | ||||||
properties | ||||||||
| (Transport → Distance Value) | |||||||
type | number | |||||||
examples | 2000 | |||||||
minimum | 0 | |||||||
| Unit name or ID (Transport → Distance Value) | |||||||
type | string / integer | |||||||
examples | km | |||||||
type | object | |||||||
type | object | |||||||
Send an empty list | ||||||||
type | array | |||||||
type | object |
$ jsonschema api/v1/schemas/water_product-calculate-input.json \
-i api/v1/samples/water_product-calculate-input.json
Water Calculate:
type | object | |||||||
properties | ||||||||
| type | object | ||||||
properties | ||||||||
| Farm’s latitude (Farm settings → Lat/lon) | |||||||
type | number | |||||||
| Farm’s longitude (Farm settings → Lat/lon) | |||||||
type | number | |||||||
| 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 / integer | |||||||
examples | °C | |||||||
type | object | |||||||
| soil_characteristics (Farm Settings → Soil Characteristics) | |||||||
type | integer / string | |||||||
examples | Sandy Soils | |||||||
1 | ||||||||
| (Farm Settings → Farm Identifier) | |||||||
type | string / number | |||||||
type | object | |||||||
| type | object | ||||||
properties | ||||||||
| Crop type (Crop → Crop Name) | |||||||
type | integer / string | |||||||
examples | Barley | |||||||
| type | object | ||||||
properties | ||||||||
| Growing area size value (Crop → Crop Area) | |||||||
type | number | |||||||
examples | 100.35 | |||||||
minimum | 0 | |||||||
| Growing area Unit name or ID (Crop → Crop Area Unit) | |||||||
type | integer / string | |||||||
examples | ha | |||||||
type | object | |||||||
| type | object | ||||||
properties | ||||||||
| Fresh product yield (Crop → Harvested amount (total)) | |||||||
type | number | |||||||
examples | 10 | |||||||
minimum | 0 | |||||||
| Weight, volume or unit Unit name or ID (Crop → Harvested amount(total) Unit) | |||||||
type | integer / string | |||||||
examples | tonne | |||||||
type | object | |||||||
| type | object | ||||||
properties | ||||||||
| Fresh product yield (Crop → Farm-gate ready amount) | |||||||
type | number | |||||||
examples | 10 | |||||||
minimum | 0 | |||||||
| Weight, volume or unit Unit name or ID (Crop → Farm/gate ready amount Unit) | |||||||
type | integer / string | |||||||
examples | tonne | |||||||
type | object | |||||||
| Choose a relevant reporting year (Crop → Reporting year) | |||||||
type | integer | |||||||
minimum | 1988 | |||||||
| Choose a relevant harvest date (Crop → Harvest date) | |||||||
type | object | |||||||
properties | ||||||||
| Choose the relevant start Month periods name or ID for the harvest date | |||||||
type | string | |||||||
examples | start | |||||||
middle | ||||||||
end | ||||||||
| Choose a relevant month for your harvest date | |||||||
type | integer | |||||||
examples | 1 | |||||||
4 | ||||||||
12 | ||||||||
maximum | 12 | |||||||
minimum | 1 | |||||||
Choose a relevant harvest date (Crop → Harvest date) | ||||||||
type | object | |||||||
| Choose a relevant planting date (Crop → Planting/sowing date) | |||||||
type | object | |||||||
properties | ||||||||
| Choose the relevant start Month periods name or ID for the planting date | |||||||
type | string | |||||||
examples | start | |||||||
middle | ||||||||
end | ||||||||
| Choose a relevant month for your planting date | |||||||
type | integer | |||||||
examples | 1 | |||||||
4 | ||||||||
12 | ||||||||
maximum | 12 | |||||||
minimum | 1 | |||||||
| Choose a relevant year for your planting date | |||||||
type | integer | |||||||
examples | 2015 | |||||||
Choose a relevant planting date (Crop → Planting/sowing date) | ||||||||
type | object | |||||||
| Name of your water assessment | |||||||
type | string / number | |||||||
examples | test_water_API | |||||||
| type | object | ||||||
properties | ||||||||
| Fill in the name of the growing area | |||||||
type | number / string | |||||||
examples | Home parcel | |||||||
| Soil type name or ID (Soil → Soil type) | |||||||
type | integer / string | |||||||
examples | Barley | |||||||
| Soil moisture at sowing (Soil → Soil moisture at sowing) | |||||||
type | string / integer | |||||||
examples | dry | |||||||
1 | ||||||||
type | object | |||||||
type | object | |||||||
| Add irrigation information to your water assessments | |||||||
type | object | |||||||
properties | ||||||||
| Choose a relevant irrigation start date (Irrigation → Irrigation start) | |||||||
type | object | |||||||
properties | ||||||||
| Choose the relevant start Month periods name or ID for the irrigation start date | |||||||
type | string / integer | |||||||
examples | start | |||||||
middle | ||||||||
end | ||||||||
| Choose a relevant month for your irrigation start date | |||||||
type | integer | |||||||
examples | 1 | |||||||
4 | ||||||||
12 | ||||||||
maximum | 12 | |||||||
minimum | 1 | |||||||
| Choose a relevant year for your irrigation start date | |||||||
type | integer | |||||||
examples | 2015 | |||||||
Choose a relevant irrigation start date (Irrigation → Irrigation start) | ||||||||
type | object | |||||||
| Choose a relevant irrigation end date (Irrigation → Irrigation end) | |||||||
type | object | |||||||
properties | ||||||||
| Choose the relevant start Month periods name or ID for the irrigation end date | |||||||
type | string / integer | |||||||
examples | start | |||||||
middle | ||||||||
end | ||||||||
| Choose a relevant month for your irrigation end date | |||||||
type | integer | |||||||
examples | 1 | |||||||
4 | ||||||||
12 | ||||||||
maximum | 12 | |||||||
minimum | 1 | |||||||
| Choose a relevant year for your irrigation end date | |||||||
type | integer | |||||||
examples | 2015 | |||||||
Choose a relevant irrigation end date (Irrigation → Irrigation end) | ||||||||
type | object | |||||||
| Irrigation method name or ID (Irrigation → Method) | |||||||
type | integer / string | |||||||
| Irrigation water source name or ID (Irrigation → Water source) | |||||||
type | string / integer | |||||||
examples | 1 | |||||||
on_farm | ||||||||
| Send empty [] if no irrigation events | |||||||
type | array | |||||||
items | ||||||||
anyOf | type | object | ||||||
properties | ||||||||
| type | object | ||||||
properties | ||||||||
| Total water added per irrigation event (Irrigation → Total water added) | |||||||
type | number | |||||||
examples | 13600 | |||||||
minimum | 0 | |||||||
| Water added Unitname or ID (Irrigation → Total water added Unit) | |||||||
type | integer/ string | |||||||
examples | litre | |||||||
type | object | |||||||
| Irrigation water source name or ID (Irrigation events → If ‘has_source_pump’ is false set a custom water source for each irrigation events item) | |||||||
type | string / integer | |||||||
examples | 1 | |||||||
on_farm | ||||||||
| Percentage of area irrigated (Irrigation → Area irrigated) | |||||||
type | number | |||||||
examples | 100 | |||||||
65.5 | ||||||||
| Use source and pump defaults | |||||||
type | boolean | |||||||
type | object | |||||||
Send empty [] if no irrigation events | ||||||||
type | array | |||||||
Add irrigation information to your water assessments | ||||||||
type | object | |||||||
type | object |