YOU ARE CURRENTLY USING THE STAGING ENVIRONMENT

What’s new in the CFT API

API v1 will be released in Q4 2019, bringing many improvements in consistency and functionality, particularly to the POST /crop_product/calculate end-point.

There are several backwards-incompatible changes in this version, which might cause apps designed for API - Version 0 (stable) to stop working. Please read this page carefully to see what changes you’ll need to make.

Warning

You should plan to migrate to this version of the API by December 2020 at the latest, when support for API - Version 0 (stable) will end.

Create crop and dairy products

A BETA feature added to allow a user to send a similar (almost identical) set of data to the API endpoint and create either a Crop or a Dairy Product. Changes made should not effect the usage of the calculate endpoints.

For further information, see; Saving assessments using the CFT

Fresh / finished product quantities

Previously, it wasn’t possible to specify separate finished and fresh product quantities in POST /crop_product/calculate, and yield_fresh_t was used as both:

"crop": {
   "yield_fresh_t": 10,
   ...
},

Now, both product_dry and product_fresh must be provided:

"crop": {
   "product_fresh": {
       "value": 1000,
       "unit": "tonne"
   },
   "product_finished": {
       "value": 990,
       "unit": "tonne"
   },
   ...
}

Updated data inputs

The data input format has been made much more consistent, including:

  • Units can now be specified (by name or ID) instead of requiring data be converted to specific units,

  • Most reference data objects (like crop types, fertiliser production databases etc.) can now be specified by name,

See the v1 “data schemas” page for a full description of the new format.

New input parameters

Storage

Used to calculate potato storage emissions.

Warning

This can only be used for potato assessments

"storage": [
   {
       "cipc_application": 1,
       "cipc_dose": 1,
       "storage_power_source": 106,
       "store_loading_power_source": 102,
       "unloading_power_source": 102,
       "stored_allocation": 100,
       "temperature": {
           "unit": "°C",
           "value": 5
       },
       "time": {
           "unit": 46,
           "value": 1
       }
   }
]

Processing

Used to calculate potato processing emissions.

Warning

This can only be used for potato assessments

"processing": [
    {
        "_type": 1,
        "allocation": 100,
        "power_source": 102
    }
]

Co-products

Used to calculate co-product emissions; will effectively reduce main product emissions by assigning part of them to co-products.

"co_products": [
    {
        "name": "test_co_product",
        "percentage_main_value": 50
    }
]

Farm latitude and longitude

latitude and longitude parameters have been added to the farm object – these are not yet used in GHG calculations, but are supported for consistency with the user interface.