{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/theusedcarindex-com/json-schema/theusedcarindex-com-watch-alerts-schema.json",
  "title": "WatchAlerts",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/theusedcarindex-com-openapi.json#/components/schemas/WatchAlerts",
  "type": "object",
  "properties": {
    "alerts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 0
          },
          "type": {
            "enum": [
              "recall",
              "investigation",
              "complaint_count"
            ]
          },
          "kind": {
            "enum": [
              "new",
              "updated",
              "count"
            ]
          },
          "ref": {
            "type": "string"
          },
          "make": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "year": {
            "type": "integer",
            "minimum": 2000,
            "maximum": 2027
          },
          "record_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date on the NHTSA record (received or opened)."
          },
          "observed_date": {
            "type": "string",
            "format": "date",
            "description": "UTC day this service recorded the change."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "type": "string",
            "format": "uri"
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          },
          "watchlist_entry_id": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "type",
          "kind",
          "ref",
          "make",
          "model",
          "year",
          "record_date",
          "observed_date",
          "summary",
          "source_url",
          "details",
          "watchlist_entry_id"
        ],
        "additionalProperties": false
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "resume_cursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "watchlist_size": {
      "type": "integer",
      "minimum": 0
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "alerts",
    "next_cursor",
    "resume_cursor",
    "watchlist_size",
    "notes"
  ]
}