{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/macfax-com/json-schema/macfax-com-lookup-result-schema.json",
  "title": "LookupResult",
  "description": "One serial's answer. Branch on status; note says the same thing in English for a person.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/macfax-com-openapi.json#/components/schemas/LookupResult",
  "type": "object",
  "properties": {
    "serial": {
      "type": "string",
      "description": "The serial the answer is about, uppercased (with letter O read as zero when only that resolved)."
    },
    "corrected_from": {
      "type": [
        "string",
        "null"
      ],
      "description": "The serial as sent, when it only resolved after reading letter O as zero."
    },
    "serial_kind": {
      "type": "string",
      "enum": [
        "randomized",
        "legacy"
      ],
      "description": "randomized = 10 characters (2021 on), legacy = 11-12 characters."
    },
    "status": {
      "type": "string",
      "enum": [
        "resolved",
        "unknown_serial",
        "unsupported",
        "retry"
      ],
      "description": "resolved: the model is identified. unknown_serial: no device has this serial, usually a typo; final, cached, so asking again is free. unsupported: a real Apple device whose model cannot be identified yet; never charged, and asking again gives the same answer. retry: a temporary upstream failure; never charged, so resend it later."
    },
    "resolved": {
      "type": "boolean",
      "description": "True exactly when status is resolved."
    },
    "model": {
      "type": [
        "string",
        "null"
      ],
      "description": "Apple's name for the model, e.g. \"MacBook Pro (14-inch, 2021)\" or \"iPad (A16)\". Display text: names vary between sources."
    },
    "device_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "Apple's device class: \"Mac laptops\", \"Mac desktops\", \"iPad\" or \"iPhone\". Null when unresolved, or for a device outside those four. For iPads and iPhones it is the one structured field, since model_identifiers and market come from the Mac catalogue."
    },
    "model_identifier": {
      "type": [
        "string",
        "null"
      ],
      "description": "The Apple model identifier when exactly one fits, e.g. \"MacBookPro18,3\"."
    },
    "model_identifiers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Every Apple model identifier the model can be: the stable join key for a Mac catalogue. Empty for iPads and iPhones."
    },
    "model_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Apple's configuration code, when the resolver returns one."
    },
    "year": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Model year when Apple's name carries one. Null for chip-only names such as \"MacBook Air (13-inch, M5)\" or \"iPad (A16)\"."
    },
    "report": {
      "type": [
        "object",
        "null"
      ],
      "description": "A verified Macfax report on file for this serial (id, url, model_name, model_identifier, hardware_verified, issued_at), or null."
    },
    "market": {
      "type": [
        "object",
        "null"
      ],
      "description": "What the model is worth, the same object /api/v1/market returns. Null for iPads, iPhones and Macs from before Apple Silicon."
    },
    "record": {
      "type": [
        "object",
        "null"
      ],
      "description": "What Macfax has seen of this device, built from every lookup of the serial and joined to what is on file. Counts are buckets, never raw numbers. Null when the serial did not resolve. No identity, place finer than a country, or referrer is ever returned.",
      "properties": {
        "first_seen": {
          "type": "string",
          "description": "Month of the first lookup Macfax has of this serial, \"YYYY-MM\"."
        },
        "times_seen": {
          "type": "string",
          "enum": [
            "first_time",
            "2_to_5",
            "6_or_more"
          ],
          "description": "Lookups of this serial, counted as distinct callers per day and including this one."
        },
        "times_seen_30d": {
          "type": "string",
          "enum": [
            "first_time",
            "2_to_5",
            "6_or_more"
          ],
          "description": "The same count over the last 30 days."
        },
        "countries_30d": {
          "type": "integer",
          "description": "Distinct countries the serial was looked up from in the last 30 days."
        },
        "listed": {
          "type": [
            "object",
            "null"
          ],
          "description": "A live listing on Macfax for this device (source, url, asking_usd, since), or null."
        },
        "report_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "The latest verified Macfax report on this serial."
        },
        "sanitization_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "The latest sanitization record on this serial that was not voided."
        }
      }
    },
    "note": {
      "type": "string",
      "description": "The answer in one sentence, for a person."
    },
    "caveat": {
      "type": "string"
    },
    "new_serial": {
      "type": "boolean",
      "description": "Whether the answer needed a brand new 2021+ resolution, which is what the daily allowance of new serials counts. False for serials Macfax already knew, pre-2021 serials, repeats within 24 hours, and answers that came back retry or unsupported."
    }
  }
}