Appearance
Reviews, wishlist and receipts
13. Reviews
Source: routes/v1/review_route.js → review_controller.js, plus user_review_route.ts.
| # | Endpoint | Auth | Handler | Params |
|---|---|---|---|---|
| 13.1 | POST /api/v1/user/mobile/review | Customer | addReview | body payload: overallRating ✅ (1–5), productId ✅ (number), authCode ✅ (string), title, text, assets (string) |
| 13.2 | PUT /api/v1/user/mobile/review | Customer | updateReview | body payload: reviewId ✅ (number), overallRating (1–5), title, text, assets |
| 13.3 | GET /api/v1/user/mobile/review/:reviewId | Customer | getReviewById | path reviewId (number) ✅ |
| 13.4 | GET /api/v1/mobile/review/product/:productId | Brand | getAllReviews | path productId (number) ✅ |
| 13.5 | POST /api/v1/mobile/review/product-slug | Brand | getAllReviewsByProductSlug | body payload: slug ✅ (string) |
| 13.6 | GET /api/v1/user/mobile/review/product/:productId/allow | Customer | checkReviewForProduct | path productId (number) ✅ — call before showing the review form |
13.7 POST /api/v1/user/mobile/user-review/create — metric-based review
Auth: Customer · Handler: addUserReview (user_review_controller.ts) Body payload: overall_rating ✅ (1–5), productId ✅ (number), review_metric ✅ (array of { id ✅, rating ✅, comments }), title, description.
13.1/13.2 (
review) and 13.7 (user-review) are two different review systems on different tables.authCodeis mandatory for 13.1 — you can only review a product you scanned.
14. Wishlist
Source: routes/v1/wishlist_route.js → wishlist_controller.js · Auth: Customer on all.
| Endpoint | Handler | Params |
|---|---|---|
POST /api/v1/user/mobile/wishlist/create | addToWishlist | body payload: productId ✅ (number) |
GET /api/v1/user/mobile/wishlist | getUserWishlist | none |
DELETE /api/v1/user/mobile/wishlist/:wishlistId | removeWishlist | path wishlistId (number) ✅ |
DELETE /api/v1/user/mobile/wishlist | emptyWishlist | none |
15. Receipts
Source: routes/v1/receipt_route.js → receipt_controller.js · Auth: Customer on all.
15.1 POST /api/v1/user/mobile/receipt
Handler: addUserReceipt · Body payload:
| field | type | req | notes |
|---|---|---|---|
userReceipt | string | ✅ | receipt image URL (upload it first via §20) |
source | enum | ✅ | values of receipt_source_types: self, meadow, retail |
listed_hub_id | number | — | store it was bought from |
brl_id | number | — | links the receipt to a scan |
15.2 GET /api/v1/user/mobile/user-receipts
Handler: getReceiptsForCustomer · Query: limit, offset, status (keys of receiptStatusTypes: PENDING, APPROVED, REJECTED).
15.3 GET /api/v1/user/mobile/receipt-count
Handler: getAllReceiptStatusCount · No params. Counts per status.