.. _Data schemas: .. include:: /banner.rst Data schemas ------------ .. note:: All fields are required; some objects and lists can be empty – e.g. if you have no pesticide applications, send ``"pesticides": []`` rather than ``"pesticides": [{}]``, or skipping the ``pesticides`` key entirely. .. note:: Text in *(Italics)* identifies where in the CFT user interface to locate each field. The below documentation is automatically generated from `JSON schema `_ files: * :download:`crop_calculate <../../../../api/v1/schemas/crop_product-calculate-input.json>` * :download:`dairy_calculate <../../../../api/v1/schemas/dairy_product-calculate-input.json>` * :download:`water_calculate <../../../../api/v1/schemas/water_product-calculate-input.json>` If you're having a problem with an API call, you can use these schema files to validate the data that you're sending, e.g. .. code-block:: sh $ jsonschema api/v1/schemas/crop_product-calculate-input.json \ -i api/v1/samples/crop_product-calculate-input.json .. jsonschema:: ../../../../api/v1/schemas/crop_product-calculate-input.json .. code-block:: sh $ jsonschema api/v1/schemas/dairy_product-calculate-input.json \ -i api/v1/samples/dairy_product-calculate-input.json .. jsonschema:: ../../../../api/v1/schemas/dairy_product-calculate-input.json .. code-block:: sh $ jsonschema api/v1/schemas/water_product-calculate-input.json \ -i api/v1/samples/water_product-calculate-input.json .. jsonschema:: ../../../../api/v1/schemas/water_product-calculate-input.json