Skip to content Skip to main navigation Skip to footer

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.

Tip for API partners: The best way to experience the full conditional logic is to walk through Field to Market’s Fieldprint Platform web interface. The UI shows and hides fields dynamically based on your selections. This guide documents those same rules in a format you can reference when building your integration.

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:

? IF  condition is true
THEN  these fields become required
THEN  field_name — brief description
? ELSE  omit the fields above

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 TypeTriggers Inputs InCommon 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

Land-Use Change Decision Flow
? IF  has_landuse_change = true
THEN  include all of:
landuse_change_type_id — what was the previous land use?
acres_converted — how many acres? (must not exceed field size)
year_converted — what year?
 
? IF  landuse_change_type_id indicates forest
THEN  forest_type_id — dominant genus of the managed forest
 
? IF  landuse_change_type_id indicates grasslands
THEN  grassland_management_id — how was the grassland managed?
 
? ELSE  has_landuse_change = false
Omit all land-use change sub-fields

3. Cover Crop Logic

Path: crop_intervals[].activities(type:planting_cover)[].inputs

Cover Crop Decision Flow
? IF  planting_cover activity is in the activities array
THEN  all cover crop fields required:
date, cover_crop_id, dominant_species_type_id
is_single_species_mix — single species or multiple species mix?
planting_method_id, days_before_frost
termination_method_id, termination_date
 
? IF  the selected cover_crop_id has is_legume = "Ask" in reference data
THEN  is_legume — must be answered (some species can be either)
? ELSE  is_legume is determined automatically from reference data

Check the CoverCrops reference data to see which species have is_legume = "Ask".

4. Harvest & Crop Drying

Path: crop_intervals[].activities(type:harvest)[].inputs

Crop Drying Decision Flow
? IF  crop is NOT Cotton, Corn (silage), Peanuts, Potatoes, or Sugar Beets
THEN  crop_dried is required (Boolean)
 
? IF  crop_dried = true
THEN  include:
drying_location_id — on-farm or off-farm?
drying_system_id — what system? (if on-farm)
moisture_removed — percentage removed (max 40%)
? ELSE  crop_dried = false: omit drying sub-fields
 
? ELSE  crop IS Cotton, Corn (silage), Peanuts, Potatoes, or Sugar Beets
Omit crop_dried and all drying fields entirely
Instead, see §5 Crop-Specific Inputs for fields like ginning_moisture_id, peanut_moisture, sugar_content

5. 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)FieldSectionCondition
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.

Dry Beans Variety Logic
? IF  crop_id = 10300 (generic “Dry Beans”)
THEN  crop_variety_id is required — select the specific bean variety (10301–10312)
? ELSE  crop_id is already a specific variety (e.g. 10301)
crop_variety_id is not needed

6. Irrigation Sub-Logic

Path: crop_intervals[].activities(type:irrigation)[].inputs

Irrigation Decision Flow
? IF  irrigation activity is in the activities array
THEN  always required:
water_source_id — deep aquifer, alluvial groundwater, or surface water
irrigation_method_id
irrigation_volume — max 80 ac-in for Alfalfa/Rice; 55 for all others
 
? IF  water_source_id = alluvial groundwater or surface water
THEN  water_conservation_practice_ids — optional conservation practices
? ELSE  deep aquifer: conservation practices not shown
 
? IF  energy was used to pump the water
THEN  include:
pump_pressure — commonly 0–130 psi
pump_depth — commonly 0–1,500 ft
energy_source_id — fuel type used for pumping

Multiple 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[]

Fertilizer Product Type Branching
? IF  product_type_id = 21–24 (Generic N-P₂O₅-K₂O-S Fertilizer)
THEN  provide individual nutrient amounts:
nitrogen (lbs/ac) — max 325 lbs/ac across all applications
phosphorus (lbs/ac) — max 150 lbs/ac
potassium (lbs/ac) — max 300 lbs/ac
sulfur (lbs/ac)
product_amount is NOT used in this case
 
? ELSE  product_type_id is a named fertilizer product
THEN  product_amount (lbs/ac) — total application rate
Individual N/P/K/S fields are NOT used
? IF  the selected fertilizer contains nitrogen
THEN  two optional flags become relevant:
slow_release — is it a slow-release nitrogen product? (default: false)
inhibitor — nitrification/urease inhibitor applied? (default: false)

See the Fertilizers reference data for all product types and their categories.

8. Nutrient Management Defaults

Path: crop_intervals[].additional_data.nutrient_management

Nutrient Management Plan Logic
? IF  management_plan = true (NRCS approved plan followed)
THEN  management_4r_ids defaults to ["1","2","3","4"] (all 4R’s)
 
? ELSE  management_plan = false
THEN  management_4r_ids defaults to [] (none) — partner can override

The 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

Phosphorus Soil Test Decision Flow
? IF  p_soil_test_level_id = “Excessive/Very High”
THEN  p_drawdown_strategy_ids becomes relevant
Select one or more phosphorus drawdown strategies from PDrawdownStrategies reference
 
? ELSE  any other phosphorus level
p_drawdown_strategy_ids defaults to [] and can be omitted

The 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

Tile Drainage Decision Flow
tile_density_id is always required — set to 1 (“None”) if no drainage
 
? IF  tile_density_id1 (field has tile drainage)
THEN  tile_installation_year and tile_removal_year may apply in future versions
Note: These fields are not currently enforced but are part of the schema.

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 / ConditionUnlocksSection
Activity type in activities[]Entire input section for that activity§1
has_landuse_change = trueacres_converted, year_converted, landuse_change_type_id§2
landuse_change_type = forestforest_type_id§2
landuse_change_type = grasslandsgrassland_management_id§2
planting_cover activity presentAll cover crop fields (9 inputs)§3
Cover crop is_legume = "Ask"is_legume field§3
crop_dried = truedrying_location_id, drying_system_id, moisture_removed§4
Crop is Cotton/Silage/Peanuts/Potatoes/Sugar BeetsDrying fields skipped entirely§4
Crop is a legume speciesinoculant_applied§5
Crop is Alfalfa / Sugar Beets / Peanuts / CottonCrop-specific moisture or sugar field§5
Crop is Ricewater_regime_id, water_management_id§5
crop_id = 10300 (generic Dry Beans)crop_variety_id required§5
Irrigatednon_irrigated_yield (harvest)§6
Water source is alluvial/surfacewater_conservation_practice_ids§6
Irrigation used energy to pumppump_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 nitrogenslow_release, inhibitor (optional)§7
management_plan = truemanagement_4r_ids defaults to all 4R’s§8
p_soil_test_level_id = Excessive/Very Highp_drawdown_strategy_ids§9
tile_density_id ≠ 1Future: installation/removal year fields§10
Documentation Notice

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

Was This Article Helpful?

0
Related Articles