Skip to content
English
  • There are no suggestions because the search field is empty.

How to Input Custom Fertilizers in the API 

This guide explains how to provide custom fertilizer data in the Measure API. It clarifies how to convert NPK ratios and product compositions to accurate API inputs.

To reflect denitrification and decomposition processes, DNDC requires the nitrogen applied per area unit (for example: kg N/ha) for each nitrogen form (nitrate, ammonium, urea and ammonia). For our pre existing product library, conversion are done for you. For custom blends, it requires the user to do that conversion. This guide will help you convert your fertilizer data into Measure API inputs for use by DNDC when needed.

Key Concepts

To use the API effectively, it is essential to understand the following concepts and how they relate to one another:

  • Nitrogen Forms: Urea, Ammonium, Nitrate, Ammonia vs NPK Ratio: The percentage of nitrogen (N), phosphorus (P), and potassium (K) in a fertilizer, typically listed as three numbers (e.g., 30-0-0). However, the NPK ratio alone does not indicate how the nitrogen is chemically bound (e.g., urea, ammonium, nitrate and ammonia), which is critical for modeling. The API requires the percentage of each nitrogen form in the fertilizer to accurately model its fate in the soil. This information is often indicated in the product specifications or in the name of the fertilizer (e.g., "Ammonium Nitrate").

  • Application Rate The amount of fertilizer applied per unit area. An example in metric is kg/ha (kilograms per hectare) for solids or L/ha (liters per hectare) for liquids. This determines the total nitrogen applied to the field.

  • Liquid Density (for liquid fertilizers only) The weight of a liquid fertilizer per unit volume. DNDC requires a conversion to solids. Likewise, liquids require a  conversion from volume-based application rates (example: L/ha) to weight-based rates (example: kg/ha).

Step 1: Identify Your Fertilizer's Total Nitrogen (N%)

Start with the NPK ratio to determine the total nitrogen content of your fertilizer.

Example: An NPK ratio of 30-0-0 means 30% of the product is nitrogen. The remaining 70% consists of non-nitrogenous components such as fillers or carriers.

Step 2: Break Down N% by Nitrogen Form

Next, determine what proportion of that nitrogen exists in each form: urea, ammonium, nitrate and/or ammonia. This is usually found in the product specifications.

Example: If the product is 50% urea and 50% ammonium by nitrogen content, calculate each form's share of the total product:

  • Urea: 50% × 30% N = 15% of the product is urea
  • Ammonium: 50% × 30% N = 15% of the product is ammonium

Step 3: Enter the Application Rate

Enter how much fertilizer was applied per unit area. For example: kg/ha for solids or L/ha for liquids

Step 4: Add Liquid Density (liquid fertilizers only)

If your fertilizer is a liquid, you must provide its density. This allows the API to convert your volume-based application rate (L/ha) into a weight-based rate (kg/ha).

Practical Examples

Example 1: Urea Solution (6.9,0,0)

Product:  Urea Solution (6.9,0,0) Contains 6.9% N in urea form.

Application rate: 100 L of urea has been applied per ha

Liquid density: Urea is a solution it’s diluted with a Liquid Density of 1.04 kg/L

API Input:
"Fertilizer": [
  {
    "name": "custom" ,
    "date": "2024-05-01",
    "amount": 100,          // Example: 100 L/ha
    "rate_unit": "L",
    "area_unit": "ha",
    "custom": {
      "nitrate_percent": 0,
      "ammonia_percent": 0,
      "ammonium_percent": 0,
      "urea_percent": 6.9,  // 6.9% of the product is urea-N
      "sulfate_percent": 0,
      "phosphate_percent": 0,
      "liquid_density": 1.04,
      "mass_liquid_density_unit": "kg/L"
    }
  }
]


Example 2: Urea-Ammonium Nitrate (30,0,0)

Product: Urea-Ammonium Nitrate (30,0,0), N Ratio is 30% nitrogen by weight, 0% P, 0% K.

Composed of 

  • 25% nitrate-N (of total N).

  • 25% ammonium-N (of total N).

  • 50% urea-N (of total N).

Application rate: 100 L of urea has been applied per ha

Liquid density: n/a (solid product) 

API Input:
"Fertilizer": [
  {
    "name": "custom",
    "date": "2024-05-01",
    "amount": 100,          // Example: 100 kg/ha
    "rate_unit": "kg",
    "area_unit": "ha",
    "custom": {
      "nitrate_percent": 7.5,   // 7.5% of the product is nitrate-N
      "ammonia_percent": 0,
      "ammonium_percent": 7.5,  // 7.5% of the product is ammonium-N
      "urea_percent": 15,        // 15% of the product is urea-N
      "sulfate_percent": 0,
      "phosphate_percent": 0,
      "liquid_density": null,    // Not needed for solids
      "mass_liquid_density_unit": null
    }
  }
]

Common Pitfalls to Avoid

Confusing N% with Product Composition:

From example 1:
  • Wrong: urea_percent: 6.9 (this is the N% from urea, not the product composition).

  • Correct: urea_percent: 15 (15% of the product is urea, contributing to 6.9% N).

Forgetting Liquid Density: Always include it for liquids to ensure accurate weight-based calculations.

Using Predefined Products: If your fertilizer is in the API’s product list, use it instead of custom inputs to simplify data entry.