Review Management
9 API calls in this section.
List Reviews (Admin)
/storefront/reviews?page=1&limit=10&status=pending&statuses=approved,pending&search=great product&lang=en&rating=5&ratings=4,5&min_rating=3&max_rating=5&start_date=2025-01-01T00:00:00Z&end_date=2025-12-31T23:59:59Z&product_id=product-uuid-123&variant_id=variant-uuid-123Retrieves reviews for admin moderation with advanced filtering and pagination. Only accessible by tenant administrators for review management. Authentication: - Required: Valid Bearer token with tenant admin permissions Query Parameters: - page (optional): Page number for pagination (default: 1) - limit (optional): Items per page (default: 10, max: 100) - status (optional): Filter by single moderation status (pending, approved, rejected) - statuses (optional): Comma-separated list of statuses (takes precedence over status) - search (optional): Search reviews by title or comment content - lang (optional): Language for multilingual fields search (default: context lang) - rating (optional): Filter by a single rating (1-5) - ratings (optional): Comma-separated list of ratings (1-5) - min_rating (optional): Minimum rating (inclusive) - max_rating (optional): Maximum rating (inclusive) - start_date (optional): Start of created_at range (ISO 8601) - end_date (optional): End of created_at range (ISO 8601) - product_id (optional): Filter reviews for specific product - variant_id (optional): Filter reviews for specific variant Search & Filter Features: - Content Search: Find reviews by title or comment text - Rating Filtering: Single, multi-select, or range (min/max) - Product/Variant Filtering: Use product_id and/or variant_id - Status Filtering: Single or multiple statuses - Date Range: Filter by created_at interval - Combination Filters: Use multiple filters together for precise results Features: - Admin-only access for moderation - Advanced search and filtering capabilities - Status-based filtering for workflow management - Content-based search for quality control - Rating-based filtering for sentiment analysis - Product/variant-specific review management - Paginated results for large review volumes - Complete review details with user information - Product context for moderation decisions - Moderation history tracking - Order verification for purchase validation Review Statuses: - Pending: Newly submitted, awaiting moderation - Approved: Reviewed and approved for public display - Rejected: Reviewed and rejected (not shown publicly) Response Data: - Complete review details with ratings - User information (anonymized if needed) - Product variant details for context - Order information for purchase verification - Submission and moderation timestamps - Admin responses and moderation history Use Cases: - Review moderation dashboard - Quality control workflows - Bulk review processing - Content management systems - Customer service oversight - Product quality analysis - Sentiment monitoring - Spam detection workflows
1curl --request GET "$ONDI_BASE_URL/storefront/reviews?page=1&limit=10&status=pending&statuses=approved,pending&search=great product&lang=en&rating=5&ratings=4,5&min_rating=3&max_rating=5&start_date=2025-01-01T00:00:00Z&end_date=2025-12-31T23:59:59Z&product_id=product-uuid-123&variant_id=variant-uuid-123" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
pageOptional1
Page number for pagination (default: 1)
limitOptional10
Items per page (default: 10, max: 100)
statusOptionalpending
Filter by review status: pending, approved, rejected. Default when omitted: pending
statusesOptionalapproved,pending
Filter by multiple statuses (comma-separated): pending, approved, rejected
searchOptionalgreat product
Search reviews by title or comment content
langOptionalen
Language code for multilingual search on title/comment (default: context lang)
ratingOptional5
Filter reviews by specific rating (1-5 stars)
ratingsOptional4,5
Filter by multiple ratings (comma-separated)
min_ratingOptional3
Minimum rating (inclusive)
max_ratingOptional5
Maximum rating (inclusive)
start_dateOptional2025-01-01T00:00:00Z
Start of created_at date range (ISO 8601)
end_dateOptional2025-12-31T23:59:59Z
End of created_at date range (ISO 8601)
product_idOptionalproduct-uuid-123
Filter reviews for specific product
variant_idOptionalvariant-uuid-123
Filter reviews for specific variant
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for tenant admin users (required)
Responses
1{2 "success": true,3 "reviews": [4 {5 "id": "review-uuid-1",6 "variant_id": "variant-uuid-123",7 "user_id": "user-uuid-456",8 "order_id": "order-uuid-789",9 "rating": 5,10 "title": {11 "en": "Excellent product!",12 "ar": "منتج ممتاز!",13 "ku": "بەرهەمێکی نایاب!"14 },15 "comment": {16 "en": "Really happy with this purchase. Great quality and fast delivery.",17 "ar": "سعيد جداً بهذا الشراء. جودة رائعة وتسليم سريع.",18 "ku": "زۆر دڵخۆشم بەم کڕینە. کوالیتی باش و گەیاندنی خێرا."19 },20 "status": "pending",21 "admin_response": null,22 "created_at": "2023-12-01T10:00:00Z",23 "updated_at": "2023-12-01T10:00:00Z",24 "user": {25 "id": "user-uuid-456",26 "full_name": "John Doe",27 "email": "john****@example.com"28 },29 "variant": {30 "id": "variant-uuid-123",31 "name": {32 "en": "iPhone 15 Pro - 256GB",33 "ar": "آيفون 15 برو - 256 جيجابايت",34 "ku": "ئایفۆن 15 پرۆ - 256 گیگابایت"35 },36 "price": 999.99,37 "storefront_products": {38 "id": "product-uuid-123",39 "name": {40 "en": "iPhone 15 Pro",41 "ar": "آيفون 15 برو",42 "ku": "ئایفۆن 15 پرۆ"43 }44 }45 },46 "order": {47 "id": "order-uuid-789",48 "status": "delivered"49 },50 "is_approved": false,51 "is_pending": true,52 "is_rejected": false53 }54 ],55 "pagination": {56 "page": 1,57 "limit": 10,58 "total": 1,59 "totalPages": 160 }61}1{2 "success": true,3 "reviews": [],4 "pagination": {5 "page": 1,6 "limit": 10,7 "total": 0,8 "totalPages": 09 }10}1{2 "success": false,3 "message": "Unauthorized"4}Moderate Review
/storefront/reviews/:review_id/moderateApproves or rejects a review submission. Only accessible by tenant administrators with moderation capabilities. Authentication: - Required: Valid Bearer token with tenant admin permissions Path Parameters: - review_id (required): UUID of the review to moderate Request Body: - action (required): Moderation action ('approve' or 'reject') - admin_response (optional): Multi-language admin response to the review (applies to both approve and reject) Moderation Actions: - approve: Makes the review visible to public users - reject: Hides the review from public display Admin Response: - Multi-language support for admin responses - Optional field for public admin replies - Displayed alongside approved reviews Features: - Audit trail with moderator identification - Multi-language admin responses - Status change logging - Notification triggers (if configured) - Reversible moderation decisions Business Rules: - Only pending reviews can be moderated - Moderation action is logged with timestamp - Moderator ID is recorded for accountability - Status changes are permanent until re-moderated - Admin responses are public when review is approved Response Data: - Updated review with new status - Moderation timestamp and moderator info - Admin response (if provided) Use Cases: - Quality control workflows - Content moderation - Review approval processes - Spam and inappropriate content filtering - Customer service dispute resolution - Public admin responses to reviews
1curl --request PUT "$ONDI_BASE_URL/storefront/reviews/:review_id/moderate" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "action": "approve",7 "admin_response": {8 "en": "Thank you for your detailed review!",9 "ar": "شكراً لك على مراجعتك المفصلة!",10 "ku": "سوپاس بۆ پێداچوونەوە وردەکەت!"11 }12}'1{2 "action": "approve",3 "admin_response": {4 "en": "Thank you for your detailed review!",5 "ar": "شكراً لك على مراجعتك المفصلة!",6 "ku": "سوپاس بۆ پێداچوونەوە وردەکەت!"7 }8}Path parameters
review_idRequiredreview-uuid-123
UUID of the review to moderate
Request body fields
actionExampleExample field from the request body.
admin_responseExampleExample field from the request body.
admin_response.enExampleExample field from the request body.
admin_response.arExampleExample field from the request body.
admin_response.kuExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for tenant admin users (required)
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "review": {4 "id": "review-uuid-123",5 "variant_id": "variant-uuid-456",6 "user_id": "user-uuid-789",7 "order_id": "order-uuid-101",8 "rating": 5,9 "title": {10 "en": "Excellent product!"11 },12 "comment": {13 "en": "Really happy with this purchase. Great quality and fast delivery."14 },15 "status": "approved",16 "admin_response": {17 "en": "Thank you for your detailed review!",18 "ar": "شكراً لك على مراجعتك المفصلة!"19 },20 "created_at": "2023-12-01T10:00:00Z",21 "updated_at": "2023-12-01T18:00:00Z",22 "is_approved": true,23 "is_pending": false,24 "is_rejected": false25 },26 "message": "Review approved successfully"27}1{2 "success": true,3 "review": {4 "id": "review-uuid-456",5 "status": "rejected",6 "admin_response": {7 "en": "Review contains inappropriate language and does not provide constructive feedback."8 },9 "updated_at": "2023-12-01T18:15:00Z",10 "is_approved": false,11 "is_pending": false,12 "is_rejected": true13 },14 "message": "Review rejected successfully"15}1{2 "success": false,3 "message": "Review not found"4}1{2 "success": false,3 "message": "Validation failed",4 "errors": [5 {6 "field": "action",7 "message": "Action must be 'approve' or 'reject'"8 }9 ]10}Bulk Moderate Reviews (Admin)
/storefront/reviews/bulk-moderateBulk approve or reject multiple reviews. Only reviews with status 'pending' are updated. Authentication: - Required: Valid Bearer token with tenant admin permissions Endpoints: - POST /storefront/reviews/bulk-moderate Request Body (choose one targeting method): - review_ids (array of UUIDs): Explicit list of review IDs - filters (object): Criteria to select reviews Common Fields: - action (required): 'approve' | 'reject' - admin_response (optional): multilingual map to set admin_response directly Supported Filters: - ratings: array of integers 1-5 - rating: single integer 1-5 - min_rating / max_rating - start_date / end_date (ISO 8601) - product_id (preferred) or legacy catalog_item_id - variant_id Notes: - Only 'pending' reviews are modified - Selection is scoped to the current tenant's market - Response reports matched vs updated counts
1curl --request POST "$ONDI_BASE_URL/storefront/reviews/bulk-moderate" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "action": "approve",7 "review_ids": [8 "review-uuid-1",9 "review-uuid-2"10 ]11}'1{2 "action": "approve",3 "review_ids": [4 "review-uuid-1",5 "review-uuid-2"6 ]7}Request body fields
actionExampleExample field from the request body.
review_idsExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for tenant admin users (required)
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "action": "approve",4 "matched": 2,5 "updated": 26}1{2 "success": true,3 "action": "reject",4 "matched": 12,5 "updated": 106}Bulk Moderate Reviews by Filters (Admin)
/storefront/reviews/bulk-moderateBulk approve or reject using filter criteria. Only reviews with status 'pending' are updated. Request Body: - action (required): 'approve' | 'reject' - admin_response (optional): multilingual map applied to affected reviews - filters (required if no review_ids): - ratings: array of integers 1-5 - rating: single integer 1-5 - min_rating, max_rating: inclusive bounds - start_date, end_date: ISO timestamps on created_at - product_id (preferred) or legacy catalog_item_id - variant_id Response returns matched and updated counts.
1curl --request POST "$ONDI_BASE_URL/storefront/reviews/bulk-moderate" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "action": "reject",7 "admin_response": {8 "en": "Fails moderation policy"9 },10 "filters": {11 "ratings": [12 1,13 214 ],15 "min_rating": 1,16 "max_rating": 2,17 "start_date": "2025-01-01T00:00:00Z",18 "end_date": "2025-12-31T23:59:59Z",19 "product_id": "product-uuid-123",20 "variant_id": "variant-uuid-123"21 }22}'1{2 "action": "reject",3 "admin_response": {4 "en": "Fails moderation policy"5 },6 "filters": {7 "ratings": [8 1,9 210 ],11 "min_rating": 1,12 "max_rating": 2,13 "start_date": "2025-01-01T00:00:00Z",14 "end_date": "2025-12-31T23:59:59Z",15 "product_id": "product-uuid-123",16 "variant_id": "variant-uuid-123"17 }18}Request body fields
actionExampleExample field from the request body.
admin_responseExampleExample field from the request body.
admin_response.enExampleExample field from the request body.
filtersExampleExample field from the request body.
filters.ratingsExampleExample field from the request body.
filters.min_ratingExampleExample field from the request body.
filters.max_ratingExampleExample field from the request body.
filters.start_dateExampleExample field from the request body.
filters.end_dateExampleExample field from the request body.
filters.product_idExampleExample field from the request body.
filters.variant_idExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for tenant admin users (required)
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "action": "reject",4 "matched": 7,5 "updated": 76}Submit Review
/storefront/reviewsAllows customers to submit reviews for products they have purchased and received. Client submits variant_id for provenance; server derives and stores product_id for product-level display/aggregation. Authentication: - Required: Valid Bearer token for customer identification Request Body: - variant_id (required): UUID of the product variant being reviewed (provenance) - rating (required): Rating from 1-5 stars - title (optional): Short review title (max 100 characters) - comment (optional): Detailed review text (max 1000 characters) Purchase Verification: - System validates user has a delivered order containing the variant - Review is linked to the order for verification Features: - Verified purchase enforcement - Rating validation (1-5 stars) - Multi-language content support - Duplicate review prevention (one review per user per product) - Auto-moderation support (pending/approved) - Review submission tracking Business Rules: - User must be authenticated - User must have a delivered order containing the variant - Rating must be between 1-5 - One review per product per user (variant_id is just provenance) - Content must pass validation Response Data: - Created review with moderation status - product_id stored for product-level aggregation - Linked order information - Submission timestamp - Review ID for tracking
1curl --request POST "$ONDI_BASE_URL/storefront/reviews" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "variant_id": "variant-uuid-123",7 "rating": 4,8 "title": "Good product overall",9 "comment": "The product works well and meets my expectations. Delivery was quick and packaging was secure. Would recommend to others."10}'1{2 "variant_id": "variant-uuid-123",3 "rating": 4,4 "title": "Good product overall",5 "comment": "The product works well and meets my expectations. Delivery was quick and packaging was secure. Would recommend to others."6}Request body fields
variant_idExampleExample field from the request body.
ratingExampleExample field from the request body.
titleExampleExample field from the request body.
commentExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for authenticated users (required)
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "review": {4 "id": "review-uuid-new",5 "variant_id": "variant-uuid-123",6 "user_id": "user-uuid-789",7 "order_id": "order-uuid-456",8 "rating": 4,9 "title": {10 "en": "Good product overall"11 },12 "comment": {13 "en": "The product works well and meets my expectations. Delivery was quick and packaging was secure. Would recommend to others."14 },15 "status": "pending",16 "admin_response": null,17 "created_at": "2023-12-01T19:00:00Z",18 "updated_at": "2023-12-01T19:00:00Z",19 "is_approved": false,20 "is_pending": true,21 "is_rejected": false22 },23 "message": "Review submitted successfully and is pending moderation"24}1{2 "success": false,3 "message": "You can only review products that you have ordered and received"4}1{2 "success": false,3 "message": "You have already reviewed this product variant"4}1{2 "success": false,3 "message": "Validation failed",4 "errors": [5 {6 "field": "rating",7 "message": "Rating must be between 1 and 5"8 }9 ]10}Get Product Reviews (Public)
/storefront/products/:product_id/reviews?page=1&limit=10Retrieves approved reviews for all variants of a specific product. Public endpoint that aggregates reviews from all product variants and shows only approved reviews with rating statistics. Authentication: - Optional: No authentication required for public access Path Parameters: - product_id (required): UUID of the product to get reviews for Query Parameters: - page (optional): Page number for pagination (default: 1) - limit (optional): Items per page (default: 10, max: 100) Features: - Public access to approved reviews only - Aggregates reviews from all product variants - Comprehensive rating statistics - Rating distribution breakdown - Purchase verification indicators - User anonymization for privacy - Multi-language content support Response Data: - Only approved reviews from all variants - Average rating calculation across all variants - Rating count by stars (1-5) - Total review count - User information (anonymized) - Variant information for context - Purchase verification status - Admin responses (if any) Use Cases: - Product page review display - Rating and review widgets - Customer decision support - SEO content for product pages - Social proof display - Product comparison features
1curl --request GET "$ONDI_BASE_URL/storefront/products/:product_id/reviews?page=1&limit=10" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
product_idRequiredproduct-uuid-123
UUID of the product to get reviews for
Query parameters
pageOptional1
Page number for pagination (default: 1)
limitOptional10
Items per page (default: 10, max: 100)
Responses
1{2 "success": true,3 "review_data": {4 "reviews": [5 {6 "id": "review-uuid-1",7 "variant_id": "variant-uuid-123",8 "user_id": "user-uuid-456",9 "order_id": "order-uuid-789",10 "rating": 5,11 "title": {12 "en": "Excellent product!"13 },14 "comment": {15 "en": "Really happy with this purchase. Great quality and fast delivery."16 },17 "status": "approved",18 "admin_response": {19 "en": "Thank you for your feedback!"20 },21 "created_at": "2023-12-01T10:00:00Z",22 "updated_at": "2023-12-01T11:00:00Z",23 "user": {24 "id": "user-uuid-456",25 "full_name": "John D.",26 "email": "john****@example.com"27 },28 "variant": {29 "id": "variant-uuid-123",30 "name": {31 "en": "iPhone 15 Pro - 256GB"32 },33 "price": 999.99,34 "storefront_products": {35 "id": "product-uuid-123",36 "name": {37 "en": "iPhone 15 Pro",38 "ar": "آيفون 15 برو"39 }40 }41 },42 "is_approved": true,43 "is_pending": false,44 "is_rejected": false45 },46 {47 "id": "review-uuid-2",48 "variant_id": "variant-uuid-456",49 "user_id": "user-uuid-789",50 "order_id": "order-uuid-101",51 "rating": 4,52 "title": {53 "en": "Good value for money"54 },55 "comment": {56 "en": "Product works as expected. Minor issues with setup but overall satisfied."57 },58 "status": "approved",59 "admin_response": null,60 "created_at": "2023-11-28T15:30:00Z",61 "updated_at": "2023-11-28T16:00:00Z",62 "user": {63 "id": "user-uuid-789",64 "full_name": "Sarah M.",65 "email": "sarah****@example.com"66 },67 "variant": {68 "id": "variant-uuid-456",69 "name": {70 "en": "iPhone 15 Pro - 512GB"71 },72 "price": 1199.99,73 "storefront_products": {74 "id": "product-uuid-123",75 "name": {76 "en": "iPhone 15 Pro",77 "ar": "آيفون 15 برو"78 }79 }80 },81 "is_approved": true,82 "is_pending": false,83 "is_rejected": false84 }85 ],86 "statistics": {87 "total_reviews": 2,88 "average_rating": 4.5,89 "rating_counts": {90 "1": 0,91 "2": 0,92 "3": 0,93 "4": 1,94 "5": 195 }96 },97 "pagination": {98 "page": 1,99 "limit": 10,100 "total": 2,101 "totalPages": 1102 }103 }104}1{2 "success": true,3 "review_data": {4 "reviews": [],5 "statistics": {6 "total_reviews": 0,7 "average_rating": 0,8 "rating_counts": {9 "1": 0,10 "2": 0,11 "3": 0,12 "4": 0,13 "5": 014 }15 },16 "pagination": {17 "page": 1,18 "limit": 10,19 "total": 0,20 "totalPages": 021 }22 }23}Get Variant Reviews (Public)
/storefront/variants/:variant_id/reviews?page=1&limit=10Retrieves approved reviews for a specific product variant. Public endpoint that shows only approved reviews with rating statistics specific to this variant. Authentication: - Optional: No authentication required for public access Path Parameters: - variant_id (required): UUID of the product variant to get reviews for Query Parameters: - page (optional): Page number for pagination (default: 1) - limit (optional): Items per page (default: 10, max: 100) Features: - Public access to approved reviews only - Variant-specific review filtering - Comprehensive rating statistics for this variant - Rating distribution breakdown - Purchase verification indicators - User anonymization for privacy - Multi-language content support - Admin responses display Response Data: - Only approved reviews for this specific variant - Average rating calculation for this variant - Rating count by stars (1-5) for this variant - Total review count for this variant - User information (anonymized) - Variant information for context - Purchase verification status - Admin responses (if any) Use Cases: - Variant-specific review display - Detailed product variant analysis - Variant comparison features - Specific variant decision support - Variant-level rating widgets
1curl --request GET "$ONDI_BASE_URL/storefront/variants/:variant_id/reviews?page=1&limit=10" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
variant_idRequiredvariant-uuid-123
UUID of the product variant to get reviews for
Query parameters
pageOptional1
Page number for pagination (default: 1)
limitOptional10
Items per page (default: 10, max: 100)
Responses
1{2 "success": true,3 "review_data": {4 "reviews": [5 {6 "id": "review-uuid-1",7 "variant_id": "variant-uuid-123",8 "user_id": "user-uuid-456",9 "order_id": "order-uuid-789",10 "rating": 5,11 "title": {12 "en": "Excellent variant!",13 "ar": "نموذج ممتاز!"14 },15 "comment": {16 "en": "This specific variant works perfectly. The 256GB storage is exactly what I needed.",17 "ar": "هذا النموذج المحدد يعمل بشكل مثالي. مساحة التخزين 256 جيجابايت هي بالضبط ما احتجته."18 },19 "status": "approved",20 "admin_response": {21 "en": "Thank you for the detailed feedback on this variant!"22 },23 "created_at": "2023-12-01T10:00:00Z",24 "updated_at": "2023-12-01T11:00:00Z",25 "user": {26 "id": "user-uuid-456",27 "full_name": "John D.",28 "email": "john****@example.com"29 },30 "variant": {31 "id": "variant-uuid-123",32 "name": {33 "en": "iPhone 15 Pro - 256GB",34 "ar": "آيفون 15 برو - 256 جيجابايت"35 },36 "price": 999.99,37 "storefront_products": {38 "id": "product-uuid-123",39 "name": {40 "en": "iPhone 15 Pro",41 "ar": "آيفون 15 برو"42 }43 }44 },45 "is_approved": true,46 "is_pending": false,47 "is_rejected": false48 }49 ],50 "statistics": {51 "total_reviews": 1,52 "average_rating": 5,53 "rating_counts": {54 "1": 0,55 "2": 0,56 "3": 0,57 "4": 0,58 "5": 159 }60 },61 "pagination": {62 "page": 1,63 "limit": 10,64 "total": 1,65 "totalPages": 166 }67 }68}1{2 "success": true,3 "review_data": {4 "reviews": [],5 "statistics": {6 "total_reviews": 0,7 "average_rating": 0,8 "rating_counts": {9 "1": 0,10 "2": 0,11 "3": 0,12 "4": 0,13 "5": 014 }15 },16 "pagination": {17 "page": 1,18 "limit": 10,19 "total": 0,20 "totalPages": 021 }22 }23}Check Review Eligibility
/storefront/variants/:variant_id/review-eligibilityChecks whether the current user is eligible to review the given variant. Rules: - Authentication required - Must have a delivered order containing the variant - Must not have already reviewed it
1curl --request GET "$ONDI_BASE_URL/storefront/variants/:variant_id/review-eligibility" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
variant_idRequiredvariant-uuid-123
UUID of the product variant to check
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for authenticated users (required)
Responses
1{2 "success": true,3 "eligible": true,4 "reason": null,5 "order_id": "order-uuid-789"6}1{2 "success": true,3 "eligible": false,4 "reason": "already_reviewed"5}1{2 "success": true,3 "eligible": false,4 "reason": "not_purchased"5}1{2 "success": false,3 "eligible": false,4 "reason": "authentication_required",5 "message": "Authentication required"6}Check Product Review Eligibility
/storefront/products/:product_id/review-eligibilityChecks whether the current user is eligible to review the given product (any variant). Rules: - Authentication required - Must have a delivered order containing any variant of the product - Must not have already reviewed any variant of the product
1curl --request GET "$ONDI_BASE_URL/storefront/products/:product_id/review-eligibility" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
product_idRequiredproduct-uuid-123
UUID of the product to check
Headers
AuthorizationOptionalBearer {{access_token}}
JWT token for authenticated users (required)
Responses
1{2 "success": true,3 "eligible": true,4 "reason": null,5 "order_id": "order-uuid-789",6 "purchased_at": "2023-12-01T10:00:00Z"7}1{2 "success": true,3 "eligible": false,4 "reason": "already_reviewed"5}1{2 "success": true,3 "eligible": false,4 "reason": "not_purchased"5}1{2 "success": false,3 "eligible": false,4 "reason": "authentication_required",5 "message": "Authentication required"6}