Skip to content

YeboShops Route Map ​

Complete API endpoint documentation for the YeboShops backend.

Route Overview ​

All routes are mounted from app.ts:

typescript
// Authentication & Users
app.use('/auth', authRoutes);
app.use('/users', userRoutes);

// Shops & Products
app.use('/shops', shopRoutes);
app.use('/products', productRoutes);
app.use('/comments', commentRoutes);

// Search & Discovery
app.use('/search', searchRoutes);
app.use('/search/conversational', conversationalSearchRoutes);
app.use('/feed', feedRoutes);

// Payments & Wallet
app.use('/secure-payments', securePaymentRoutes);
app.use('/wallet', walletRoutes);

// Communication
app.use('/chats', chatRoutes);
app.use('/conversations', conversationsRoutes);
app.use('/notifications', notificationRoutes);

// Social Features
app.use('/follows', followRoutes);
app.use('/shares', sharesRoutes);
app.use('/unified-action', unifiedActionRoutes);

// Admin & System
app.use('/admin', adminRoutes);
app.use('/reports', reportRoutes);
app.use('/countries', countryRoutes);
app.use('/media', mediaRoutes);
app.use('/webhooks', webhookRoutes);
app.use('/internal', internalRoutes);

// Dashboard & Blog
app.use('/api/dashboard', dashboardRoutes);
app.use('/api/blog', blogRoutes);
app.use('/api/billing', billingRoutes);

Authentication Routes /auth ​

MethodEndpointDescriptionAuth
POST/signupRegister new user❌
POST/verify-signup-otpVerify OTP for signup❌
POST/resend-signup-otpResend signup OTP❌
POST/loginLogin with phone/password❌
POST/refreshRefresh access token🔒
POST/logoutLogout user🔒
POST/request-password-resetRequest password reset❌
POST/verify-password-reset-otpVerify reset OTP❌
POST/reset-passwordReset password❌

User Routes /users ​

MethodEndpointDescriptionAuth
GET/meGet current user profile🔒
PUT/meUpdate current user🔒
DELETE/meDelete account🔒
GET/me/statsGet user statistics🔒
GET/me/favoritesGet favorited products🔒
GET/me/bookmarksGet bookmarked products🔒
GET/me/followsGet followed shops🔒
GET/:userIdGet user by ID❌
GET/:userId/shopsGet user's shops❌

Shop Routes /shops ​

MethodEndpointDescriptionAuth
POST/Create new shop🔒
GET/List all shops❌
GET/myGet current user's shops🔒
GET/:shopIdGet shop by ID❌
GET/slug/:slugGet shop by slug❌
PUT/:shopIdUpdate shop🔒
DELETE/:shopIdDelete shop🔒
GET/:shopId/productsGet shop's products❌
GET/:shopId/statsGet shop statistics🔒
GET/:shopId/reviewsGet shop reviews❌
POST/:shopId/reviewsCreate shop review🔒

Product Routes /products ​

MethodEndpointDescriptionAuth
POST/Create new product🔒
GET/List products❌
GET/feedGet product feed❌
GET/:productIdGet product by ID❌
GET/slug/:slugGet product by slug❌
PUT/:productIdUpdate product🔒
DELETE/:productIdSoft delete product🔒
POST/:productId/restoreRestore deleted product🔒
GET/:productId/commentsGet product comments❌
POST/:productId/commentsAdd comment🔒
GET/:productId/statsGet product statistics❌
GET/:productId/similarGet similar products❌

Secure Payment Routes /secure-payments ​

MethodEndpointDescriptionAuth
POST/Create secure payment🔒
GET/Get user's payments🔒
GET/:paymentIdGet payment details🔒
POST/:paymentId/acceptAccept payment (seller)🔒
POST/:paymentId/refuseRefuse payment (seller)🔒
POST/completeComplete with code🔒
POST/:paymentId/disputeOpen dispute🔒
POST/:paymentId/cancelCancel payment🔒
GET/lookup/:codeLookup by completion code🔒

Wallet Routes /wallet ​

MethodEndpointDescriptionAuth
GET/Get wallet info🔒
GET/balanceGet balance details🔒
GET/transactionsGet transaction history🔒
POST/depositDeposit funds🔒
POST/withdrawWithdraw funds🔒

Chat Routes /chats ​

MethodEndpointDescriptionAuth
GET/Get user's chats🔒
POST/Create/send message🔒
GET/:chatIdGet chat by ID🔒
GET/:chatId/messagesGet chat messages🔒
POST/:chatId/readMark messages as read🔒
GET/checkCheck chat exists🔒
GET/unreadGet unread counts🔒

MethodEndpointDescriptionAuth
GET/Search products❌
GET/productsSearch with filters❌
GET/shopsSearch shops❌
GET/suggestionsGet search suggestions❌
GET/trendingGet trending searches❌
POST/conversationalAI conversational search❌

Feed Routes /feed ​

MethodEndpointDescriptionAuth
GET/Get product feed❌
GET/personalizedGet personalized feed🔒
GET/trendingGet trending products❌
GET/categoriesGet category feed❌

Unified Action Routes /unified-action ​

Single endpoint for common actions (like, favorite, bookmark, follow):

MethodEndpointDescriptionAuth
POST/Perform action🔒

Request Body:

typescript
{
  action: 'like' | 'unlike' | 'favorite' | 'unfavorite' | 
          'bookmark' | 'unbookmark' | 'follow' | 'unfollow',
  entityType: 'product' | 'shop' | 'user',
  entityId: string
}

Notification Routes /notifications ​

MethodEndpointDescriptionAuth
GET/Get notifications🔒
GET/unread-countGet unread count🔒
POST/:id/readMark as read🔒
POST/read-allMark all as read🔒
DELETE/:idDelete notification🔒

Admin Routes /admin ​

MethodEndpointDescriptionAuth
GET/statsPlatform statistics🔒 Admin
GET/usersList all users🔒 Admin
GET/shopsList all shops🔒 Admin
GET/productsList all products🔒 Admin
GET/paymentsList all payments🔒 Admin
PUT/users/:idUpdate user🔒 Admin
PUT/shops/:idUpdate shop🔒 Admin
PUT/products/:idUpdate product🔒 Admin

Webhook Routes /webhooks ​

MethodEndpointDescriptionAuth
POST/media-processedAI media processing completeAPI Key
POST/paymentPayment gateway webhookAPI Key

Internal Routes /internal ​

MethodEndpointDescriptionAuth
POST/embeddings/batchBatch generate embeddingsAPI Key
GET/embeddings/statsEmbedding statisticsAPI Key
POST/embeddings/rebuildRebuild embedding indexAPI Key

Blog Routes /api/blog ​

MethodEndpointDescriptionAuth
GET/postsGet blog posts❌
GET/posts/:slugGet post by slug❌
POST/postsCreate postAPI Key
PUT/posts/:idUpdate postAPI Key
DELETE/posts/:idDelete postAPI Key

Dashboard Routes /api/dashboard ​

MethodEndpointDescriptionAuth
GET/metricsGet platform metricsAPI Key
GET/analyticsGet analytics dataAPI Key

One chat. Everything done.