Administrator Review Management API
Base URL: http://localhost:8000/api/v1
Prefix: /admins
Auth: Required admin bearer token
Headers: Content-Type: application/json
1. List Reviews
List all reviews for admin moderation.
GET
/admins/reviews/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Reviews retrieved successfully.",
"data": {
"reviews": {
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "9b62e0f4-2e0f-4d3e-84c4-7d114e68a1a2",
"reviewer": {
"id": "57fd69dc-0ec8-4f9e-b745-3089a11fc5a7",
"full_name": "James Wilson",
"email": "james@example.com",
"phone": "+15125550102"
},
"property": {
"id": "45e6cf1b-179e-4c12-8f17-a7bb37570e23",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"city": "Austin",
"area_name": "Downtown",
"status": "available"
},
"target_user": {
"id": "949283c1-98cc-4ad4-b309-d3b06d7c8e8d",
"full_name": "Michael Carter",
"email": "seller@example.com",
"phone": "+15125550101"
},
"transaction_type": "rental",
"transaction_id": "bd23e297-194e-4f1d-8410-96dc8dd0477a",
"rating": 4,
"comment": "Good rental experience.",
"status": "published",
"created_at": "2026-08-05T10:30:00Z",
"updated_at": "2026-08-05T10:30:00Z"
}
]
}
}
}Notes
-
Only admin users can access this endpoint.
-
Optional query filter:
?status=published,?status=hidden,?status=rejected, or?status=reported. -
Results are paginated.
2. Review Details
Retrieve details for a single review.
GET
/admins/reviews/{review_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Review details retrieved successfully.",
"data": {
"review": {
"id": "9b62e0f4-2e0f-4d3e-84c4-7d114e68a1a2",
"reviewer": {
"id": "57fd69dc-0ec8-4f9e-b745-3089a11fc5a7",
"full_name": "James Wilson",
"email": "james@example.com",
"phone": "+15125550102"
},
"property": {
"id": "45e6cf1b-179e-4c12-8f17-a7bb37570e23",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"city": "Austin",
"area_name": "Downtown",
"status": "available"
},
"target_user": {
"id": "949283c1-98cc-4ad4-b309-d3b06d7c8e8d",
"full_name": "Michael Carter",
"email": "seller@example.com",
"phone": "+15125550101"
},
"transaction_type": "rental",
"transaction_id": "bd23e297-194e-4f1d-8410-96dc8dd0477a",
"rating": 4,
"comment": "Good rental experience.",
"status": "published",
"created_at": "2026-08-05T10:30:00Z",
"updated_at": "2026-08-05T10:30:00Z"
}
}
}Notes
{id}must be a review UUID.
3. Hide Review
Hide an inappropriate review from public surfaces.
POST
/admins/reviews/{review_id}/hide/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Review hidden successfully.",
"data": {
"review": {
"id": "9b62e0f4-2e0f-4d3e-84c4-7d114e68a1a2",
"reviewer": {
"id": "57fd69dc-0ec8-4f9e-b745-3089a11fc5a7",
"full_name": "James Wilson",
"email": "james@example.com",
"phone": "+15125550102"
},
"property": {
"id": "45e6cf1b-179e-4c12-8f17-a7bb37570e23",
"title": "Modern Apartment in Downtown",
"slug": "modern-apartment-in-downtown",
"city": "Austin",
"area_name": "Downtown",
"status": "available"
},
"target_user": {
"id": "949283c1-98cc-4ad4-b309-d3b06d7c8e8d",
"full_name": "Michael Carter",
"email": "seller@example.com",
"phone": "+15125550101"
},
"transaction_type": "rental",
"transaction_id": "bd23e297-194e-4f1d-8410-96dc8dd0477a",
"rating": 4,
"comment": "Good rental experience.",
"status": "hidden",
"created_at": "2026-08-05T10:30:00Z",
"updated_at": "2026-08-05T10:45:00Z"
}
}
}Notes
-
No request body is required.
-
Hidden reviews remain in the database but should not appear on public review surfaces.
4. Delete Review
Delete an inappropriate review permanently.
DELETE
/admins/reviews/{review_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Review deleted successfully.",
"data": {}
}Notes
-
{id}must be a review UUID. -
This permanently deletes the review record.
Common Success Format
{
"success": true,
"message": "Operation completed successfully.",
"data": {}
}Common Error Format
{
"success": false,
"message": "Validation failed.",
"errors": {
"field_name": [
"Error message."
]
}
}