Hoppa till innehållet

Recensioner

Product reviews: read the approved ones, submit a new one. Submissions are anonymous-capable and go through moderation before they appear.

2 anrop GET POST Bas-URL https://api.erp.fluit.cloud/ecom

Autentisering, felkoder, rate limits, idempotens och paginering gäller alla anrop och står samlade under Kom igång.

GET /catalog/products/{idOrSlug}/reviews

Get product reviews

Returns a page of approved reviews plus a rating summary (average and distribution) covering all approved reviews for the product on this channel.

Sökvägsparametrar

Fält Typ
idOrSlug Krävs string

Frågeparametrar

Fält Typ
page integer
pageSize integer
sort string

Svar

200 ProductReviewsResponse
Fält Typ
hasMore boolean
items ProductReview[] · nullable
page integer
pageSize integer
summary ProductReviewSummary
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standardfel: 404 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/ecom/catalog/products/{idOrSlug}/reviews" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "hasMore": true,
  "items": [
    {
      "author": "string",
      "date": "2026-06-11T09:24:13.418",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "isVerifiedPurchase": true,
      "rating": 42,
      "text": "string",
      "title": "string"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "summary": {
    "averageRating": "299.00",
    "distribution": [
      42
    ],
    "totalCount": 137
  }
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

POST /catalog/products/{idOrSlug}/reviews

Submit product review

Submits a review for a product on the current channel. The review is always created as pending and is not visible until a moderator approves it.

Sökvägsparametrar

Fält Typ
idOrSlug Krävs string

Body krävs

Fält Typ
authorEmail string · nullable
authorName string · nullable
body string · nullable
captchaToken string · nullable
formLoadedAtUnixMs integer · nullable
honeypot string · nullable
rating integer
title string · nullable

Svar

200 SubmitProductReviewResponse
Fält Typ
isVerifiedPurchase boolean
requiresModeration boolean
reviewId string(uuid)

Standardfel: 400 404 409 429 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/catalog/products/{idOrSlug}/reviews" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "isVerifiedPurchase": true,
  "requiresModeration": true,
  "reviewId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44"
}

Bas-URL https://api.erp.fluit.cloud/ecom. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

Scheman

Objekten som gruppens anrop refererar till. Fälttabellerna ovan går ett steg djupt och länkar hit i stället för att upprepa samma schema på varje endpoint.

ProductReview

ProductReviewResponse
Fält Typ
author string · nullable
date string(date-time)
id string(uuid)
isVerifiedPurchase boolean
rating integer
text string · nullable
title string · nullable

ProductReviewSummary

ProductReviewSummaryResponse
Fält Typ
averageRating decimal · nullable
distribution integer[] · nullable
totalCount integer