Shops Management Service
⚠️ CRITICAL REQUIREMENTS
🔐 Authentication Required ALL endpoints in this service require Bearer token authentication unless specified as public. Requests without valid authentication will receive a 401 Unauthorized response.
🏪 Shop Ownership Validation CRITICAL: Shop update endpoints validate ownership. Only shop owners can modify their shops. Admin roles can access all shop details.
🎯 One Rating/Review Per User IMPORTANT: Users can only create ONE rating and ONE review per shop. Use update endpoints to modify existing ratings/reviews.
Service Overview
The Shops Management Service provides comprehensive shop management capabilities including shop creation, ratings, reviews, and category management. This service consists of four main components:
Shop Categories - Manage shop categorization
Shop Management - Create, update, and retrieve shop information
Rating System - 1-5 star rating functionality
Review System - Text-based review system with moderation
Base URL
/api/v1/shops
Authentication
All protected endpoints require authentication via Bearer token:
Authorization: Bearer {access_token}
Common Response Format
Success Response
{
"success": true,
"httpStatus": "OK",
"message": "Operation completed successfully",
"action_time": "2024-12-09T10:30:00",
"data": {
// Response data here
}
}
Error Response
{
"success": false,
"httpStatus": "BAD_REQUEST",
"message": "Error description",
"action_time": "2024-12-09T10:30:00",
"data": "Detailed error message or validation errors"
}
Data Models Overview
Shop Status Types
PENDING
- Awaiting admin approvalACTIVE
- Active and operationalSUSPENDED
- Temporarily suspended by adminCLOSED
- Permanently closed/inactiveUNDER_REVIEW
- Under admin review for policy violations
Shop Types
PHYSICAL
- Physical store only (brick-and-mortar)ONLINE
- Online store only (e-commerce)HYBRID
- Both physical and online presence
Verification Badges
BRONZE
- Basic verification (documents verified)SILVER
- Enhanced verification (business registration + documents)GOLD
- Premium verification (full compliance + good track record)PREMIUM
- Highest level (partner status + excellent performance)
Review Status Types
ACTIVE
- Publicly visible reviewHIDDEN
- Hidden by admin/moderationFLAGGED
- Flagged for reviewUNDER_REVIEW
- Under moderation review
Quick Start
Authentication: Obtain a Bearer token via the Authentication Service
Browse Categories: Get available shop categories (public endpoint)
Create Shop: Submit shop creation request with required fields
Manage Content: Add ratings and reviews to shops
Admin Operations: Approve shops and manage categories (admin only)
Rate Limiting
Standard rate limits apply to all endpoints:
Authenticated users: Higher limits for most operations
Public endpoints: Generous limits for browsing
Admin operations: Standard authenticated limits
Content creation: Rate limited to prevent spam
Rate limit exceeded response:
{
"success": false,
"httpStatus": "TOO_MANY_REQUESTS",
"message": "Too many requests. Please wait before requesting again.",
"action_time": "2024-12-09T10:30:00"
}
Last updated