v1.0.0 Production Architecture

Surat Textile Marketplace — REST API

Dynamic-First Architecture for Android App, Admin Panel & Web Clients

Admin Portal
Base API URL:
Active Token: No Token Set (Public/Guest Mode)

0. System Health & Diagnostic Verification

GET /check ⭐ Verify that the whole API, Database & Storage are live and operational

Returns live database connectivity, latency, module counts, and server status.

1. Dynamic System Configuration & Form Engine

GET /config/app Fetch app settings & feature flags (toggle modules ON/OFF)
GET /config/home-sections Dynamic Home Screen sections, order & banners
GET /categories/{id}/fields ⭐ Dynamic Form Fields for Category (GSM, Width, etc.)

Android App uses this endpoint to automatically render custom form fields (Fabric GSM, Width, Weave, Yarn Count, etc.)

2. Authentication & Guest Session

POST /auth/send-otp Request SMS OTP (Dev OTP: 123456)

Payload: {"phone": "9825012345", "country_code": "+91"}

POST /auth/verify-otp Verify OTP and obtain Bearer token

Payload: {"phone": "9825012345", "otp": "123456"}

GET /auth/guest Guest browsing session token

3. Buy & Sell Marketplace

GET /posts?post_type=sell&category_id=1 List marketplace posts with filters
GET /posts/{id} Single post details with seller profile & dynamic attributes

4. Surplus & Clearance Deals

GET /surplus Discounted clearance lots & cancelled export orders

5. Textile Directory & Nearby Businesses

GET /directory?city=Surat&verified_only=1 Textile mills, wholesalers & traders directory
GET /directory/nearby?lat=21.17&lng=72.83&radius_km=30 GPS Nearby Businesses (Haversine formula calculation)

6. Universal Voice & Text Search

GET /search?q=cambric Search across Posts, Surplus, Mills, Communities & News

7. Textile Stories (24-Hour Expiry)

GET /stories Active 24h stories grouped by mill/trader

8. Textile News & Events (SITEX Expos)

GET /content Textile industry news, fairs and SITEX exhibitions