Table of Contents
Base URL #
https://your-domain.com/api/v1
Authentication #
The current MVP API exposes public read endpoints and a public inquiry endpoint. Rate limit: 60 requests/minute.
Sanctum is installed and ready for future authenticated endpoints. When authenticated endpoints are enabled, clients should include a token:
Authorization: Bearer {token}
Authenticated rate limit: 1000 requests/minute.
Properties #
List Properties #
GET /api/v1/properties
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
city_id |
int | Filter by city |
district_id |
int | Filter by district |
property_type_id |
int | Filter by type |
listing_type_id |
int | Filter by listing type (sale/rent) |
property_category_id |
int | Filter by category |
min_price |
float | Minimum price |
max_price |
float | Maximum price |
rooms |
int | Minimum rooms |
bedrooms |
int | Minimum bedrooms |
min_area |
float | Minimum area (m²) |
max_area |
float | Maximum area (m²) |
is_featured |
bool | Only featured properties |
is_new_development |
bool | Only new developments |
reference |
string | Search by reference number |
sort |
string | Sort field: published_at, price, area, rooms, created_at, view_count |
direction |
string | asc or desc (default: desc) |
per_page |
int | Results per page (default: 20, max: 50) |
Response: 200 OK
{
"data": [
{
"id": 1,
"reference_no": "PE-ABC12345",
"slug": "istanbul-kadikoy-3-1-daire",
"title": "Merkezi Konumda 3+1 Daire",
"price": 3500000,
"currency": "TRY",
"area": 120,
"rooms": 4,
"bedrooms": 3,
"city": { "id": 1, "name": "İstanbul" },
"district": { "id": 5, "name": "Kadıköy" },
"agent": { "id": 1, "name": "Mehmet Yılmaz", "phone": "+905321234567" },
"images": [
{ "thumb": "...", "card": "...", "detail": "...", "original": "..." }
]
}
],
"meta": {
"current_page": 1,
"last_page": 5,
"per_page": 20,
"total": 95
}
}
Get Property #
GET /api/v1/properties/{id}
Get Property by Slug #
GET /api/v1/properties/slug/{slug}
Featured Properties #
GET /api/v1/properties/featured?limit=10
Search #
Advanced Search #
GET /api/v1/search
Additional Parameters (beyond property filters):
| Parameter | Type | Description |
|---|---|---|
q |
string | Full-text search in title/description |
ne_lat |
float | Bounding box: northeast latitude |
ne_lng |
float | Bounding box: northeast longitude |
sw_lat |
float | Bounding box: southwest latitude |
sw_lng |
float | Bounding box: southwest longitude |
lat |
float | Center latitude for radius search |
lng |
float | Center longitude for radius search |
radius |
float | Radius in km (default: 10) |
Agents #
List Agents #
GET /api/v1/agents?per_page=20
Get Agent #
GET /api/v1/agents/{id}
Locations #
Cities #
GET /api/v1/locations/cities
Districts by City #
GET /api/v1/locations/cities/{cityId}/districts
Neighborhoods by District #
GET /api/v1/locations/districts/{districtId}/neighborhoods
Inquiries #
Submit Inquiry #
POST /api/v1/inquiries
Body:
{
"property_id": 1,
"name": "Ahmet Yılmaz",
"email": "[email protected]",
"phone": "05321234567",
"message": "Bu ilanla ilgileniyorum."
}
Response: 201 Created
{
"message": "Başvurunuz başarıyla alındı.",
"data": { "id": 1 }
}
Validation Errors: 422 Unprocessable Entity
Webhooks #
Available Events #
| Event | Trigger |
|---|---|
property.published |
Property goes live |
property.updated |
Property details changed |
property.sold |
Property marked as sold |
inquiry.created |
New inquiry submitted |
inquiry.assigned |
Inquiry assigned to agent |
agent.review_created |
New agent review |
user.registered |
New user registration |
newsletter.subscribed |
Newsletter subscription |
Webhook Payload #
{
"event": "property.published",
"timestamp": "2026-06-11T12:00:00Z",
"data": {
"property_id": 1,
"reference_no": "PE-ABC12345",
"title": "3+1 Daire",
"price": 3500000,
"currency": "TRY",
"slug": "istanbul-kadikoy-3-1-daire"
}
}
Verification #
Each webhook includes an X-Webhook-Signature header (HMAC-SHA256 of the body using your webhook secret).
Error Responses #
All errors follow this format:
{
"message": "Error description",
"errors": {
"field": ["Validation message"]
}
}
| Status | Meaning |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |
| 422 | Validation Error |
| 429 | Rate Limited |
| 500 | Server Error |