> For the complete documentation index, see [llms.txt](https://apidocs.lwolf.com/doc/spacio-api/llms.txt)

# Common Use Cases & Workflows

## Common Use Cases

### 1. Lead Management Workflow
Retrieve leads for a property and track status:
```python
# Get property leads
registrants = get_registrants(property_id='prop_123')

# Process each lead
for lead in registrants:
    if lead['status'] == 'new':
        send_follow_up_email(lead['email'])
        update_crm(lead['registrant_id'], status='contacted')
```

### 2. Brokerage Dashboard
Aggregate data for brokerage reporting:
```python
# Get all agent properties
properties = get_all_agent_properties(brokerage_id)

# Calculate metrics
active_listings = len([p for p in properties if p['status'] == 'active'])
total_value = sum(p['price'] for p in properties)

metrics = {
    'active_listings': active_listings,
    'total_inventory_value': total_value,
    'average_price': total_value / len(properties)
}
```

### 3. Open House Management
Schedule and manage open house events:
```python
# Get scheduled open houses
sessions = get_oh_sessions(agent_key=agent_id, status='scheduled')

# Send reminders before session starts
for session in sessions:
    if minutes_until(session['start_time']) <= 60:
        send_reminder_notifications(session)
```

### 4. Integration with CRM
Sync Spacio leads to external CRM:
```python
registrants = get_registrants(property_id='prop_123')
for registrant in registrants:
    crm.add_contact({
        'name': f"{registrant['first_name']} {registrant['last_name']}",
        'email': registrant['email'],
        'phone': registrant['phone'],
        'source': 'spacio',
        'property': registrant['property_id']
    })
```

