{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fairvalid-com/json-schema/fairvalid-com-fair-match-batch-schema.json",
  "title": "FairMatchBatch",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fairvalid-com-openapi.json#/components/schemas/FairMatchBatch",
  "type": "object",
  "required": [
    "version",
    "brand",
    "product",
    "mode",
    "batch_id",
    "status",
    "completed",
    "charged_credits",
    "unavailable",
    "leads"
  ],
  "properties": {
    "version": {
      "const": "v1"
    },
    "brand": {
      "const": "FairValid"
    },
    "product": {
      "const": "FairMatch"
    },
    "mode": {
      "enum": [
        "live",
        "sandbox"
      ]
    },
    "batch_id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "working",
        "complete"
      ]
    },
    "completed": {
      "type": "boolean"
    },
    "charged_credits": {
      "type": "integer",
      "minimum": 0
    },
    "unavailable": {
      "type": "integer",
      "minimum": 0
    },
    "leads": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "$ref": "#/$defs/FairMatchLead"
      }
    },
    "status_url": {
      "type": "string"
    }
  },
  "$defs": {
    "FairMatchLead": {
      "type": "object",
      "required": [
        "lead_id",
        "name",
        "title",
        "company",
        "location",
        "profile_url",
        "email",
        "verified_at"
      ],
      "properties": {
        "lead_id": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "name": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "company": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "profile_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "verified_at": {
          "type": "string"
        }
      }
    }
  }
}