Properties API
Endpoints for managing property projects.
Property Object​
{
"id": "prop_123abc",
"name": "Sunset Villas",
"type": "villa",
"status": "under_construction",
"location": {
"address": "Jl. Pantai Batu Mejan",
"area": "Canggu",
"city": "Badung",
"country": "Indonesia",
"coordinates": {
"lat": -8.6478,
"lng": 115.1385
}
},
"description": "Luxury villa development...",
"media": {
"cover": "https://cdn.propertybase.ai/...",
"gallery": ["https://cdn.propertybase.ai/..."],
"floor_plans": ["https://cdn.propertybase.ai/..."],
"virtual_tour": "https://my.matterport.com/..."
},
"pricing": {
"currency": "USD",
"min_price": 750000,
"max_price": 1500000
},
"features": ["pool", "garden", "parking"],
"units_count": 12,
"units_available": 8,
"completion_date": "2025-06-30",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:00:00Z"
}
List Properties​
GET /v1/properties
Query Parameters​
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status |
type | string | Filter by property type |
min_price | number | Minimum price |
max_price | number | Maximum price |
location | string | Filter by area/city |
sort | string | Sort field |
order | string | Sort order (asc/desc) |
page | number | Page number |
per_page | number | Results per page |
Example Request​
curl -X GET "https://api.propertybase.ai/v1/properties?status=completed&type=villa&per_page=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response​
{
"success": true,
"data": [
{
"id": "prop_123abc",
"name": "Sunset Villas",
"type": "villa",
"status": "completed",
"pricing": {
"currency": "USD",
"min_price": 750000,
"max_price": 1500000
},
"units_available": 8
}
],
"meta": {
"page": 1,
"per_page": 10,
"total": 25,
"total_pages": 3
}
}
Get Property​
GET /v1/properties/:id
Example Request​
curl -X GET "https://api.propertybase.ai/v1/properties/prop_123abc" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response​
{
"success": true,
"data": {
"id": "prop_123abc",
"name": "Sunset Villas",
"type": "villa",
"status": "completed",
"location": {
"address": "Jl. Pantai Batu Mejan",
"area": "Canggu",
"city": "Badung",
"country": "Indonesia"
},
"description": "Luxury villa development featuring 12 exclusive residences...",
"pricing": {
"currency": "USD",
"min_price": 750000,
"max_price": 1500000
},
"units_count": 12,
"units_available": 8
}
}
Create Property​
POST /v1/properties
Request Body​
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Property name |
type | string | Yes | Property type |
status | string | No | Status (default: planning) |
location | object | Yes | Location details |
description | string | No | Property description |
pricing | object | No | Pricing configuration |
features | array | No | Feature tags |
completion_date | string | No | Expected completion |
Example Request​
curl -X POST "https://api.propertybase.ai/v1/properties" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Ocean View Apartments",
"type": "apartment",
"status": "under_construction",
"location": {
"address": "123 Beach Road",
"area": "Seminyak",
"city": "Badung",
"country": "Indonesia"
},
"description": "Modern beachfront apartments...",
"pricing": {
"currency": "USD",
"min_price": 200000,
"max_price": 500000
},
"features": ["beach_access", "pool", "gym"],
"completion_date": "2025-12-31"
}'
Example Response​
{
"success": true,
"data": {
"id": "prop_456def",
"name": "Ocean View Apartments",
"type": "apartment",
"status": "under_construction",
"created_at": "2024-01-25T09:00:00Z"
}
}
Update Property​
PUT /v1/properties/:id
Example Request​
curl -X PUT "https://api.propertybase.ai/v1/properties/prop_123abc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "completed",
"completion_date": "2024-12-15"
}'
Example Response​
{
"success": true,
"data": {
"id": "prop_123abc",
"name": "Sunset Villas",
"status": "completed",
"completion_date": "2024-12-15",
"updated_at": "2024-01-25T10:00:00Z"
}
}
Delete Property​
DELETE /v1/properties/:id
warning
Deleting a property also deletes all associated units. This action cannot be undone.
Example Request​
curl -X DELETE "https://api.propertybase.ai/v1/properties/prop_123abc" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response​
{
"success": true,
"data": {
"id": "prop_123abc",
"deleted": true
}
}
Get Property Units​
GET /v1/properties/:id/units
Returns all units belonging to a property.
Example Request​
curl -X GET "https://api.propertybase.ai/v1/properties/prop_123abc/units" \
-H "Authorization: Bearer YOUR_API_KEY"
Property Types​
| Value | Description |
|---|---|
villa | Standalone villa |
apartment | Apartment unit |
townhouse | Townhouse |
penthouse | Penthouse |
commercial | Commercial space |
land | Land plot |
mixed_use | Mixed-use development |
Property Status​
| Value | Description |
|---|---|
planning | In planning phase |
under_construction | Currently being built |
completed | Construction complete |
sold_out | All units sold |
archived | No longer active |