update review api.
This commit is contained in:
@@ -406,6 +406,27 @@ class ApiConstants {
|
||||
/// Body: { "filters": {"is_group": 0}, "limit_page_length": 0 }
|
||||
static const String frappeGetItemAttributes = '/building_material.building_material.api.item_attribute.get_list';
|
||||
|
||||
// ============================================================================
|
||||
// Review/Feedback Endpoints (Frappe ERPNext)
|
||||
// ============================================================================
|
||||
|
||||
/// Get list of reviews for a product (requires sid and csrf_token)
|
||||
/// POST /api/method/building_material.building_material.api.item_feedback.get_list
|
||||
/// Body: { "limit_page_length": 10, "limit_start": 0, "item_id": "GIB20 G04" }
|
||||
static const String frappeGetReviews = '/building_material.building_material.api.item_feedback.get_list';
|
||||
|
||||
/// Create or update a review (requires sid and csrf_token)
|
||||
/// POST /api/method/building_material.building_material.api.item_feedback.update
|
||||
/// Body: { "item_id": "...", "rating": 0.5, "comment": "...", "name": "..." }
|
||||
/// Note: rating is 0-1 scale (0.5 = 50% or 2.5 stars out of 5)
|
||||
/// Note: name is optional - if provided, updates existing review
|
||||
static const String frappeUpdateReview = '/building_material.building_material.api.item_feedback.update';
|
||||
|
||||
/// Delete a review (requires sid and csrf_token)
|
||||
/// POST /api/method/building_material.building_material.api.item_feedback.delete
|
||||
/// Body: { "name": "ITEM-{item_id}-{user_email}" }
|
||||
static const String frappeDeleteReview = '/building_material.building_material.api.item_feedback.delete';
|
||||
|
||||
// ============================================================================
|
||||
// Notification Endpoints
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user