{
  "name": "Stay-length JSON endpoint",
  "description": "Returns practical stay days, ranked limiting systems, usable battery watt-hours, and solar harvest from power, water, and waste assumptions.",
  "publisher": {
    "name": "OffGridRVHub",
    "url": "https://www.offgridrvhub.com"
  },
  "source": {
    "endpoint": "https://www.offgridrvhub.com/tools/api/stay-length.json",
    "fullCalculator": "https://www.offgridrvhub.com/tools/stay-length-calculator",
    "assumptions": "https://www.offgridrvhub.com/tools/calculator-assumptions",
    "documentation": "https://www.offgridrvhub.com/tools/calculator-api"
  },
  "caveat": "This is a planning estimate for RV education and comparison. It is not electrical, plumbing, safety, or installation advice.",
  "input": {
    "people": 2,
    "desiredStayDays": 5,
    "dailyUsageWh": 1800,
    "batteryAh": 200,
    "batteryVoltage": 12,
    "batteryType": "lithium",
    "solarWatts": 500,
    "sunHours": 5,
    "freshTankGallons": 40,
    "grayTankGallons": 35,
    "blackTankGallons": 30,
    "freshGallonsPerDay": 8,
    "grayGallonsPerDay": 5,
    "blackGallonsPerDay": 1.2
  },
  "result": {
    "practicalStayDays": 5,
    "firstLimiter": {
      "kind": "fresh-water",
      "label": "Fresh water",
      "days": 5,
      "status": "comfortable",
      "detail": "40 gallons divided by 8 gallons/day for the whole crew.",
      "fix": "Lower daily gallons, carry separate drinking water, add portable containers, or plan a refill before this day."
    },
    "limiters": [
      {
        "kind": "fresh-water",
        "label": "Fresh water",
        "days": 5,
        "status": "comfortable",
        "detail": "40 gallons divided by 8 gallons/day for the whole crew.",
        "fix": "Lower daily gallons, carry separate drinking water, add portable containers, or plan a refill before this day."
      },
      {
        "kind": "gray-water",
        "label": "Gray tank",
        "days": 7,
        "status": "comfortable",
        "detail": "35 gallons divided by 5 gallons/day from dishes, showers, and sink use.",
        "fix": "Use basin dishwashing, shorter showers, outdoor rinse routines where legal, or schedule a dump stop sooner."
      },
      {
        "kind": "black-water",
        "label": "Black tank",
        "days": 25,
        "status": "comfortable",
        "detail": "30 gallons divided by 1.2 gallons/day from toilet use and flush water.",
        "fix": "Use less flush water, confirm tank capacity, or plan a dump stop before black tank margin gets uncomfortable."
      },
      {
        "kind": "power",
        "label": "Power recovery",
        "days": 30,
        "status": "comfortable",
        "detail": "Average solar harvest covers the entered daily load on good-sun days, so power is not the first paper limiter.",
        "fix": "Reduce daily watt-hours, add solar, add usable battery, or plan generator/alternator recovery before the bank gets low."
      }
    ],
    "usableBatteryWh": 2160,
    "solarHarvestWh": 1950,
    "dailyEnergyDeficitWh": 0,
    "targetGapDays": 0,
    "verdictTitle": "This stay fits the entered margins",
    "verdictDetail": "The weakest system still reaches the 5-day target on paper. Keep a weather, water, and dump-station buffer before treating that as a guarantee.",
    "recommendedNextMove": "Open the water calculator next and test lower shower, dishwashing, cooking, and refill assumptions."
  }
}