TrackMe API Docs
Flow guides

Reviews

Create, edit, and delete reviews, including why owner-side review removal is admin-only.

Reviews attach to a truck (a general rating) or to a specific order (post-purchase). Creation lives with those flows; this page covers the review's own lifecycle — the 24-hour edit window, image management, and who can remove a review.

All endpoints here require Authorization: Bearer <oat_…>.

You can only edit or delete your own review, and only within 24 hours of posting it. After that the API returns 409 REVIEW_EDIT_WINDOW_CLOSED. There is no "delete my old review" after the window — the user must file a report and an admin handles it. Owners can never delete reviews on their truck.

Where reviews are created

You want to review…EndpointDocumented in
a truck (general)POST /api/v1/trucks/:truckId/reviewsDiscovery & Search
an order (post-purchase)POST /api/v1/orders/:id/reviewOrder lifecycle

Both accept rating (1–5) + comment, and an optional fileIds array of review images (mint those first via Uploads with purpose=review_image).

The edit window

Step 1 — Post the review

Create it from the truck or order flow above. The 24-hour edit window starts at creation.

Step 2 — Edit text/rating (optional, within 24h)

PATCH /api/v1/reviews/:id
Authorization: Bearer <oat_…>
Content-Type: application/json

{ "rating": 4, "comment": "Updated after a second visit — still great." }

Author-only. After 24h → 409 REVIEW_EDIT_WINDOW_CLOSED.

Step 3 — Manage images (optional, within 24h)

Replace the whole image set (omitted ids are detached; array order = display order):

PATCH /api/v1/reviews/:id/images
Authorization: Bearer <oat_…>
Content-Type: application/json

{ "fileIds": ["fil_01jq8z9b3d5f7h9k1m3n5p7q9r"] }

Or remove a single image:

DELETE /api/v1/reviews/:id/images/:imageId
Authorization: Bearer <oat_…>

Step 4 — Delete your review (optional, within 24h)

DELETE /api/v1/reviews/:id
Authorization: Bearer <oat_…>

Soft-delete: it vanishes from public surfaces and rating aggregates, but the row is kept for audit. After 24h → 409.

Moderation (not the mobile app)

Removing a review after the window, or removing someone else's review, is an admin action, reached by the customer through the report flow (Reporting content). Admin can strip flagged images, soft-delete, and restore. None of this is exposed to the owner or customer apps directly.

Implementation Notes

Integration issueCorrect handling
Trying to PATCH/DELETE a review after 24h and treating the 409 as retryableThe edit window is closed. Route the user to "report this review" instead.
Sending raw image bytes to the review endpointsUpload first (Uploads), then pass fileIds.
Expecting an owner endpoint to delete an unfavorable reviewNo owner endpoint exists for review deletion. Owners can reply or report; only admins remove.
Using imageFileIds for the field nameIt is fileIds.

On this page