Visited Places (My Map)
Track places you've visited for your personal travel history map.
Get User's Visited Places
Get visited places for a user profile.
Endpoint: GET /api/profile/{handle}/visited-points
Note: Returns public places only for other users, all places for the owner.
Response:
{
"points": [
{
"id": 1,
"title": "Eiffel Tower",
"category": "landmark",
"latitude": 48.8584,
"longitude": 2.2945,
"country": "France",
"region": "Γle-de-France",
"visitedAt": "2024-06-15",
"notes": "Amazing view at sunset",
"visibility": "public"
}
],
"stats": {
"countries": 12,
"regions": 45,
"places": 128
}
}
Get My Visited Places
Get current user's visited places.
Endpoint: GET /api/me/visited-points
Create Visited Place
Add a new visited place.
Endpoint: POST /api/me/visited-points
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Place name |
latitude | number | Yes | Latitude coordinate |
longitude | number | Yes | Longitude coordinate |
category | string | No | landmark, food, nature, hotel, activity, other |
visitedAt | string | No | Visit date (YYYY-MM-DD) |
notes | string | No | Personal notes |
visibility | string | No | public or private |
curl -X POST "https://travelmode2.replit.app/api/me/visited-points" \
-H "Authorization: Bearer tm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Colosseum",
"latitude": 41.8902,
"longitude": 12.4922,
"category": "landmark",
"visitedAt": "2024-07-20",
"visibility": "public"
}'
Note: Country and region are automatically derived from coordinates via reverse geocoding.
Update Visited Place
Endpoint: PATCH /api/me/visited-points/{id}
Delete Visited Place
Endpoint: DELETE /api/me/visited-points/{id}
Get Travel Stats
Get aggregated travel statistics.
Endpoint: GET /api/me/visited-points/stats
Response:
{
"countries": 12,
"regions": 45,
"places": 128,
"visitedRegions": [
{
"regionCode": "US-CA",
"regionName": "California",
"country": "United States",
"placesCount": 8,
"firstVisit": "2023-01-15",
"lastVisit": "2024-06-20"
}
]
}
Categories
| Category | Description |
|---|---|
landmark | Famous landmarks, monuments |
food | Restaurants, cafes, food experiences |
nature | Parks, beaches, natural attractions |
hotel | Accommodations |
activity | Tours, activities, experiences |
other | Other places |