{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/theusedcarindex-com/json-schema/theusedcarindex-com-recall-changes-schema.json",
  "title": "RecallChanges",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/theusedcarindex-com-openapi.json#/components/schemas/RecallChanges",
  "type": "object",
  "properties": {
    "changes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RecallChange"
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "feed": {
      "type": "object",
      "properties": {
        "last_ingest_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "enum": [
            "active",
            "no_changes_recorded"
          ]
        }
      },
      "required": [
        "last_ingest_at",
        "status"
      ]
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "changes",
    "next_cursor",
    "feed",
    "notes"
  ],
  "$defs": {
    "RecallChange": {
      "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
        }
      },
      "required": [
        "id",
        "type",
        "kind",
        "ref",
        "make",
        "model",
        "year",
        "record_date",
        "observed_date",
        "summary",
        "source_url",
        "details"
      ],
      "additionalProperties": false
    }
  }
}