{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openephemeris-com/json-schema/openephemeris-com-electional-moment-response-schema.json",
  "title": "ElectionalMomentResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openephemeris-com-electional-api-openapi.yml#/components/schemas/ElectionalMomentResponse",
  "additionalProperties": false,
  "properties": {
    "aspects": {
      "items": {
        "$ref": "#/$defs/ElectionalAspect"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "day_ruler": {
      "description": "Ruler of the planetary day. With usable latitude/longitude the day runs sunrise to the next sunrise at that place, named for the weekday whose sunrise opened it; otherwise the ruler of the UTC calendar weekday. score_detail.day_ruler_basis says which.",
      "title": "Day Ruler",
      "type": [
        "string",
        "null"
      ]
    },
    "dignity_breakdown": {
      "items": {
        "$ref": "#/$defs/ElectionalPlanetDignity"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "is_void": {
      "title": "Is Void",
      "type": [
        "boolean",
        "null"
      ]
    },
    "iso_time": {
      "title": "Iso Time",
      "type": "string"
    },
    "jd": {
      "format": "double",
      "title": "Jd",
      "type": "number"
    },
    "lunar_phase": {
      "title": "Lunar Phase",
      "type": [
        "string",
        "null"
      ]
    },
    "rating": {
      "description": "excellent/good/moderate/poor/avoid",
      "title": "Rating",
      "type": "string"
    },
    "score": {
      "description": "Composite viability score 0-100",
      "title": "Score",
      "type": "integer"
    },
    "score_detail": {
      "additionalProperties": true,
      "description": "Component breakdown behind the composite score: dignity_score, aspect_score, sect_score and voc_penalty on their 0-100 sub-scales, plus sect_basis — how sect was determined (sun_house, or one of the default_diurnal_* fallbacks).",
      "type": [
        "object",
        "null"
      ]
    },
    "sect": {
      "description": "Chart sect the score was computed under: diurnal (Sun above the horizon) or nocturnal. Sect selects which triplicity rulers the dignity component rewards, so this is part of the score's basis, not decoration. Always populated — when latitude/longitude were absent or unusable it names the diurnal fallback, and score_detail.sect_basis says so.",
      "title": "Sect",
      "type": [
        "string",
        "null"
      ]
    },
    "void_ends_at": {
      "title": "Void Ends At",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "score",
    "rating",
    "jd",
    "iso_time"
  ],
  "type": "object",
  "$defs": {
    "ElectionalAspect": {
      "additionalProperties": false,
      "properties": {
        "aspect_type": {
          "title": "Aspect Type",
          "type": "string"
        },
        "orb": {
          "title": "Orb",
          "type": "number"
        },
        "planet1": {
          "title": "Planet1",
          "type": "string"
        },
        "planet2": {
          "title": "Planet2",
          "type": "string"
        },
        "quality_label": {
          "title": "Quality Label",
          "type": "string"
        },
        "quality_score": {
          "title": "Quality Score",
          "type": "integer"
        }
      },
      "title": "ElectionalAspect",
      "type": "object"
    },
    "ElectionalPlanetDignity": {
      "additionalProperties": false,
      "properties": {
        "dignity_label": {
          "description": "Strongest essential dignity, in this order: domicile, exaltation, detriment, fall, triplicity (for the chart's sect), term, face; peregrine only when the planet holds none of them (Lilly).",
          "title": "Dignity Label",
          "type": "string"
        },
        "dignity_total": {
          "title": "Dignity Total",
          "type": "integer"
        },
        "is_retrograde": {
          "title": "Is Retrograde",
          "type": "boolean"
        },
        "longitude": {
          "title": "Longitude",
          "type": "number"
        },
        "motion_status": {
          "title": "Motion Status",
          "type": "string"
        },
        "planet_id": {
          "title": "Planet Id",
          "type": "integer"
        },
        "planet_name": {
          "title": "Planet Name",
          "type": "string"
        },
        "speed": {
          "title": "Speed",
          "type": "number"
        }
      },
      "title": "ElectionalPlanetDignity",
      "type": "object"
    }
  }
}