-
Notifications
You must be signed in to change notification settings - Fork 0
Lead
Adrian Gortzak edited this page Jan 27, 2026
·
10 revisions
The Lead API is a service that integrates property valuation data with Vitec CRM, enabling automated lead generation from RealAI property valuations. When a customer receives a property valuation, their information along with property details is sent to real estate agents via the Vitec CRM system.
| Field name | Type | Example | Description | Used for | Importance |
|---|---|---|---|---|---|
| customer_id | string | 'ABC123' | Unique identifier for the Vitec customer account | All | Necessary |
| lead_id | string | 'LEAD456' | Lead source identifier in Vitec CRM | All | Necessary |
| Field name | Type | Example | Description | Used for | Importance |
|---|---|---|---|---|---|
| first_name | string | 'Erik' | First name of the lead contact | All | Necessary |
| last_name | string | 'Andersson' | Last name of the lead contact | All | Necessary |
| string | 'erik.andersson@example.com' | Email address of the lead contact | All | Necessary | |
| phone | string | '+46701234567' | Phone number of the lead contact | All | Necessary |
| address | string | 'Storgatan 12' | Street address of the property | All | Necessary |
| zip_code | string | '11422' | Postal code of the property | All | Optional |
| city | string | 'Stockholm' | City where the property is located | All | Optional |
| Field name | Type | Example | Description | Used for | Importance |
|---|---|---|---|---|---|
| valuation | int | 5500000 | Valuation amount in SEK from Real AI AVM | All | Necessary |
| property_sub_type | string | 'SingleFamilyResidence' | Building structure type. Accepted values are 'Apartment', 'SingleFamilyResidence', 'Townhouse', 'Duplex', 'Terraced' | All | Necessary |
| living_area | float | 150.0 | Living area of home in square meters | All | High |
| rooms | string | '4' | Number of rooms in home | Apartments | Medium |
| secondary_area | float | 40.0 | Secondary area (e.g., basement) in square meters | Houses | Medium |
| lot_size_area | float | 800.0 | Lot area in square meters | Houses | Medium |
| year_built | string | '1992' | Building construction year | All | Medium |
| occupant_type | string | 'Owner' | Ownership type. Accepted values are 'Owner', 'TenantOwnership' | All | Medium |
| association_fee | float | 3500.0 | Monthly co-operation member fee in SEK | TenantOwnership | Medium |
The API follows the same property type classification as Real AI's AVM:
- Apartment (lägenhet): Apartment units
- SingleFamilyResidence (villa): Detached single-family homes
- Townhouse (radhus): Row houses
- Terraced (kedjehus): Chain houses (connected by a garage or similar structure)
- Duplex (parhus): Semi-detached houses
The API automatically generates a Swedish-language message sent to the Vitec CRM. The message includes:
- Lead source notification from Real AI
- Customer name and valuation amount
- Valuation date
- Property type in Swedish
- Living area (and number of rooms if provided)
- Secondary area and lot size (for houses)
- Monthly association fee (for tenant ownership)
- Construction year (if provided)
Example message:
Du har fått ett lead från Real AI. Erik Andersson fick en värdering på 5 500 000 kr den 2026-01-27 av en villa med 150.0 m² boarea. Biarean är 40.0 m² och tomtarean 800.0 m². Byggåret är 1992.
Creates a new lead in Vitec CRM with customer, person, and property information.
Response:
{
"status": "OK",
"message": "Response from Vitec API"
}Retrieves available lead sources for a specific customer.
Query Parameters:
-
customer_id(optional): The customer ID to query
Response:
[
{
"id": "LEAD456",
"name": "Real AI Valuation Leads"
}
]import requests
import json
# API Configuration
API_URL = "https://your-lead-api-endpoint.com"
# Prepare lead data
lead_data = {
"customer": {
"customer_id": "ABC123",
"lead_id": "LEAD456"
},
"person": {
"first_name": "Erik",
"last_name": "Andersson",
"email": "erik.andersson@example.com",
"phone": "+46701234567",
"address": "Storgatan 12",
"zip_code": "11422",
"city": "Stockholm"
},
"property": {
"valuation": 5500000,
"property_sub_type": "SingleFamilyResidence",
"living_area": 150.0,
"secondary_area": 40.0,
"lot_size_area": 800.0,
"year_built": "1992",
"occupant_type": "Owner",
"rooms": None,
"association_fee": None
}
}
# Send lead
response = requests.post(
f"{API_URL}/lead",
headers={"Content-Type": "application/json"},
json=lead_data
)
# Print result
result = response.json()
print("Status:", result['status'])
print("Message:", result['message'])-
Getting Started
-
Models
- General Model Description*
- Prediction models
-
Data
-
Widget
-
Legal