Version 5 Fieldprint API Input Logic Guide
Companion to the API Input Reference — documents the major if/then branching patterns an API partner needs to understand when constructing payloads for the /calculator endpoint.
- How to Read This Guide
- 1. Activity Selection — What Triggers Each Input Section
- 2. Land-Use Change Decision Tree
- 3. Cover Crop Logic
- 4. Harvest & Crop Drying
- 5. Crop-Specific Inputs
- 6. Irrigation Sub-Logic
- 7. Commercial Fertilizer Category Branching
- 8. Nutrient Management Defaults
- 9. Soil Test & Phosphorus Drawdown
- 10. Field Details — Tile Drainage & Conservation Practices
- Quick Reference Table
How to Read This Guide
Each section below documents a decision branch — a point in the payload where the value of one field determines which other fields are required, optional, or omitted. The format is:
Field names link back to the API Input Reference for full details (type, path, validation, reference data links).
1. Activity Selection — What Triggers Each Input Section
Each crop interval includes an activities array. The type value of each activity object determines which set of inputs is expected. If an activity type is not included in the array, its inputs should be omitted entirely.
| Activity Type | Triggers Inputs In | Common Fields |
|---|---|---|
tillage |
Tillage section | date, tillage_practice_id, diesel_amount |
residue_management |
Residue Management section | date, residue_operation_id, diesel_amount, burn_acres |
planting_cover |
Planting — Cover Crop section | date, cover_crop_id, dominant_species_type_id, and more (see §3) |
planting_cash |
Planting — Cash Crop section | date, operation_id, seeding_rate, seed_treated |
irrigation |
Irrigation section | water_source_id, irrigation_volume, and conditional energy fields (see §6) |
crop_protectant_spraying |
Crop Protectant / Spraying section | date, application_id, diesel_amount, plus product amount fields |
nutrient_commercial |
Nutrient — Commercial Fertilizer section | date, application_id, product_type_id, and branching logic (see §7) |
nutrient_manure |
Nutrient — Manure section | date, application_id, manure_type_id, product_amount, manure_source_id |
nutrient_other |
Nutrient — Other Organic Amendment section | date, application_id, amendment_type_id, product_amount |
harvest |
Harvest section | date, operation_id, yield, and conditional drying/crop-specific fields (see §4, §5) |
Every activity object also requires a date field, and all activity types except irrigation include a diesel_amount field (which defaults to a CR-LMOD lookup value if omitted).
2. Land-Use Change Decision Tree
Path: field.field_detail_inputs.landuse_change
truefalse3. Cover Crop Logic
Path: crop_intervals[].activities(type:planting_cover)[].inputs
planting_cover activity is in the activities arrayis_legume = "Ask" in reference dataCheck the CoverCrops reference data to see which species have is_legume = "Ask".
4. Harvest & Crop Drying
Path: crop_intervals[].activities(type:harvest)[].inputs
truefalse: omit drying sub-fields5. Crop-Specific Inputs
A handful of inputs are only required when analyzing a specific crop. These are tagged with Crop badges in the API Input Reference.
| Crop(s) | Field | Section | Condition |
|---|---|---|---|
| Legumes Alfalfa, Chickpeas, Dry Beans, Dry Peas, Fava Beans, Peanuts, Lentils, Lupin, Soybeans |
inoculant_applied | Planting — Cash Crop | Required if the crop is any legume species |
| Alfalfa | alfalfa_avg_harvest_moisture | Harvest | Required; defaults to 15% if omitted |
| Sugar Beets | sugar_content | Harvest | Required; defaults to 18%. Valid range: 9–30% |
| Peanuts | peanut_moisture | Harvest | Moisture at buying point. Valid range: 9.3–31% |
| Cotton | ginning_moisture_id | Harvest | Moisture at ginning. Select from CottonMoisture reference. |
| Rice | water_regime_id | Rice Water Regime | Preseason water regime. Select from RicePreseasonWaterRegimes. |
| Rice | water_management_id | Rice Water Regime | Water management strategy. Select from RiceWaterManagementTypes. |
Additionally, yield validation limits and irrigation volume limits differ by crop — see the Validation Reference section in the API Input Reference.
10300 (generic “Dry Beans”)6. Irrigation Sub-Logic
Path: crop_intervals[].activities(type:irrigation)[].inputs
irrigation activity is in the activities arrayMultiple water sources can be included per irrigation activity — each as a separate object in the water_sources[] array.
7. Commercial Fertilizer Category Branching
Path: crop_intervals[].activities(type:nutrient_commercial)[].inputs.fertilizers[]
21–24 (Generic N-P₂O₅-K₂O-S Fertilizer)See the Fertilizers reference data for all product types and their categories.
8. Nutrient Management Defaults
Path: crop_intervals[].additional_data.nutrient_management
true (NRCS approved plan followed)["1","2","3","4"] (all 4R’s)false[] (none) — partner can overrideThe remaining fields in this section — nutrient_rate_practice_ids, nutrient_setbacks, precision_application, phosphorus_years — are always present regardless of the management plan answer.
9. Soil Test & Phosphorus Drawdown
Path: crop_intervals[].additional_data.soil_test
[] and can be omittedThe p_soil_test_level_id itself defaults to 5 if not provided. See PSoilTestLevel for all options.
10. Field Details — Tile Drainage & Conservation Practices
Tile Drainage
Path: field.field_detail_inputs.tile_drainage
1 (“None”) if no drainage1 (field has tile drainage)Conservation Practices
Path: field.field_detail_inputs.conservation_practices[]
Conservation practices are provided as an array. Each item in the array requires a practice_type_id. The installation_year and removal_year fields exist in the schema but are not currently enforced. If no conservation practices apply, pass an empty array [].
Quick Reference Table
All major conditional triggers at a glance:
| Trigger Field / Condition | Unlocks | Section |
|---|---|---|
Activity type in activities[] | Entire input section for that activity | §1 |
has_landuse_change = true | acres_converted, year_converted, landuse_change_type_id | §2 |
| landuse_change_type = forest | forest_type_id | §2 |
| landuse_change_type = grasslands | grassland_management_id | §2 |
planting_cover activity present | All cover crop fields (9 inputs) | §3 |
Cover crop is_legume = "Ask" | is_legume field | §3 |
crop_dried = true | drying_location_id, drying_system_id, moisture_removed | §4 |
| Crop is Cotton/Silage/Peanuts/Potatoes/Sugar Beets | Drying fields skipped entirely | §4 |
| Crop is a legume species | inoculant_applied | §5 |
| Crop is Alfalfa / Sugar Beets / Peanuts / Cotton | Crop-specific moisture or sugar field | §5 |
| Crop is Rice | water_regime_id, water_management_id | §5 |
crop_id = 10300 (generic Dry Beans) | crop_variety_id required | §5 |
| Irrigated | non_irrigated_yield (harvest) | §6 |
| Water source is alluvial/surface | water_conservation_practice_ids | §6 |
| Irrigation used energy to pump | pump_pressure, pump_depth, energy_source_id | §6 |
product_type_id = 21–24 (Generic NPKS) | nitrogen, phosphorus, potassium, sulfur fields | §7 |
product_type_id ≠ 21–24 (named product) | product_amount | §7 |
| Fertilizer contains nitrogen | slow_release, inhibitor (optional) | §7 |
management_plan = true | management_4r_ids defaults to all 4R’s | §8 |
p_soil_test_level_id = Excessive/Very High | p_drawdown_strategy_ids | §9 |
tile_density_id ≠ 1 | Future: installation/removal year fields | §10 |
This documentation reflects the Fieldprint Platform API v5.0.2 as of April 2026. The Fieldprint Platform is actively developed and implementation details may evolve between releases. While we work to keep this reference accurate, we encourage API partners to validate behavior against the live API and reference data endpoints. The Field to Market team is available to support your integration — contact support@fieldtomarket.org or your partner liaison with any questions.
Fieldprint Platform API v5.0.2 — Conditional Logic Guide · Companion to API Input Reference