{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asterwise-com/json-schema/asterwise-com-western-events-request-schema.json",
  "title": "WesternEventsRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asterwise-com-openapi.json#/components/schemas/WesternEventsRequest",
  "properties": {
    "from_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "From Date",
      "description": "First day (YYYY-MM-DD, civil day in target_timezone). Defaults to today in the birth timezone."
    },
    "days": {
      "type": "integer",
      "maximum": 31.0,
      "minimum": 1.0,
      "title": "Days",
      "description": "Number of civil days, 1 to 31 (7 for a week, 30 for a month).",
      "default": 7
    },
    "target_timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Target Timezone",
      "description": "IANA timezone that defines the days and local times. Defaults to the birth timezone."
    },
    "location": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Location",
      "description": "City name to resolve to lat/lon/tz automatically. Example: 'Mumbai' or 'New Delhi, India'. If provided, latitude, longitude and timezone are not required."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "title": "Name",
      "description": "Person name associated with the birth record",
      "default": "Chart"
    },
    "date": {
      "type": "string",
      "title": "Date",
      "description": "Birth date in YYYY-MM-DD format"
    },
    "time": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Time",
      "description": "Birth time in HH:MM 24-hour format. If omitted, the chart is cast for 06:00 local time (not a sunrise chart) and birth_time_provided is false: houses, the Ascendant, the sect and the Moon's exact degree are then approximate."
    },
    "latitude": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 90.0,
          "minimum": -90.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Latitude",
      "description": "Latitude. Required if location not provided."
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 180.0,
          "minimum": -180.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Longitude",
      "description": "Longitude. Required if location not provided."
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Timezone",
      "description": "IANA timezone. Required if location not provided (unless utc_offset is given). For dates before the zone adopted a standard time, the birthplace's local mean time (longitude / 15 hours) is used."
    },
    "utc_offset": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Utc Offset",
      "description": "Optional explicit UTC offset of the birth time, as ±HH:MM or ±HH:MM:SS (e.g. '+04:51:31' for Bombay mean time). Overrides the offset `timezone` would give. Use it when the birth record states the offset, or for historical local times the IANA database cannot represent."
    },
    "ayanamsa": {
      "type": "string",
      "enum": [
        "lahiri",
        "raman",
        "kp",
        "tropical"
      ],
      "title": "Ayanamsa",
      "description": "Ignored on Western endpoints: positions are always tropical (no ayanamsa). Accepted so one birth object can be sent to Vedic and Western endpoints alike.",
      "default": "lahiri"
    },
    "house_system": {
      "type": "string",
      "enum": [
        "placidus",
        "koch",
        "equal",
        "whole_sign"
      ],
      "title": "House System",
      "description": "Natal house system for the Ascendant and MC.",
      "default": "placidus"
    }
  },
  "type": "object",
  "required": [
    "date"
  ]
}