Administrator Property Management API
Base URL: http://localhost:8000/api/v1
Prefix: /admins
Auth: JWT Bearer token with admin role required
Headers: Content-Type: application/json
1. List All Properties
Retrieve all properties for admin review and management.
/admins/properties/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200
{
"success": true,
"message": "Properties retrieved successfully.",
"data": {
"properties": {
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "pending",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": null,
"approved_at": null,
"rejection_reason": "",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "6e65dfe2-38e0-4be6-a4dd-2c5f73f9bb51",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550102"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-08-04T10:30:00Z",
"updated_at": "2026-08-04T10:30:00Z"
}
]
}
}
}Notes
-
Supports optional
status, for example/admins/properties/?status=pending. -
Uses page pagination (
page); the default page size is 12. -
Common authentication and request errors are documented under Common Error Format.
2. List Pending Properties
Retrieve properties waiting for admin approval.
/admins/properties/pending/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200
{
"success": true,
"message": "Pending properties retrieved successfully.",
"data": {
"properties": {
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "pending",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": null,
"approved_at": null,
"rejection_reason": "",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "6e65dfe2-38e0-4be6-a4dd-2c5f73f9bb51",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550102"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-08-04T10:30:00Z",
"updated_at": "2026-08-04T10:30:00Z"
}
]
}
}
}Notes
-
Returns only pending properties. Uses page pagination (
page), with default page size 12. -
Common authentication and request errors are documented under Common Error Format.
3. Property Details
Retrieve full property details for admin review.
/admins/properties/{property_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200
{
"success": true,
"message": "Property details retrieved successfully.",
"data": {
"property": {
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "pending",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": null,
"approved_at": null,
"rejection_reason": "",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "6e65dfe2-38e0-4be6-a4dd-2c5f73f9bb51",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550102"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-08-04T10:30:00Z",
"updated_at": "2026-08-04T10:30:00Z"
}
}
}Notes
-
HTTP
404if the property does not exist. -
Common authentication and request errors are documented under Common Error Format.
4. Approve Property
Approve a pending property and make it available.
/admins/properties/{property_id}/approve/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200
{
"success": true,
"message": "Property approved successfully.",
"data": {
"property": {
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "available",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": {
"id": "0d8d7df9-d06d-4e03-8efb-9b2339bbdca1",
"full_name": "Admin User",
"email": "admin@example.com",
"phone": "+15125550103"
},
"approved_at": "2026-08-04T11:00:00Z",
"rejection_reason": "",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "6e65dfe2-38e0-4be6-a4dd-2c5f73f9bb51",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550102"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-08-04T10:30:00Z",
"updated_at": "2026-08-04T10:30:00Z"
}
}
}Notes
-
Only
pendingproperties can be approved; otherwise HTTP400:Only pending properties can be approved. -
Sets status to
available, records the reviewing admin and approval time, and clears the rejection reason. -
HTTP
404if the property does not exist. -
Common authentication and request errors are documented under Common Error Format.
5. Reject Property
Reject a pending property with an optional reason.
/admins/properties/{property_id}/reject/Auth: Required
Headers
Authorization: Bearer {{access_token}}Request Body
{
"reason": "Ownership document is incomplete."
}Success Example
HTTP 200
{
"success": true,
"message": "Property rejected successfully.",
"data": {
"property": {
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "rejected",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": {
"id": "0d8d7df9-d06d-4e03-8efb-9b2339bbdca1",
"full_name": "Admin User",
"email": "admin@example.com",
"phone": "+15125550103"
},
"approved_at": "2026-08-04T11:05:00Z",
"rejection_reason": "Ownership document is incomplete.",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "6e65dfe2-38e0-4be6-a4dd-2c5f73f9bb51",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550102"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-08-04T10:30:00Z",
"updated_at": "2026-08-04T10:30:00Z"
}
}
}Notes
-
Only
pendingproperties can be rejected; otherwise HTTP400:Only pending properties can be rejected. -
reasonis optional for this individual endpoint. Send{}to omit it. -
The existing implementation records the rejecting admin and review time in
approved_byandapproved_at. -
HTTP
404if the property does not exist. -
Common authentication and request errors are documented under Common Error Format.
6. Hide Property
Hide a property from public discovery.
/admins/properties/{property_id}/hide/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200
{
"success": true,
"message": "Property hidden successfully.",
"data": {
"property": {
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "hidden",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": null,
"approved_at": null,
"rejection_reason": "",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "6e65dfe2-38e0-4be6-a4dd-2c5f73f9bb51",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550102"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-08-04T10:30:00Z",
"updated_at": "2026-08-04T10:30:00Z"
}
}
}Notes
-
sold,rented, andtransfer_pendingproperties cannot be hidden; HTTP400:This property cannot be hidden. -
HTTP
404if the property does not exist. -
Common authentication and request errors are documented under Common Error Format.
7. Mark Property As Featured
Mark a property as featured.
/admins/properties/{property_id}/feature/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200
{
"success": true,
"message": "Property marked as featured successfully.",
"data": {
"property": {
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "pending",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": null,
"approved_at": null,
"rejection_reason": "",
"is_featured": true,
"is_trending": false,
"owner": {
"id": "6e65dfe2-38e0-4be6-a4dd-2c5f73f9bb51",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550102"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-08-04T10:30:00Z",
"updated_at": "2026-08-04T10:30:00Z"
}
}
}Notes
-
Already-featured properties return success. This changes the featured flag only.
-
HTTP
404if the property does not exist. -
Common authentication and request errors are documented under Common Error Format.
8. Remove Featured Status
Remove featured status from a property.
/admins/properties/{property_id}/unfeature/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200
{
"success": true,
"message": "Property removed from featured successfully.",
"data": {
"property": {
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "pending",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": null,
"approved_at": null,
"rejection_reason": "",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "6e65dfe2-38e0-4be6-a4dd-2c5f73f9bb51",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550102"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-08-04T10:30:00Z",
"updated_at": "2026-08-04T10:30:00Z"
}
}
}Notes
-
Already-unfeatured properties return success.
-
HTTP
404if the property does not exist. -
Common authentication and request errors are documented under Common Error Format.
9. Delete Property
Delete a property.
/admins/properties/{property_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
HTTP 200
{
"success": true,
"message": "Property deleted successfully.",
"data": {}
}Notes
-
Permanently deletes the property, including related records configured for cascading deletion.
-
HTTP
404if the property does not exist. -
Common authentication and request errors are documented under Common Error Format.
10. Create Property
Create a property owned by a seller or admin; save a draft or publish immediately.
/admins/properties/Auth: Required
Headers
Authorization: Bearer {{access_token}}Request Body
{
"owner_id": "0d8d7df9-d06d-4e03-8efb-9b2339bbdca1",
"agent_id": null,
"title": "Modern Apartment in Downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "available",
"amenity_ids": [],
"media": [],
"resources": []
}Success Example
HTTP 201
{
"success": true,
"message": "Property listing created successfully.",
"data": {
"property": {
"id": "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"description": "Bright apartment near the main road.",
"property_type": "apartment",
"purpose": "rent",
"price": "2250.00",
"currency": "USD",
"city": "Austin",
"area_name": "Downtown",
"address": "110 Example Lane, Austin, TX 78701",
"latitude": "30.2672000",
"longitude": "-97.7431000",
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "available",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": {
"id": "0d8d7df9-d06d-4e03-8efb-9b2339bbdca1",
"full_name": "Admin User",
"email": "admin@example.com",
"phone": "+15125550103"
},
"approved_at": "2026-09-13T10:00:00Z",
"rejection_reason": "",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "0d8d7df9-d06d-4e03-8efb-9b2339bbdca1",
"full_name": "Admin User",
"email": "admin@example.com",
"phone": "+15125550103"
},
"agent": null,
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-09-13T10:00:00Z",
"updated_at": "2026-09-13T10:00:00Z"
}
}
}Notes
-
Required:
owner_id,title,description,property_type,purpose,price,city,address. -
owner_idmust reference a user withseller_owneroradminrole, including the logged-in admin. There is no automatic owner fallback. -
agent_idis optional and nullable. A supplied user must have theagentrole. -
statusacceptsdraftoravailable; defaults todraft. Publishing setsapproved_byto the logged-in admin and setsapproved_at. Drafts leave these values null. -
property_type:land,house,villa,apartment,mansion.purpose:buy,rent,auction,invest. -
pricemust be nonnegative. New properties use the configured platform currency, initiallyUSD. -
area_nameis optional.latitude,longitude,bedrooms,bathrooms, andarea_sizeare optional and nullable. Bedroom/bathroom counts and area size must be nonnegative. -
area_unit:sqft,katha,bigha,acre; optional and may be blank. -
amenity_idsis an optional list of unique active amenity IDs. -
mediais optional. Each item requirestype(image,video,floor_plan,virtual_tour) andfile_url; optional fields arethumbnail_url,is_primary(default false), andsort_order(default 0). At most one item may be primary. -
resourcesis optional. Each item requirestitle,resource_type(architectural_plan,brochure,floor_plan,financial_projection,other), andfile_url; optional fields arefile_size(nullable) andsort_order(default 0). -
Media/resource URLs must be valid URLs. Resources are saved but are not included in the current admin property response.
-
Creation and related-record writes are atomic. KYB approval is not required. Publishing does not automatically set
ownership_verified. -
HTTP
400for missing required fields, invalid choices or values, nonexistent references, invalid owner/agent roles, duplicate amenities, or multiple primary media items. -
Common authentication and request errors are documented under Common Error Format.
11. Update Property
Partially updates an existing property. Only supplied fields are changed.
/admins/properties/{property_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Request Body
{
"title": "Updated Luxury Apartment",
"description": "Updated property description.",
"price": "625000.00",
"city": "Austin",
"area_name": "South Congress",
"address": "120 Example Avenue, Austin, TX 78704",
"agent_id": "7c6c5d7e-0a1a-4a6b-8df7-123456789abc",
"status": "available"
}Success Example
{
"success": true,
"message": "Property updated successfully.",
"data": {
"property": {
"id": "2d6c5d7e-0a1a-4a6b-8df7-123456789abc",
"title": "Updated Luxury Apartment",
"slug": "updated-luxury-apartment",
"description": "Updated property description.",
"property_type": "apartment",
"purpose": "buy",
"price": "625000.00",
"currency": "USD",
"city": "Austin",
"area_name": "South Congress",
"address": "120 Example Avenue, Austin, TX 78704",
"latitude": null,
"longitude": null,
"bedrooms": 3,
"bathrooms": 2,
"area_size": "1450.00",
"area_unit": "sqft",
"status": "available",
"ownership_verified": false,
"estimated_value": null,
"estimated_at": null,
"approved_by": null,
"approved_at": null,
"rejection_reason": "",
"is_featured": false,
"is_trending": false,
"owner": {
"id": "5a6c5d7e-0a1a-4a6b-8df7-123456789abc",
"full_name": "Property Owner",
"email": "owner@example.com",
"phone": "+15125550103"
},
"agent": {
"id": "7c6c5d7e-0a1a-4a6b-8df7-123456789abc",
"full_name": "Assigned Agent",
"email": "agent@example.com",
"phone": "+15125550104"
},
"media": [],
"amenities": [],
"price_history": [],
"created_at": "2026-10-03T08:00:00Z",
"updated_at": "2026-10-03T09:30:00Z"
}
}
}Notes
-
Only administrators can access this endpoint.
-
This is a partial update; omitted fields remain unchanged.
-
owner_idmust belong to a seller or administrator. -
agent_idmust belong to an agent. Sendnullto remove the assigned agent. -
Valid statuses are:
draft,pending,available,reserved,transfer_pending,sold,rented,rejected, andhidden. -
property_idmust be a valid property UUID.
12. Bulk Property Action
Perform one action on multiple properties and return individual results.
/admins/properties/bulk-action/Auth: Required
Headers
Authorization: Bearer {{access_token}}Request Body
{
"action": "approve",
"property_ids": [
"8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
"12e9939f-d46d-4ed8-84f2-e68f6beb0c86",
"97f21387-40fe-4b2d-9313-969df10fb320"
]
}Success Example
HTTP 200
{
"success": true,
"message": "Bulk property action processed.",
"data": {
"action": "approve",
"succeeded": [
"8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91"
],
"failed": [
{
"id": "12e9939f-d46d-4ed8-84f2-e68f6beb0c86",
"reason": "Only pending properties can be approved."
},
{
"id": "97f21387-40fe-4b2d-9313-969df10fb320",
"reason": "Property not found."
}
]
}
}Notes
-
actionandproperty_idsare required. Supply 1-100 unique UUIDs. -
approve: pending properties only; publishes and records approval metadata. -
reject: pending properties only; requires a nonblankreasonshared by all selected properties. -
hide: rejectssold,rented, andtransfer_pending; otherwise setshidden. -
unhide: rejects any property whose status is nothidden; otherwise sets status toavailable. -
feature/unfeature: set or clear the featured flag; already-matching properties count as successful. -
delete: permanently deletes properties using existing cascade behavior. -
Each property runs in its own transaction. Missing properties and action-rule failures appear in
failed; successful IDs appear insucceeded. -
HTTP
200andsuccess: truemean the batch was processed, even if every item failed. Always inspect both arrays. -
Unexpected server/database errors are not converted into item failures; earlier successful items may already be committed.
-
HTTP
400for missing fields, unsupported actions, malformed UUIDs, duplicate IDs, empty lists, more than 100 IDs, or missing/blank rejection reasons. Request validation fails before any action runs. -
reasonis ignored for actions other than rejection. -
Common authentication and request errors are documented under Common Error Format.
For rejection:
{
"action": "reject",
"property_ids": [
"8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91"
],
"reason": "Ownership document is incomplete."
}13. Unhide Property
Returns a hidden property to the available state.
/admins/properties/{property_id}/unhide/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Property unhidden successfully.",
"data": {
"property": {
"id": "9dc7a092-b173-4f14-a767-e74f5a620d38",
"status": "available"
}
}
}Notes
- Only a property currently in the
hiddenstate can be unhidden.
Common Success Format
{
"success": true,
"message": "Operation completed successfully.",
"data": {}
}Common Error Format
HTTP 400 - validation errors. Field names and messages depend on the failed validation.
{
"success": false,
"message": "Validation failed.",
"errors": {
"field_name": [
"Error message."
]
}
}HTTP 400 - invalid property state on an individual action:
{
"success": false,
"message": "Validation failed.",
"errors": {
"non_field_errors": [
"Only pending properties can be approved."
]
}
}HTTP 400 - bulk rejection without a reason:
{
"success": false,
"message": "Validation failed.",
"errors": {
"reason": [
"A reason is required for rejection."
]
}
}HTTP 401 - missing authentication:
{
"success": false,
"message": "Authentication credentials were not provided.",
"errors": {}
}Invalid or expired JWTs also return HTTP 401; their error details differ from the missing-token example.
HTTP 403 - authenticated user without the admin role:
{
"success": false,
"message": "You do not have permission to perform this action.",
"errors": {}
}HTTP 404 - property not found on an individual endpoint:
{
"success": false,
"message": "Property not found.",
"errors": {}
}