Retrieve a list of properties associated with an agent. Returns paginated results of all properties the agent manages.
POST
/getProperties
curl
curl -X POST 'https://ws.spac.io/api/v1/getProperties' \
-H 'apikey: your-api-key' \
-d 'agent_key=agent_12345&page=1&limit=50'
import requests
headers = {'apikey': 'your-api-key'}
data = {'agent_key': 'agent_12345', 'page': 1, 'limit': 50}
response = requests.post('https://ws.spac.io/api/v1/getProperties', headers=headers, data=data)
properties = response.json()
const formData = new FormData();
formData.append('agent_key', 'agent_12345');
formData.append('page', '1');
formData.append('limit', '50');
fetch('https://ws.spac.io/api/v1/getProperties', {
method: 'POST',
headers: {'apikey': 'your-api-key'},
body: formData
}).then(r => r.json()).then(console.log)
Response examples (200)
{
"success": true,
"data": [
{
"property_id": "12345",
"address": "123 Main St",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"price": 750000,
"bedrooms": 3,
"bathrooms": 2,
"sqft": 2500,
"status": "active",
"list_date": "2024-01-15",
"mls_id": "ABC123456"
}
],
"pagination": {
"current_page": 1,
"total_pages": 5,
"total_results": 234
}
}
Response examples (400)
{
"success": false,
"error": "string",
"message": "string"
}
Response examples (401)
{
"success": false,
"error": "string",
"message": "string"
}
Response examples (429)
{
"success": false,
"error": "string",
"message": "string"
}