Activities
The Activity is the core product entity in MyEasyGuide. Each activity represents a trek, tour, or experience that travelers can browse and book.
Activity Model
An activity contains extensive metadata:
title, shortDescription, fullDescription — Content
highlights[], inclusions[], exclusions[] — Feature lists
price, duration, guestCapacity — Pricing & logistics
images[], itinerary (JSON), meetingPoint — Media & logistics
difficultyLevel, tripCategory, tripType — Classification
cityId, regionId — Location
published, status, isFeatured — Moderation
popularityScore, views, averageRating, bookingsCount — Analytics
canonicalPath, urlHistory[] — SEOEndpoints
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /activity | Public | List/search activities |
| GET | /activity/popular | Public | Get popular activities |
| GET | /activity/featured | Public | Get featured activities |
| GET | /activity/supplier/:id | Public | Activities by supplier |
| GET | /activity/:id | Public | Single activity detail |
| POST | /activity | Admin | Create activity |
| PATCH | /activity/:id | Admin | Update activity |
| DELETE | /activity/:id | Admin | Delete activity |
Activity List
GET /api/v1/activity?search=trek&page=1&limit=20&city=pokhara&difficulty=MODERATE&sort=popularityQuery parameters:
| Param | Type | Description |
|---|---|---|
search | string | Full-text search on title/description |
page | number | Page number (default 1) |
limit | number | Items per page (default 20) |
city | string | Filter by city handle |
cityId | string | Filter by city ID |
regionId | string | Filter by region ID |
tripCategoryId | string | Filter by trip category |
tripTypeId | string | Filter by trip type |
difficulty | string | Filter by difficulty level |
minPrice | number | Minimum price |
maxPrice | number | Maximum price |
duration | string | Filter by duration |
sort | string | popularity, price_asc, price_desc, newest, rating |
featured | boolean | Only featured activities |
Activity Detail
GET /api/v1/activity/42
Response: {
data: { ...activity, supplier, city, region, tripCategory, tripType },
recommendations: [ { id, title, images, price, duration } ]
}The activity detail endpoint returns the full activity with all relations and Recombee-based recommendations ("You may also like").
Activity Status Lifecycle
┌──────────┐
│ DRAFT │ (published = false)
└────┬─────┘
│
▼
┌──────────────────┐
│ PENDING_APPROVAL │ Supplier submits → Admin reviews
└──────┬───────────┘
│
├────────────────────┐
▼ ▼
┌──────────┐ ┌──────────┐
│ APPROVED │ │ REJECTED │
│ (active) │ └──────────┘
└──────────┘Supplier Activity Management
Suppliers can manage their own activities through the supplier dashboard:
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /activity/supplier/:id | Public | List supplier's activities |
| POST | /activity | Admin | Create (admin creates on supplier's behalf) |
Featured Activities
Activities can be promoted via the FeaturedTag system:
POST /featured/activity— Assign featured tag to activityDELETE /featured/activity/:id— Remove featured tag- Listed on homepage and special sections
Route Format
The frontend generates URLs in this pattern:
/{country}/{city}/{category-handle}/{activity-slug}-{activity-id}
Example: /nepal/pokhara/trekking/everest-base-camp-trek-42The catch-all route parses the last segment for -{id} to extract the activity ID for API calls.