{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "cost-1000-leads latest.json",
  "type": "object",
  "required": [
    "dataset",
    "target_leads",
    "assumptions",
    "stacks",
    "records"
  ],
  "properties": {
    "records": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "stack_id",
          "step",
          "step_label",
          "tool",
          "vendor",
          "plan",
          "billing",
          "basis",
          "credits_per_unit",
          "credit_price_usd",
          "unit_cost_usd",
          "price",
          "currency",
          "price_usd",
          "price_unit",
          "included",
          "estimate",
          "source_url",
          "captured_at",
          "evidence",
          "evidence_sha256",
          "verification",
          "notes"
        ],
        "properties": {
          "step": {
            "enum": [
              "source",
              "research",
              "find_email",
              "verify",
              "phone"
            ]
          },
          "basis": {
            "enum": [
              "sourced",
              "attempted",
              "found",
              "verified",
              "final"
            ]
          },
          "unit_cost_usd": {
            "type": "number",
            "minimum": 0
          },
          "credits_per_unit": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "credit_price_usd": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "included": {
            "type": "boolean"
          },
          "estimate": {
            "type": "boolean"
          },
          "assumption_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "input_record_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "verification": {
            "type": "object",
            "required": [
              "status",
              "checks"
            ]
          }
        }
      }
    },
    "verifier_pricing": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "vendor",
          "product",
          "plan",
          "billing",
          "price",
          "currency",
          "price_usd",
          "price_unit",
          "credits_included",
          "credits_unit",
          "credit_costs",
          "cost_per_1000_verified_emails_usd",
          "country",
          "source_url",
          "captured_at",
          "evidence",
          "evidence_sha256",
          "notes"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "vendor": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "billing": {
            "enum": [
              "annual",
              "monthly",
              "one-time",
              "usage"
            ]
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "currency": {
            "type": "string"
          },
          "price_usd": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "price_unit": {
            "type": "string"
          },
          "price_annual_total": {
            "type": [
              "number",
              "null"
            ]
          },
          "quote_only": {
            "type": "boolean"
          },
          "price_status": {
            "enum": [
              "quote_only",
              "not_offered",
              "not_captured"
            ]
          },
          "confidence": {
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "provenance": {
            "type": "string"
          },
          "evidence_monthly_toggle": {
            "type": "string"
          },
          "credits_included": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "credits_unit": {
            "type": "string"
          },
          "actions_included": {
            "type": [
              "number",
              "null"
            ]
          },
          "actions_unit": {
            "type": "string"
          },
          "data_credit_usd": {
            "type": [
              "number",
              "null"
            ]
          },
          "action_usd": {
            "type": [
              "number",
              "null"
            ]
          },
          "credit_costs": {
            "type": "object"
          },
          "cost_per_1000_verified_emails_usd": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0
          },
          "cost_per_1000_is_estimate": {
            "type": "boolean"
          },
          "public_evidence": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "source",
                "confidence"
              ]
            }
          },
          "country": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          },
          "captured_at": {
            "type": "string"
          },
          "evidence": {
            "type": "string"
          },
          "evidence_sha256": {
            "type": "string"
          },
          "fetched_via": {
            "type": "string"
          },
          "verification": {
            "type": "object",
            "required": [
              "status",
              "checks"
            ],
            "properties": {
              "status": {
                "enum": [
                  "verified",
                  "changed_needs_review",
                  "failed"
                ]
              },
              "checks": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "pending_review": {
            "type": "object"
          },
          "notes": {
            "type": "string"
          }
        }
      }
    },
    "assumptions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "label",
          "value",
          "unit",
          "source_url",
          "notes"
        ]
      }
    },
    "stacks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "stack_id",
          "stack",
          "tools",
          "plan_summary",
          "billing",
          "match_rate",
          "verification_pass_rate",
          "phone_match_rate",
          "min_monthly_spend_usd",
          "quote_only",
          "notes"
        ]
      }
    }
  }
}
