{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/powerexpertindia-com/json-schema/powerexpertindia-com-solar-savings-request-schema.json",
  "title": "SolarSavingsRequest",
  "description": "The request may use either an explicit subcategory_code or consumer_type=domestic with domestic_class for internal verified mapping.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/powerexpertindia-com-openapi.json#/components/schemas/SolarSavingsRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "state_code",
    "existing_monthly_units",
    "post_solar_import_units",
    "release_id",
    "verification_tier"
  ],
  "properties": {
    "state_code": {
      "type": "string",
      "enum": [
        "BR"
      ]
    },
    "subcategory_code": {
      "type": "string",
      "description": "Optional when consumer_type and domestic_class are supplied. When both forms are supplied, they must resolve to the same category."
    },
    "connected_load": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        }
      ]
    },
    "load_unit": {
      "type": "string",
      "enum": [
        "kw",
        "hp",
        "kva"
      ]
    },
    "existing_monthly_units": {
      "type": "integer",
      "minimum": 0
    },
    "post_solar_import_units": {
      "type": "integer",
      "minimum": 0
    },
    "effective_on": {
      "type": "string",
      "format": "date"
    },
    "release_id": {
      "type": "string"
    },
    "verification_tier": {
      "type": "string",
      "enum": [
        "verified_strict"
      ]
    },
    "consumer_type": {
      "type": "string",
      "enum": [
        "domestic"
      ],
      "description": "Required when domestic_class is used for internal category resolution."
    },
    "domestic_class": {
      "type": "string",
      "enum": [
        "urban",
        "general",
        "rural",
        "lifeline"
      ],
      "description": "Caller-declared Bihar domestic classification. The API does not determine government or lifeline eligibility."
    },
    "billing_month": {
      "type": "string",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
      "description": "Optional billing month used by the verified Bihar FPPAS selector."
    },
    "discom_code": {
      "type": "string",
      "enum": [
        "NBPDCL",
        "SBPDCL"
      ],
      "description": "Optional Bihar distribution company selector for FPPAS."
    }
  },
  "oneOf": [
    {
      "required": [
        "subcategory_code"
      ]
    },
    {
      "required": [
        "consumer_type",
        "domestic_class"
      ]
    }
  ]
}