These public endpoints return reviews at the store level. For product-specific reviews, see Product Reviews.
GET /reviews/recent
Get recent high-rated reviews (4+ stars). Useful for homepage testimonial sections.
Authentication
None required.
Query Parameters
| Parameter | Type | Required | Description |
|---|
| limit | integer | No | Number of reviews (1-50). Default: 6 |
| type | string | No | Filter by review type: store (order reviews) or product (product reviews). Default: store |
Example Request
curl "https://front.rmz.gg/api/reviews/recent?limit=6&type=store"
Response
Success (200)
{
"success": true,
"data": [
{
"id": 1,
"rating": 5,
"comment": "Amazing store with fast delivery!",
"created_at": "2024-06-15T10:30:00.000000Z",
"reviewer": {
"id": 123,
"name": "Ahmed Ali"
},
"product": null
},
{
"id": 2,
"rating": 4,
"comment": "Great quality products",
"created_at": "2024-06-14T08:15:00.000000Z",
"reviewer": {
"id": 456,
"name": "Sara Mohammed"
},
"product": {
"id": 101,
"name": "Premium Game Key",
"slug": "premium-game-key"
}
}
]
}
When type=store, only order-level reviews (not associated with a specific product) are returned. When type=product, only product-specific reviews are returned.
GET /reviews
List all published reviews with filtering, sorting, and pagination.
Authentication
None required.
Query Parameters
| Parameter | Type | Required | Description |
|---|
| per_page | integer | No | Reviews per page (1-50). Default: 15 |
| rating | integer | No | Filter by exact rating (1-5) |
| type | string | No | Filter: store (order reviews) or product (product reviews) |
| product_id | integer | No | Filter by specific product ID |
| sort | string | No | Sort order: newest, oldest, highest, lowest. Default: newest |
Example Request
curl "https://front.rmz.gg/api/reviews?sort=highest&per_page=10"
Response
Success (200)
{
"success": true,
"data": [
{
"id": 1,
"rating": 5,
"comment": "Amazing store with fast delivery!",
"created_at": "2024-06-15T10:30:00.000000Z",
"reviewer": {
"id": 123,
"name": "Ahmed Ali"
},
"product": null
}
],
"pagination": {
"current_page": 1,
"last_page": 5,
"per_page": 10,
"total": 48,
"from": 1,
"to": 10,
"has_more_pages": true,
"next_page_url": "...",
"prev_page_url": null
}
}
GET /reviews/stats
Get aggregate review statistics for the store.
Authentication
None required.
Query Parameters
| Parameter | Type | Required | Description |
|---|
| type | string | No | Filter: store or product |
| product_id | integer | No | Get stats for a specific product |
Example Request
curl "https://front.rmz.gg/api/reviews/stats"
Response
Success (200)
{
"success": true,
"data": {
"total_reviews": 142,
"average_rating": 4.7,
"rating_distribution": {
"1": 2,
"2": 5,
"3": 15,
"4": 38,
"5": 82
}
}
}
Use the rating_distribution to render star distribution bars on your storefront. The keys represent star counts (1-5) and the values represent the number of reviews with that rating.