Reviews
Submit, edit, delete user reviews; fetch reviews for an item or the caller's own.
Reviewable items are upserted on first submission. Average + count aggregates on reviewable_items are recomputed on every write.
Source: apps/api/src/routes/client/reviews.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /client/reviews | Submit a review. |
| GET | /client/reviews/item/:itemType/:itemId | Approved reviews for an item + aggregates. |
| GET | /client/reviews/mine | Caller's reviews with item metadata. |
| PATCH | /client/reviews/:reviewId | Update the caller's review. |
| DELETE | /client/reviews/:reviewId | Delete the caller's review. |
POST /client/reviews
Request (SubmitReviewInput)
| Field | Type | Required | Default |
|---|---|---|---|
item_type | string | no | "custom" |
item_id | string | yes | — |
rating | 1-5 | yes | — |
title | string | no | null |
body | string | no | null |
Response 201
Errors
409 ALREADY_REVIEWED— one review per (user, item).500 CREATE_FAILED.
Try it:
POST
client auth/client/reviewscurl -X POST 'https://api.amba.dev/client/reviews'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
GET /client/reviews/item/:itemType/:itemId
Approved reviews only, plus item aggregates.
Query
| Param | Default |
|---|---|
limit | 20 |
offset | 0 |
Response 200
Try it:
GET
client auth/client/reviews/item/%7B%7BitemType%7D%7D/%7B%7BitemId%7D%7Dcurl -X GET 'https://api.amba.dev/client/reviews/item/%7B%7BitemType%7D%7D/%7B%7BitemId%7D%7D'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
GET /client/reviews/mine
Response 200
Try it:
GET
client auth/client/reviews/minecurl -X GET 'https://api.amba.dev/client/reviews/mine'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
PATCH /client/reviews/:reviewId
Update rating, title, and/or body. Only the review's author can edit — others get 404 UPDATE_FAILED.
Errors
400 INVALID_INPUT— no updatable fields.404 UPDATE_FAILED.500 UPDATE_FAILED.
Try it:
PATCH
client auth/client/reviews/%7B%7BreviewId%7D%7Dcurl -X PATCH 'https://api.amba.dev/client/reviews/%7B%7BreviewId%7D%7D'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
DELETE /client/reviews/:reviewId
Only the author can delete. Aggregates on reviewable_items are recomputed.
Response 200
Try it:
DELETE
client auth/client/reviews/%7B%7BreviewId%7D%7Dcurl -X DELETE 'https://api.amba.dev/client/reviews/%7B%7BreviewId%7D%7D'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl: