{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/encarapi-com/json-schema/encarapi-com-inspection-response-schema.json",
  "title": "InspectionResponse",
  "description": "Official pre-sale inspection report 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/InspectionResponse",
  "type": "object",
  "properties": {
    "vehicleId": {
      "type": "string",
      "description": "Encar vehicle id this report belongs to."
    },
    "master": {
      "$ref": "#/$defs/InspectionMaster"
    },
    "outers": {
      "type": "array",
      "description": "Exterior panel condition codes (paint, dent, replacement). Empty when no exterior issues.",
      "items": {
        "type": "object"
      }
    },
    "inners": {
      "type": "array",
      "description": "Interior / structural frame panel condition codes.",
      "items": {
        "type": "object"
      }
    },
    "images": {
      "type": "array",
      "description": "Inspection photo references.",
      "items": {
        "type": "object"
      }
    },
    "price": {
      "type": [
        "object",
        "null"
      ],
      "description": "Assessed-value data, when provided by the inspector."
    },
    "etcs": {
      "type": "array",
      "description": "Additional inspector notes.",
      "items": {
        "type": "object"
      }
    },
    "formats": {
      "type": "array",
      "description": "Report format metadata.",
      "items": {
        "type": "object"
      }
    },
    "inspectionSource": {
      "type": "string",
      "description": "Origin of the inspection report."
    },
    "directManagement": {
      "type": "boolean",
      "description": "Whether the listing is directly managed by Encar."
    }
  },
  "$defs": {
    "InspectionMaster": {
      "type": "object",
      "description": "Certified summary of the official government inspection.",
      "properties": {
        "accdient": {
          "type": "boolean",
          "description": "Whether the inspection flags accident history (note: the Encar field is misspelled \"accdient\")."
        },
        "simpleRepair": {
          "type": "boolean",
          "description": "Whether only simple repairs (e.g. paint) were found."
        },
        "supplyNum": {
          "type": "string",
          "description": "Inspection certificate number."
        },
        "registrationDate": {
          "type": "string",
          "description": "Date the inspection was registered."
        },
        "detail": {
          "type": "object",
          "description": "Full inspection detail: vin, mileage, waterlog, tuning, recall, engine and transmission checks, serious-damage types, painted panels, main options, validity dates, usage changes (`usageChangeTypes`) and the inspector's free-text remarks (`comments`).",
          "properties": {
            "usageChangeTypes": {
              "type": "array",
              "description": "Usage changes in the vehicle's history (용도변경). Empty array = none. Filter the catalog with `usage_change` / `no_usage_change`.",
              "items": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string",
                    "description": "렌트 = rental, 영업용 = commercial, 관용 = government."
                  }
                }
              }
            },
            "comments": {
              "type": [
                "string",
                "null"
              ],
              "description": "Free-text remarks of the inspection center or dealer (Korean), exactly as published."
            }
          }
        }
      }
    }
  }
}