The Home Page architecture is designed to minimize network requests and optimize load times for the Customer App. The primary aggregator endpoint resolves and batches multiple sections of the home screen into a single JSON response, while dedicated endpoints handle auxiliary tasks like global search and viewing nearby stores.
Customer App
↓
GET /v1/homepage
↓
├── Categories
├── Offers
├── Featured Products
├── Trending Products
├── Top Rated Stores
└── Popular Near You
100 / 100 - READY FOR FLUTTER INTEGRATION
The core entry point for the Customer App. It returns all necessary data to render the main home screen without requiring multiple API requests.
Endpoint URL: /api/v1/homepage
Method: GET
Headers: Accept: application/json
Query Parameters: lat (optional), lng (optional)
GET /api/v1/homepage?lat=48.85&lng=2.35 HTTP/1.1
Host: localhost:8000
Accept: application/json
{
"success": true,
"data": {
"main_categories": [
{
"id": 1,
"name": "Restaurants",
"icon": null,
"sort_order": 0,
"image": "https://placehold.co/400x300/png?text=Restaurants"
}
],
"categories": [],
"offers": [],
"products": [],
"featured_products": [],
"trending_products": [],
"top_rated_stores": [],
"popular_near_you": [],
"stores": []
}
}
{{base_url}}/api/v1/homepageAccept: application/jsonRetrieves the active, sorted Banner Carousel and promotional imagery for the top of the Home Screen.
Endpoint URL: /api/v1/global/ads
Method: GET
Headers: Accept: application/json
GET /api/v1/global/ads HTTP/1.1
Host: localhost:8000
Accept: application/json
{
"success": true,
"data": [
{
"id": 1,
"title": "Ad 1",
"type": "image",
"image": "https://placehold.co/800x400/png?text=Promo+1",
"redirect_type": "store_screen",
"store_id": 16,
"product_id": null
}
]
}
{{base_url}}/api/v1/global/adsAccept: application/jsonProvides a paginated listing of stores near the user, supporting complex filtering and sorting capabilities. Used for the "See All" lists or category exploration.
Endpoint URL: /api/v1/stores/nearby
Method: GET
Headers: Accept: application/json
GET /api/v1/stores/nearby?lat=48.85&lng=2.35&radius=15 HTTP/1.1
Host: localhost:8000
Accept: application/json
{
"success": true,
"data": {
"stores": [
{
"id": 1,
"name": "The Burger Joint",
"image": "https://placehold.co/200x200/png?text=The+Burger+Joint+Logo",
"address": "1616 Gleason Inlet",
"delivery_time": 24,
"category": "Restaurants"
}
],
"meta": {
"total": 20,
"per_page": 10,
"current_page": 1,
"last_page": 2
}
}
}
{{base_url}}/api/v1/stores/nearby?lat=48.85&lng=2.35Accept: application/jsonProvides instant Global Search results spanning across Stores, Products, and Categories.
Endpoint URL: /api/v1/global/search
Method: GET
Headers: Accept: application/json
Query Parameters: q (string, search query)
GET /api/v1/global/search?q=burger HTTP/1.1
Host: localhost:8000
Accept: application/json
{
"success": true,
"data": {
"query": "burger",
"results": {
"stores": [],
"products": [],
"categories": []
}
}
}
{{base_url}}/api/v1/global/search?q=burgerAccept: application/json