Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.foodsave.kz/llms.txt

Use this file to discover all available pages before exploring further.

Reviews API

Base path: /api/v1/reviews

Overview

Customer reviews are tied to completed orders and can be moderated by admins.
Only one review per order is allowed. Duplicate submissions are rejected.

POST /api/v1/reviews

Create a review after completing an order.
curl --request POST \
  --url https://api.foodsave.kz/api/v1/reviews \
  -H 'Authorization: Bearer $CUSTOMER_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"orderId":"o-1001","rating":5,"text":"Fresh and fast"}'
{ "id":"r-1", "orderId":"o-1001", "rating":5, "status":"PUBLISHED" }
id
string
status
string

Errors

CodeMeaningHow to fix
400VALIDATION_ERRORRating must be between 1 and 5
409CONFLICTReview for order already exists

GET /api/v1/reviews/partners/{id}

List reviews for a partner.
[{ "id":"r-1", "rating":5, "text":"Fresh and fast" }]

PUT /api/v1/reviews/{id}

Update your own review before moderation finalizes it.
{ "id":"r-1", "status":"PENDING" }

PUT /api/v1/reviews/admin/{id}/moderate

Moderate a review.
{ "id":"r-1", "status":"APPROVED" }

GET /api/v1/reviews/partners/{id}/rating

Return aggregate rating for a partner.
{ "partnerId":"p-1", "avgRating":4.8, "reviewCount":152 }