{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/curlec/json-schema/curlec-payment-downtime-schema.json",
  "title": "PaymentDowntime",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/curlec-payment-downtimes-api-openapi.yml#/components/schemas/PaymentDowntime",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "entity": {
      "type": "string",
      "enum": [
        "payment.downtime"
      ]
    },
    "method": {
      "type": "string",
      "enum": [
        "card",
        "netbanking",
        "upi"
      ]
    },
    "begin": {
      "type": "integer"
    },
    "end": {
      "type": [
        "integer",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "scheduled",
        "started",
        "resolved",
        "updated"
      ]
    },
    "scheduled": {
      "type": "boolean"
    },
    "severity": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "instrument": {
      "$ref": "#/$defs/DowntimeInstrument"
    },
    "created_at": {
      "type": "integer"
    },
    "updated_at": {
      "type": "integer"
    }
  },
  "$defs": {
    "DowntimeInstrument": {
      "type": "object",
      "properties": {
        "bank": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "issuer": {
          "type": "string"
        },
        "psp": {
          "type": "string"
        },
        "vpa_handle": {
          "type": "string"
        },
        "card_type": {
          "type": "string"
        },
        "flow": {
          "type": "string"
        }
      }
    }
  }
}