{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asterwise-com/json-schema/asterwise-com-api-response-rahu-kaal-response-schema.json",
  "title": "ApiResponse[RahuKaalResponse]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asterwise-com-astro-api-openapi.yml#/components/schemas/ApiResponse_RahuKaalResponse_",
  "properties": {
    "success": {
      "type": "boolean",
      "title": "Success",
      "description": "True if the request succeeded",
      "default": true
    },
    "message": {
      "type": "string",
      "title": "Message",
      "description": "Human-readable status message",
      "default": "success"
    },
    "data": {
      "$ref": "#/$defs/RahuKaalResponse",
      "description": "The endpoint response payload"
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "KaalPeriod": {
      "properties": {
        "start": {
          "type": "string",
          "title": "Start",
          "description": "Period start time in HH:MM local time."
        },
        "start_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Start At",
          "description": "Period start time, ISO 8601 local time with date and UTC offset."
        },
        "start_utc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Start Utc",
          "description": "Period start time, ISO 8601 UTC with Z."
        },
        "end": {
          "type": "string",
          "title": "End",
          "description": "Period end time in HH:MM local time."
        },
        "end_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "End At",
          "description": "Period end time, ISO 8601 local time with date and UTC offset."
        },
        "end_utc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "End Utc",
          "description": "Period end time, ISO 8601 UTC with Z."
        },
        "duration_minutes": {
          "type": "integer",
          "title": "Duration Minutes",
          "description": "Duration of the period in minutes."
        },
        "is_active": {
          "type": "boolean",
          "title": "Is Active",
          "description": "True if this period is currently active."
        }
      },
      "type": "object",
      "required": [
        "start",
        "end",
        "duration_minutes",
        "is_active"
      ],
      "title": "KaalPeriod"
    },
    "RahuKaalResponse": {
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "ok",
            "no_sunrise"
          ],
          "title": "Status",
          "description": "ok, or no_sunrise when the place has no sunrise or sunset on that date (polar latitudes): the window fields are then null.",
          "default": "ok"
        },
        "status_detail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status Detail",
          "description": "Plain-English reason when status is not ok."
        },
        "date": {
          "type": "string",
          "title": "Date",
          "description": "Date for which Rahu Kaal is calculated (YYYY-MM-DD)."
        },
        "sunrise": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sunrise",
          "description": "Sunrise time in HH:MM local time."
        },
        "sunrise_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sunrise At",
          "description": "Sunrise time, ISO 8601 local time with date and UTC offset."
        },
        "sunrise_utc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sunrise Utc",
          "description": "Sunrise time, ISO 8601 UTC with Z."
        },
        "sunset": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sunset",
          "description": "Sunset time in HH:MM local time."
        },
        "sunset_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sunset At",
          "description": "Sunset time, ISO 8601 local time with date and UTC offset."
        },
        "sunset_utc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sunset Utc",
          "description": "Sunset time, ISO 8601 UTC with Z."
        },
        "rahu_kaal": {
          "anyOf": [
            {
              "$ref": "#/$defs/KaalPeriod"
            },
            {
              "type": "null"
            }
          ],
          "description": "Rahu Kaal period — inauspicious for new beginnings."
        },
        "gulika_kaal": {
          "anyOf": [
            {
              "$ref": "#/$defs/KaalPeriod"
            },
            {
              "type": "null"
            }
          ],
          "description": "Gulika Kaal (Mandi) period — inauspicious."
        },
        "yamaganda_kaal": {
          "anyOf": [
            {
              "$ref": "#/$defs/KaalPeriod"
            },
            {
              "type": "null"
            }
          ],
          "description": "Yamaganda Kaal period — inauspicious."
        }
      },
      "type": "object",
      "required": [
        "date"
      ],
      "title": "RahuKaalResponse"
    }
  }
}