API - Version 1 (current)

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:

 

Mentioned on this page:

 

Crop Calculate

type

object

properties

  • farm

type

object

properties

  • latitude

Farm’s latitude (Farm settings → Lat/lon)

type

number

multipleOf

0.001

  • longitude

Farm’s longitude (Farm settings → Lat/lon)

type

number

multipleOf

0.001

  • country

Country name or ID (Farm Settings → Country)

type

integer / string

examples

Ghana

  • territory

Territory name or ID; send null if selected Country has no territories (Farm Settings → Territory)

type

integer / string / null

examples

Alabama

  • climate

Climate (Farm Settings → Climate)

type

integer / string

examples

Warm Temperate Dry

  • average_temperature

type

object

properties

  • value

(Farm Settings → Average Annual Temperature Value)

type

number

  • unit

Temperature Unit name or ID (Farm Settings → Average Annual Temperature Unit)

type

string / number

examples

°C

type

object

  • farm_identifier

(Farm Settings → Farm Identifier)

type

string / number

  • soil_characteristics

soil_characteristics (Farm Settings → Soil Characteristics)

type

integer / string

examples

Sandy Soils

1

  • local_calculations

local_calculations (Farm Settings → Local Calculations)

type

boolean

examples

True

False

  • local_climate

Local climate (Farm Settings → Local Climate)

type

string

examples

Wet

Dry

type

object

  • crop

type

object

properties

  • product_fresh

type

object

properties

  • value

Fresh product yield (Crop → Gross Yield)

type

number

examples

10

minimum

0

  • unit

Weight, volume or unit Unit name or ID (Crop → Gross Yield Unit)

type

integer / string

examples

tonne

type

object

  • product_finished

type

object

properties

  • value

Fresh product yield (Crop → Net Yield)

type

number

examples

10

minimum

0

  • unit

Weight, volume or unit Unit name or ID (Crop → Net Yield Unit)*

type

integer / string

examples

tonne

type

object

  • type

Crop type (Crop → Crop Name)

type

integer / string

examples

Barley

  • harvesting_year

Choose a relevant harvesting year (Crop → Harvesting year)

type

integer

minimum

1980

  • field_size

type

object

properties

  • value

Growing area size (Crop → Crop Area)

Growing area size (Crop → Crop Area)

examples

1

minimum

0

  • unit

Area Unit name or ID (Crop → Crop Area Unit)

type

integer / string

examples

ha

type

object

  • soil

type

object

properties

  • texture_id

Soil texture (Soil → Soil Texture)

type

integer

examples

1

  • organic_matter_id

Soil organic matter (Soil → Soil Organic Matter)

type

integer

examples

2

  • organic_matter_custom

Custom SOM (send organic_matter_id: 5) (Soil → Soil Organic Matter)

type

number / null

examples

2

minimum

0

  • custom_measured_years_ago

Custom Measured years ago (send custom_measured_years_ago: 5) (Soil → Measured years ago)

type

number / null

examples

2

minimum

0

  • drainage_id

Soil drainage (Soil → Soil Drainage)

type

integer

examples

1

  • ph_id

Soil ph (Soil → Soil pH)

type

integer

examples

4

type

object

  • residue

Crop residue (send {} if you have no residue at all)

type

object

properties

  • value

Amount of crop residue (send null to estimate) (Crop → Residue Amount)

type

number / string / null

examples

2.5

minimum

0

  • unit

Weight-per-area Unit (Crop → Residue Unit)*

type

number / string / null

examples

tonne / ha

  • management

Residue management type (Crop → Residue Management)

type

integer / string / null

examples

4

Crop residue (send {} if you have no residue at all)

type

object

  • seed_amount

Seed quantity (potato only, send {} otherwise) (Crop → Seed Amount)

type

object

properties

  • value

type

number

examples

10

minimum

0

  • unit

Unit name or ID (Crop → Seed Amount Unit)

type

integer / string

Seed quantity (potato only, send {} otherwise) (Crop → Seed Amount)

type

object

  • irrigation_calculation_type

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

  • pesticides

Send an empty list [] if you have no pesticides

type

array

items

  •  

type

object

properties

  • type_id

Pesticide type (Inputs → Crop Protection → Type)

type

integer

examples

1

minimum

0

  • category_id

Pesticide category (Inputs → Crop Protection → Category)

type

integer

examples

3

  • percentage_rate

% active ingredient (Inputs → Crop Protection → Active ingredient %)

type

number / null

examples

100

maximum

100

minimum

0

default

100

  • application_rate

type

object

properties

  • value

Application rate (Inputs → Crop Protection → Application Rate)

type

number

examples

1

minimum

0

  • unit

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 [] if you have no pesticides

type

array

  • machinery

Send an empty list [] if you have no machinery use

type

array

items

  •  

Machinery fuel use estimates (custom fuel use not yet supported)

type

object

properties

  • operations

(Fuel & Energy → Field Operations → Number of Operations)

type

number

examples

1

minimum

0

  • number_of_bales

(Fuel & Energy → Field Operations → Number of Bales)

type

number

examples