Customer Review API
Base URL: http://localhost:8000/api/v1
Prefix: /customers
Auth: Customer JWT bearer token
Headers: Content-Type: application/json
1. List Customer Reviews
Returns reviews submitted by the authenticated customer.
GET
/customers/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": "a8ed69c8-9290-4a73-8c60-feb7815a5087",
"property": {
"id": "00aab84a-c95d-45c3-94c5-a60361434bb8",
"title": "Modern Apartment in South Congress",
"slug": "modern-apartment-in-south-congress",
"city": "Austin",
"area_name": "South Congress",
"status": "sold"
},
"seller": {
"id": "8935775e-cfaa-47d0-8830-986f88b1d695",
"full_name": "James Wilson"
},
"transaction_type": "purchase",
"transaction_id": "15537676-b847-47be-b644-3fd15c883015",
"rating": 5,
"comment": "The transaction went smoothly.",
"status": "published",
"created_at": "2026-10-08T10:30:00Z",
"updated_at": "2026-10-08T10:30:00Z"
}
]
}
}
}Notes
- Results are ordered from newest to oldest.
- The default page size is
12;page_sizecan request up to50results. - Returns
401when authentication is missing or invalid. - Returns
403when the authenticated account does not have a customer role.
2. Submit Customer Review
Submits a review for the seller or landlord connected to an eligible transaction.
POST
/customers/reviews/Auth: Required
Headers
Authorization: Bearer {{access_token}}
Content-Type: application/jsonRequest Body
{
"transaction_type": "purchase",
"transaction_id": "15537676-b847-47be-b644-3fd15c883015",
"rating": 5,
"comment": "The seller was helpful and the transaction went smoothly."
}Success Example
{
"success": true,
"message": "Review submitted successfully.",
"data": {
"review": {
"id": "a8ed69c8-9290-4a73-8c60-feb7815a5087",
"property": {
"id": "00aab84a-c95d-45c3-94c5-a60361434bb8",
"title": "Modern Apartment in South Congress",
"slug": "modern-apartment-in-south-congress",
"city": "Austin",
"area_name": "South Congress",
"status": "sold"
},
"seller": {
"id": "8935775e-cfaa-47d0-8830-986f88b1d695",
"full_name": "James Wilson"
},
"transaction_type": "purchase",
"transaction_id": "15537676-b847-47be-b644-3fd15c883015",
"rating": 5,
"comment": "The seller was helpful and the transaction went smoothly.",
"status": "published",
"created_at": "2026-10-08T10:30:00Z",
"updated_at": "2026-10-08T10:30:00Z"
}
}
}Notes
transaction_typemust bepurchaseorrental.- A purchase review uses the purchase ID and requires a purchase owned by the customer with status
completed. - A rental review uses the rental application ID exposed by deal history and requires its related lease to have status
activeorended. ratingmust be an integer from1to5;commentis optional.- The backend derives the reviewer, property, and seller from the transaction.
- Only one review is allowed per customer transaction.
- Returns
400for invalid input, an ineligible or unrelated transaction, or a duplicate review. - Returns
401when authentication is missing or invalid. - Returns
403when the authenticated account does not have a customer role.
3. Get Customer Review
Returns one review owned by the authenticated customer.
GET
/customers/reviews/{review_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Review retrieved successfully.",
"data": {
"review": {
"id": "a8ed69c8-9290-4a73-8c60-feb7815a5087",
"property": {
"id": "00aab84a-c95d-45c3-94c5-a60361434bb8",
"title": "Modern Apartment in South Congress",
"slug": "modern-apartment-in-south-congress",
"city": "Austin",
"area_name": "South Congress",
"status": "sold"
},
"seller": {
"id": "8935775e-cfaa-47d0-8830-986f88b1d695",
"full_name": "James Wilson"
},
"transaction_type": "purchase",
"transaction_id": "15537676-b847-47be-b644-3fd15c883015",
"rating": 5,
"comment": "The seller was helpful and the transaction went smoothly.",
"status": "published",
"created_at": "2026-10-08T10:30:00Z",
"updated_at": "2026-10-08T10:30:00Z"
}
}
}Notes
- The customer can retrieve only reviews they submitted.
- Returns
401when authentication is missing or invalid. - Returns
403when the authenticated account does not have a customer role. - Returns
404when the review does not exist or belongs to another customer.
4. Update Customer Review
Updates the rating, comment, or both for a review owned by the authenticated customer.
PATCH
/customers/reviews/{review_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}
Content-Type: application/jsonRequest Body
{
"rating": 4,
"comment": "The transaction was completed successfully."
}Success Example
{
"success": true,
"message": "Review updated successfully.",
"data": {
"review": {
"id": "a8ed69c8-9290-4a73-8c60-feb7815a5087",
"property": {
"id": "00aab84a-c95d-45c3-94c5-a60361434bb8",
"title": "Modern Apartment in South Congress",
"slug": "modern-apartment-in-south-congress",
"city": "Austin",
"area_name": "South Congress",
"status": "sold"
},
"seller": {
"id": "8935775e-cfaa-47d0-8830-986f88b1d695",
"full_name": "James Wilson"
},
"transaction_type": "purchase",
"transaction_id": "15537676-b847-47be-b644-3fd15c883015",
"rating": 4,
"comment": "The transaction was completed successfully.",
"status": "published",
"created_at": "2026-10-08T10:30:00Z",
"updated_at": "2026-10-08T11:15:00Z"
}
}
}Notes
- At least one of
ratingorcommentmust be provided. ratingmust be an integer from1to5.- Transaction, property, seller, reviewer, and moderation status cannot be changed.
- Updating a hidden review does not publish it again.
- Returns
400when the request is empty or contains invalid values. - Returns
401when authentication is missing or invalid. - Returns
403when the authenticated account does not have a customer role. - Returns
404when the review does not exist or belongs to another customer.
5. Delete Customer Review
Permanently deletes a review owned by the authenticated customer.
DELETE
/customers/reviews/{review_id}/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "Review deleted successfully.",
"data": {}
}Notes
- The customer can delete only reviews they submitted.
- Deletion is permanent.
- Returns
401when authentication is missing or invalid. - Returns
403when the authenticated account does not have a customer role. - Returns
404when the review does not exist or belongs to another customer.
Common Success Format
{
"success": true,
"message": "Operation completed successfully.",
"data": {}
}Common Error Format
{
"success": false,
"message": "Validation failed.",
"errors": {
"field_name": [
"Error message."
]
}
}