SwiftGoma.SwiftGoma

Search endpoints

Jump to any API endpoint by name, method, or path

Reviews

Submit a review

POST/api/v1/products/:productId/reviews

Leaves or updates a rating and comment on a product. Only buyers who have received the product (order status DELIVERED or COMPLETED) can review it — one review per product per buyer.

Requires Authorization
Authenticated action

Path parameters

productIdstringrequired
Product ID.

Body parameters

ratingnumberrequired
Integer, 1–5.
commentstringrequired
Up to 1000 characters.

Possible errors

403FORBIDDENVous devez avoir reçu ce produit pour laisser un avis.

Notes

  • Submitting again for the same product replaces the previous review instead of creating a second one.
Request
curl --request POST \
  --url https://api.swiftgoma.com/api/v1/products/:productId/reviews \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "rating": "<rating>",
  "comment": "<comment>"
}'
201Example response
{
  "success": true,
  "data": {
    "id": "rev_1",
    "productId": "prod_7c8d9e",
    "userId": "3f2a1c9e",
    "rating": 5,
    "comment": "Excellent produit, livraison rapide.",
    "createdAt": "2026-02-15T10:00:00.000Z"
  }
}