{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ruzora-com/json-schema/ruzora-com-client-referral-response-schema.json",
  "title": "ClientReferralResponse",
  "description": "Client referral details",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ruzora-com-openapi.json#/components/schemas/ClientReferralResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Record ID"
    },
    "referral_type": {
      "type": "string",
      "enum": [
        "Client",
        "Candidate"
      ],
      "title": "Referral Type"
    },
    "referrer_name": {
      "type": "string",
      "title": "Referrer Name",
      "description": "Name of person who referred"
    },
    "referrer_company": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Referrer Company",
      "description": "Referrer's company (if client)"
    },
    "referred_company_name": {
      "type": "string",
      "title": "Referred Company Name"
    },
    "referred_contact_name": {
      "type": "string",
      "title": "Referred Contact Name"
    },
    "referred_contact_email": {
      "type": "string",
      "title": "Referred Contact Email"
    },
    "referred_contact_title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Referred Contact Title"
    },
    "referred_company_domain": {
      "type": "string",
      "title": "Referred Company Domain"
    },
    "referred_company_size": {
      "type": "string",
      "title": "Referred Company Size"
    },
    "referred_industry": {
      "type": "string",
      "title": "Referred Industry"
    },
    "estimated_pricing_tier": {
      "type": "string",
      "title": "Estimated Pricing Tier"
    },
    "referral_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Referral Reason"
    },
    "specific_need": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Specific Need"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "qualification_score": {
      "type": "integer",
      "maximum": 100.0,
      "minimum": 0.0,
      "title": "Qualification Score",
      "description": "Qualification score 0-100"
    },
    "qualification_notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Qualification Notes"
    },
    "assigned_to": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assigned To"
    },
    "demo_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Demo Date"
    },
    "signed_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Signed Date"
    },
    "lost_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lost Reason"
    },
    "converted_company_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Converted Company Id"
    },
    "reward_tier": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reward Tier"
    },
    "reward_amount": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reward Amount"
    },
    "reward_status": {
      "type": "string",
      "title": "Reward Status"
    },
    "reward_paid_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reward Paid Date"
    },
    "reward_payment_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reward Payment Id"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updated At"
    },
    "estimated_reward": {
      "type": "string",
      "title": "Estimated Reward",
      "description": "Display text like '$2,000'"
    },
    "status_history": {
      "items": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "type": "array",
      "title": "Status History",
      "description": "Status change history"
    },
    "auto_reward": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Auto Reward",
      "description": "Auto-reward result when status changed to Signed"
    }
  },
  "type": "object",
  "required": [
    "id",
    "referral_type",
    "referrer_name",
    "referred_company_name",
    "referred_contact_name",
    "referred_contact_email",
    "referred_company_domain",
    "referred_company_size",
    "referred_industry",
    "estimated_pricing_tier",
    "status",
    "qualification_score",
    "reward_status",
    "created_at",
    "estimated_reward"
  ]
}