{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/encarapi-com/json-schema/encarapi-com-record-response-schema.json",
  "title": "RecordResponse",
  "description": "Official insurance accident and ownership history for one vehicle.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/encarapi-com-openapi.json#/components/schemas/RecordResponse",
  "type": "object",
  "properties": {
    "accidentCnt": {
      "type": "integer",
      "description": "Total number of insurance-reported accidents."
    },
    "myAccidentCnt": {
      "type": "integer",
      "description": "Insurance claims for damage to THIS vehicle."
    },
    "myAccidentCost": {
      "type": "integer",
      "description": "Total repair payout for damage to this vehicle, KRW."
    },
    "otherAccidentCnt": {
      "type": "integer",
      "description": "Claims where this vehicle damaged another party."
    },
    "otherAccidentCost": {
      "type": "integer",
      "description": "Total payout for damage this vehicle caused to others, KRW."
    },
    "ownerChangeCnt": {
      "type": "integer",
      "description": "Number of ownership changes."
    },
    "ownerChanges": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "date"
      },
      "description": "Date of each ownership change (newest first)."
    },
    "carNoChangeCnt": {
      "type": "integer",
      "description": "Number of license-plate changes."
    },
    "totalLossCnt": {
      "type": "integer",
      "description": "Times the vehicle was written off as a total loss."
    },
    "totalLossDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Date of the total-loss event, if any."
    },
    "floodTotalLossCnt": {
      "type": "integer",
      "description": "Flood total-loss events."
    },
    "floodPartLossCnt": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Flood partial-loss events."
    },
    "floodDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Date of the flood-damage event, if any."
    },
    "robberCnt": {
      "type": "integer",
      "description": "Number of recorded theft events."
    },
    "robberDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Date of the theft event, if any."
    },
    "use": {
      "type": "string",
      "description": "Usage code ('1' = private, '2' = commercial/business, '3' = government)."
    },
    "business": {
      "type": "integer",
      "description": "Whether the car was ever used commercially (1) or not (0)."
    },
    "firstDate": {
      "type": "string",
      "format": "date",
      "description": "First registration date of the vehicle."
    },
    "regDate": {
      "type": "string",
      "description": "Timestamp when this insurance record was generated."
    },
    "accidents": {
      "type": "array",
      "description": "Dated list of every insurance claim with itemized costs.",
      "items": {
        "$ref": "#/$defs/AccidentEvent"
      }
    }
  },
  "$defs": {
    "AccidentEvent": {
      "type": "object",
      "description": "A single insurance-reported repair event. All costs are in KRW.",
      "properties": {
        "date": {
          "type": "string",
          "format": "date",
          "description": "Date of the claim."
        },
        "type": {
          "type": "string",
          "description": "Claim type code (1 = damage to own car, 2 = damage caused to others, etc.)."
        },
        "partCost": {
          "type": "integer",
          "description": "Parts cost, KRW."
        },
        "laborCost": {
          "type": "integer",
          "description": "Labor cost, KRW."
        },
        "paintingCost": {
          "type": "integer",
          "description": "Painting cost, KRW."
        },
        "insuranceBenefit": {
          "type": "integer",
          "description": "Total insurance payout for this event, KRW."
        }
      }
    }
  }
}