Analytics
Read-only aggregation endpoints that roll up data across all platform modules — guests, reservations, requests, reviews, and housekeeping. Use these to power dashboards, executive reports, and operational alerts without querying individual modules.
Read-only
All analytics endpoints are GET only. They aggregate live data and require no request body. Results are scoped to the authenticated property.
Endpoints
/v1/analytics/overviewProperty overviewReturn a single aggregated snapshot across all modules — total counts, average review rating, total revenue, and action items (open requests, unanswered reviews, pending housekeeping tasks).
curl https://api.escapelife.ai/v1/analytics/overview \
-H "X-API-Key: sk_live_xxx"{
"total_guests": 48,
"total_reservations": 124,
"total_requests": 87,
"total_reviews": 63,
"total_packages": 9,
"avg_review_rating": 4.7,
"total_revenue": 284600.0,
"open_requests": 6,
"pending_housekeeping": 11,
"unanswered_reviews": 4
}/v1/analytics/requestsRequest analyticsAggregate guest requests by type, status, and priority.
{
"total": 87,
"by_type": {
"housekeeping": 24,
"maintenance": 18,
"concierge": 21,
"food_service": 15,
"transport": 6,
"other": 3
},
"by_status": {
"pending": 6,
"in_progress": 4,
"completed": 74,
"cancelled": 3
},
"by_priority": {
"urgent": 4,
"high": 18,
"normal": 51,
"low": 14
}
}/v1/analytics/reviewsReview analyticsAverage ratings (overall, cleanliness, service), sentiment breakdown, source distribution, and unanswered count.
{
"total": 63,
"avg_overall": 4.7,
"avg_cleanliness": 4.8,
"avg_service": 4.6,
"by_source": {
"tripadvisor": 22,
"google": 18,
"booking": 14,
"airbnb": 9
},
"by_sentiment": {
"positive": 52,
"neutral": 8,
"negative": 3
},
"unanswered": 4
}/v1/analytics/reservationsReservation analyticsStatus and source breakdowns, total revenue, average rate per night, and average length of stay.
{
"total": 124,
"by_status": {
"confirmed": 42,
"checked_in": 18,
"checked_out": 58,
"cancelled": 6
},
"by_source": {
"direct": 54,
"ota": 38,
"corporate": 22,
"gds": 10
},
"total_revenue": 284600.0,
"avg_rate_per_night": 342.5,
"avg_nights": 3.2
}/v1/analytics/housekeepingHousekeeping analyticsTask counts by type and status, plus overall completion rate as a percentage.
{
"total": 156,
"by_task_type": {
"checkout_clean": 42,
"stayover_clean": 58,
"turndown": 31,
"deep_clean": 12,
"inspection": 13
},
"by_status": {
"pending": 11,
"in_progress": 8,
"completed": 133,
"skipped": 4
},
"completion_rate": 85.3
}TypeScript usage
const headers = { "X-API-Key": process.env.ESCAPELIFE_API_KEY! };
const base = "https://api.escapelife.ai/v1/analytics";
const [overview, reviews, requests, reservations, housekeeping] = await Promise.all([
fetch(`${base}/overview`, { headers }).then(r => r.json()),
fetch(`${base}/reviews`, { headers }).then(r => r.json()),
fetch(`${base}/requests`, { headers }).then(r => r.json()),
fetch(`${base}/reservations`, { headers }).then(r => r.json()),
fetch(`${base}/housekeeping`, { headers }).then(r => r.json()),
]);
console.log(`Total revenue: $${overview.total_revenue.toLocaleString()}`);
console.log(`Avg review: ${overview.avg_review_rating} / 5.0`);
console.log(`Open requests: ${overview.open_requests}`);