Cool Farm Tool

Endpoint

data format reponse

Comment

Links

GET / farm endpoint (deprecated)

json

only for single-farm users

 

GET / farms

json

allows to retrieve information about multiple farms -> future standart endpoint
Without a specified slug : return a list of all farms

 

GET / farms / (str: slug)

json

Same as above, but for the farm associated to the specified slug

 

GET / farms /assessments / (str: slug)

json

Results for crops and livestocks of the specified farm

 

GET / product / (str: slug)

json

All information and results about the specified product - for instance 'Rice'

 

GET / energy

json

Retrieve all the energy sources that are available with units

 

GET / fertilizer

json

Retrieve all the fertilizers that are available

 

GET / unit

json

Retrieve a list of all units

 

GET / crop_type

json

Retrieve a list of all crop types.

 

POST / user / key

json

Fetch the API key for the given user

 

GET / account / register

json

For creating a CFT account from the LiteFarm application?

Required parameters:

  • username: str

  • email: str

  • callback: str (URL to send API key of new user after activation)

  • app_id: str (numeric ID of the application, required for callback)

  • hash: str (SHA256 hash of app key concatenated with callback, required for callback)

 

 

 

 

 

https://app.coolfarmtool.org/docs/api/v1/calculating.html

 

 

 

 

 

 

 

 

 

 

 

Authentification type

 

 

 

Application-level API key

Have to make a request to the Cool Farm Alliance :
info@coolfarmtool.org

Then include the key in requests as an header :
"X-API-APP-Authorization : ****************"

https://app.coolfarmtool.org/docs/api/v1/authentication.html

User level API key

Specific API key for each user of Cool Farm
Can be retrieved in the "help" page from the user's account
Better for application such as Litefarm : Can be retrieve by running the endpoint POST / user /key

Include the key in requests as an header :
"X-API-Authorization : *****************"

https://app.coolfarmtool.org/docs/api/v1/authentication.html