EstateHub

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.

GET/admins/properties/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

HTTP 200

JSON
{
  "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.

GET/admins/properties/pending/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

HTTP 200

JSON
{
  "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.

GET/admins/properties/{property_id}/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

HTTP 200

JSON
{
  "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 404 if 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.

POST/admins/properties/{property_id}/approve/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

HTTP 200

JSON
{
  "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 pending properties can be approved; otherwise HTTP 400: Only pending properties can be approved.

  • Sets status to available, records the reviewing admin and approval time, and clears the rejection reason.

  • HTTP 404 if 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.

POST/admins/properties/{property_id}/reject/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Request Body

JSON
{
  "reason": "Ownership document is incomplete."
}

Success Example

HTTP 200

JSON
{
  "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 pending properties can be rejected; otherwise HTTP 400: Only pending properties can be rejected.

  • reason is optional for this individual endpoint. Send {} to omit it.

  • The existing implementation records the rejecting admin and review time in approved_by and approved_at.

  • HTTP 404 if 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.

POST/admins/properties/{property_id}/hide/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

HTTP 200

JSON
{
  "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, and transfer_pending properties cannot be hidden; HTTP 400: This property cannot be hidden.

  • HTTP 404 if the property does not exist.

  • Common authentication and request errors are documented under Common Error Format.


Mark a property as featured.

POST/admins/properties/{property_id}/feature/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

HTTP 200

JSON
{
  "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 404 if the property does not exist.

  • Common authentication and request errors are documented under Common Error Format.


Remove featured status from a property.

POST/admins/properties/{property_id}/unfeature/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

HTTP 200

JSON
{
  "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 404 if the property does not exist.

  • Common authentication and request errors are documented under Common Error Format.


9. Delete Property

Delete a property.

DELETE/admins/properties/{property_id}/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

HTTP 200

JSON
{
  "success": true,
  "message": "Property deleted successfully.",
  "data": {}
}

Notes

  • Permanently deletes the property, including related records configured for cascading deletion.

  • HTTP 404 if 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.

POST/admins/properties/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Request Body

JSON
{
  "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

JSON
{
  "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_id must reference a user with seller_owner or admin role, including the logged-in admin. There is no automatic owner fallback.

  • agent_id is optional and nullable. A supplied user must have the agent role.

  • status accepts draft or available; defaults to draft. Publishing sets approved_by to the logged-in admin and sets approved_at. Drafts leave these values null.

  • property_type: land, house, villa, apartment, mansion. purpose: buy, rent, auction, invest.

  • price must be nonnegative. New properties use the configured platform currency, initially USD.

  • area_name is optional. latitude, longitude, bedrooms, bathrooms, and area_size are optional and nullable. Bedroom/bathroom counts and area size must be nonnegative.

  • area_unit: sqft, katha, bigha, acre; optional and may be blank.

  • amenity_ids is an optional list of unique active amenity IDs.

  • media is optional. Each item requires type (image, video, floor_plan, virtual_tour) and file_url; optional fields are thumbnail_url, is_primary (default false), and sort_order (default 0). At most one item may be primary.

  • resources is optional. Each item requires title, resource_type (architectural_plan, brochure, floor_plan, financial_projection, other), and file_url; optional fields are file_size (nullable) and sort_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 400 for 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.

PATCH/admins/properties/{property_id}/

Auth: Required

Headers

TEXT
Authorization: Bearer {{access_token}}

Request Body

JSON
{
  "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

JSON
{
  "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_id must belong to a seller or administrator.

  • agent_id must belong to an agent. Send null to remove the assigned agent.

  • Valid statuses are: draft, pending, available, reserved, transfer_pending, sold, rented, rejected, and hidden.

  • property_id must be a valid property UUID.

12. Bulk Property Action

Perform one action on multiple properties and return individual results.

POST/admins/properties/bulk-action/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Request Body

JSON
{
  "action": "approve",
  "property_ids": [
    "8d4b6d2e-1b7f-4a4b-8f2c-1efba83f9c91",
    "12e9939f-d46d-4ed8-84f2-e68f6beb0c86",
    "97f21387-40fe-4b2d-9313-969df10fb320"
  ]
}

Success Example

HTTP 200

JSON
{
  "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

  • action and property_ids are required. Supply 1-100 unique UUIDs.

  • approve: pending properties only; publishes and records approval metadata.

  • reject: pending properties only; requires a nonblank reason shared by all selected properties.

  • hide: rejects sold, rented, and transfer_pending; otherwise sets hidden.

  • unhide: rejects any property whose status is not hidden; otherwise sets status to available.

  • 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 in succeeded.

  • HTTP 200 and success: true mean 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 400 for 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.

  • reason is ignored for actions other than rejection.

  • Common authentication and request errors are documented under Common Error Format.

For rejection:

JSON
{
  "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.

POST/admins/properties/{property_id}/unhide/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

JSON
{
  "success": true,
  "message": "Property unhidden successfully.",
  "data": {
    "property": {
      "id": "9dc7a092-b173-4f14-a767-e74f5a620d38",
      "status": "available"
    }
  }
}

Notes

  • Only a property currently in the hidden state can be unhidden.

Common Success Format

JSON
{
  "success": true,
  "message": "Operation completed successfully.",
  "data": {}
}

Common Error Format

HTTP 400 - validation errors. Field names and messages depend on the failed validation.

JSON
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "field_name": [
      "Error message."
    ]
  }
}

HTTP 400 - invalid property state on an individual action:

JSON
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "non_field_errors": [
      "Only pending properties can be approved."
    ]
  }
}

HTTP 400 - bulk rejection without a reason:

JSON
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "reason": [
      "A reason is required for rejection."
    ]
  }
}

HTTP 401 - missing authentication:

JSON
{
  "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:

JSON
{
  "success": false,
  "message": "You do not have permission to perform this action.",
  "errors": {}
}

HTTP 404 - property not found on an individual endpoint:

JSON
{
  "success": false,
  "message": "Property not found.",
  "errors": {}
}