Catalog
All routes below are Public on http://localhost:5000. Localized strings follow Accept-Language (ar / ar-* → Arabic, otherwise English).
Bootstrap
| Method | Path | Purpose |
|---|---|---|
GET | /v1/init | Launch snapshot |
GET | /v1/home | Home sections (slides, shelves, offers) |
Call GET /v1/init on app launch. Auth is optional: send Bearer when signed in.
results on init
| Field | Meaning |
|---|---|
store.name, store.tagline | Already localized |
store.maintenanceMode, store.maintenanceMessage | When true, block cart/order/wishlist writes |
store.payment | Method toggles (checkout still only cod / wallet) |
store.loyalty, store.pro | Program flags and perks |
store.assistant.enabled, store.assistant.allowGuests | Whether to show chat / allow guests |
store.supportContact, store.socialMedia | Footer / contact |
user | Public customer, or null |
wishlistProductIds | For heart state; empty when guest |
cart.offers | Offers currently applicable to the cart |
delivery | Current mode (delivery | pickup), branch, zone (fees in fils), optional addressId |
content.popups | Localized marketing popups |
Categories, brands, collections
| Method | Path | Purpose |
|---|---|---|
GET | /v1/categories | Category tree / list |
GET | /v1/categories/:slug | Category detail |
GET | /v1/brands | Brand list |
GET | /v1/brands/:slug | Brand detail |
GET | /v1/collections | Collection list |
GET | /v1/collections/:slug | Collection detail |
Catalog reads use slug, not id.
Products
| Method | Path | Auth | Purpose |
|---|---|---|---|
GET | /v1/products | Public | Search / filter list |
GET | /v1/products/:slug | Public | Product detail |
GET | /v1/products/:slug/reviews | Public | Reviews + rating average |
List query
| Query | Notes |
|---|---|
page, limit | Pagination (limit max 100) |
categorySlug, brandSlug, collectionSlug | Scope |
search | Free text |
tag | Tag slug |
inStock, onSale | Booleans |
minPrice, maxPrice | Fils |
sort | newest | price_asc | price_desc | name | discount_desc |
Response results is { data, pagination }. Prices on cards are fils. Availability can change after delivery / pickup is selected.
Recipes, offers, pages, plans
| Method | Path | Purpose |
|---|---|---|
GET | /v1/recipes | Recipe list |
GET | /v1/recipes/:slug | Recipe detail |
GET | /v1/offers | Active offers (branch-aware when delivery is selected) |
GET | /v1/pages/:slug | CMS / legal page (about, faq, privacy, …) |
GET | /v1/subscription-plans | Public Pro plans + enabled + perks |
Reviews (write)
| Method | Path | Auth | Body |
|---|---|---|---|
POST | /v1/reviews | Customer | productId, orderId, rating, optional title, body |
PATCH | /v1/reviews/:reviewId | Customer | Partial rating, title, body |
Customers can only review products from their own orders. rating is 1–5.