{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/actuallycare-com/json-schema/actuallycare-com-client-schema.json",
  "title": "Client",
  "description": "Client/contact record",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/actuallycare-com-v1-openapi.json#/components/schemas/Client",
  "type": "object",
  "required": [
    "first_name",
    "last_name",
    "client_type"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "user_id": {
      "type": "string",
      "format": "uuid"
    },
    "first_name": {
      "type": "string"
    },
    "last_name": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "phone": {
      "type": "string"
    },
    "client_type": {
      "type": "string",
      "enum": [
        "buyer",
        "seller",
        "both"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive",
        "closed"
      ]
    },
    "source": {
      "type": "string",
      "description": "Lead source"
    },
    "budget_min": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "budget_max": {
      "type": "number",
      "format": "double",
      "minimum": 0
    },
    "preferred_locations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "property_preferences": {
      "type": "object",
      "properties": {
        "bedrooms_min": {
          "type": "integer"
        },
        "bathrooms_min": {
          "type": "number",
          "format": "float"
        },
        "square_feet_min": {
          "type": "integer"
        },
        "property_types": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "pre_approved": {
      "type": "boolean",
      "description": "Pre-approved for financing"
    },
    "pre_approval_amount": {
      "type": "number",
      "format": "double"
    },
    "notes": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "version": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}