Customer Saved Searches API
Base URL: http://localhost:8000/api/v1
Prefix: /customers
Auth: Customer access token required
Headers: Content-Type: application/json
1. List Saved Searches
Retrieve all saved searches belonging to the authenticated customer.
/customers/saved-searches/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Saved searches retrieved successfully.",
"data": {
"saved_searches": [
{
"id": "7d9f6b63-2d8e-4d37-ae56-7efb35b4f8a1",
"name": "Downtown rentals",
"filters_json": {
"city": "Austin",
"area_name": "Downtown",
"purpose": "rent",
"min_price": 1500,
"max_price": 4000,
"bedrooms": 2,
"amenities": [
"parking"
]
},
"alert_enabled": true,
"last_alerted_at": null,
"created_at": "2026-09-24T08:30:00Z",
"updated_at": "2026-09-24T08:30:00Z"
}
]
}
}2. Create Saved Search
Create a saved property search with optional alert settings.
/customers/saved-searches/Auth: Required
Headers
Authorization: Bearer {{access_token}}Request Body
{
"name": "Downtown rentals",
"filters_json": {
"city": "Austin",
"area_name": "Downtown",
"purpose": "rent",
"min_price": 1500,
"max_price": 4000,
"bedrooms": 2,
"amenities": [
"parking"
]
},
"alert_enabled": true
}Success Example
{
"success": true,
"message": "Saved search created successfully.",
"data": {
"saved_search": {
"id": "7d9f6b63-2d8e-4d37-ae56-7efb35b4f8a1",
"name": "Downtown rentals",
"filters_json": {
"city": "Austin",
"area_name": "Downtown",
"purpose": "rent",
"min_price": 1500,
"max_price": 4000,
"bedrooms": 2,
"amenities": [
"parking"
]
},
"alert_enabled": true,
"last_alerted_at": null,
"created_at": "2026-09-24T08:30:00Z",
"updated_at": "2026-09-24T08:30:00Z"
}
}
}Status Code: 201 Created
Notes
-
nameis required. -
filters_jsonmust be a JSON object. -
filters_jsonandalert_enabledare optional. -
Saved searches only belong to the authenticated customer.
3. Get Saved Search Details
Retrieve one saved search owned by the authenticated customer.
/customers/saved-searches/{saved_search_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Saved search retrieved successfully.",
"data": {
"saved_search": {
"id": "7d9f6b63-2d8e-4d37-ae56-7efb35b4f8a1",
"name": "Downtown rentals",
"filters_json": {
"city": "Austin",
"purpose": "rent"
},
"alert_enabled": true,
"last_alerted_at": null,
"created_at": "2026-09-24T08:30:00Z",
"updated_at": "2026-09-24T08:30:00Z"
}
}
}4. Update Saved Search
Update one or more saved-search fields.
/customers/saved-searches/{saved_search_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Request Body
{
"name": "Updated Downtown rentals",
"filters_json": {
"city": "Austin",
"area_name": "Downtown",
"purpose": "rent",
"max_price": 5000
},
"alert_enabled": false
}Success Example
{
"success": true,
"message": "Saved search updated successfully.",
"data": {
"saved_search": {
"id": "7d9f6b63-2d8e-4d37-ae56-7efb35b4f8a1",
"name": "Updated Downtown rentals",
"filters_json": {
"city": "Austin",
"area_name": "Downtown",
"purpose": "rent",
"max_price": 5000
},
"alert_enabled": false,
"last_alerted_at": null,
"created_at": "2026-09-24T08:30:00Z",
"updated_at": "2026-09-24T09:00:00Z"
}
}
}Notes
-
All fields are optional because this endpoint supports partial updates.
-
filters_json, when supplied, must be a JSON object. -
id,last_alerted_at,created_at, andupdated_atare read-only.
5. Delete Saved Search
Delete one saved search owned by the authenticated customer.
/customers/saved-searches/{saved_search_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Saved search deleted successfully.",
"data": {}
}6. Get Saved Search Results
Retrieve available properties matching the saved search filters.
/customers/saved-searches/{saved_search_id}/results/Auth: Required
Headers
Authorization: Bearer {{access_token}}Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number. Defaults to 1. |
page_size | integer | Number of results per page, up to 50. |
Success Example
{
"success": true,
"message": "Saved search results retrieved successfully.",
"data": {
"properties": {
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "d4f4baf5-2d3f-4d64-8a0e-5f65a6c5c0c2",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"property_type": "apartment",
"purpose": "rent",
"price": "3250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"bedrooms": 2,
"bathrooms": 2,
"area_size": "1250.00",
"area_unit": "sqft",
"ownership_verified": true,
"is_featured": false,
"is_trending": true,
"primary_media": null,
"amenities": [],
"approved_at": "2026-09-20T10:00:00Z",
"created_at": "2026-09-18T08:00:00Z"
}
]
}
}
}Notes
-
Results include only available properties for buying or renting.
-
Results are filtered using the saved search’s
filters_json. -
Pagination supports a maximum page size of
50.
7. Toggle Saved Search Alerts
Enable or disable alerts for a saved search.
/customers/saved-searches/{saved_search_id}/toggle-alert/Auth: Required
Headers
Authorization: Bearer {{access_token}}Request Body
{
"alert_enabled": true
}Success Example
{
"success": true,
"message": "Saved search alert status updated successfully.",
"data": {
"saved_search": {
"id": "7d9f6b63-2d8e-4d37-ae56-7efb35b4f8a1",
"name": "Downtown rentals",
"filters_json": {
"city": "Austin",
"purpose": "rent"
},
"alert_enabled": true,
"last_alerted_at": null,
"created_at": "2026-09-24T08:30:00Z",
"updated_at": "2026-09-24T09:15:00Z"
}
}
}Notes
-
alert_enabledis required. -
Accepted values are
trueorfalse. -
This endpoint updates only the alert status.
Common Success Format
{
"success": true,
"message": "Operation completed successfully.",
"data": {}
}Common Error Format
{
"success": false,
"message": "Validation failed.",
"errors": {
"filters_json": [
"Saved search filters must be an object."
]
}
}For an unauthenticated request:
{
"success": false,
"message": "Authentication credentials were not provided.",
"errors": {}
}For a missing saved search:
{
"success": false,
"message": "Saved search not found.",
"errors": {}
}