Sending information to the CFT with the API

This topic guide explains how to send information to be saved in the Cool Farm Tool.

All URLs start with

POST /crop_product/create/

Create a crop product with the specified data inputs.


Use an HTML <form> element to send this data via a web browser; users will have to fill in additional information to finish creating a crop product

Form Parameters
  • float growing_area_size – size of growing area, in hectares

  • float product_dry_value – product dry weight, in tonnes

  • int crop_type – crop type ID, see GET /crop_type/

Example request

POST /crop_product/create/ HTTP/1.1
Accept: application/json
Content-Type: application/json
X-APP-Authorization: ...
X-API-Authorization: ...


Example response

HTTP/1.1 302 FOUND
Date: ...
Server: WSGIServer/0.1 Python/2.7.14
Vary: Cookie, Accept-Language
X-Frame-Options: SAMEORIGIN
Content-Type: text/html; charset=utf-8
Set-Cookie: csrftoken=...; ... sessionid=...; ...
Request Headers
Status Codes