Skip to main content

Overview

Admin reporting APIs provide comprehensive insights into trip financials, booking history, and platform analytics. All endpoints require AdminPolicy authorization.

Reports Overview

Get aggregated reports with statistics, top lists, and activity charts.
curl -X GET "https://api.masareagle.com/api/admin/reports/overview?dateFrom=2024-01-01&dateTo=2024-12-31" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Query Parameters

dateFrom
string
Start date (ISO 8601 format). Defaults to first day of current month
dateTo
string
End date (ISO 8601 format). Defaults to first day of next month
sections
string
Comma-separated list of sections to include: stats, topRoutes, topCompanies, topDrivers, tripActivity, userRegistrations. Omit to get all sections.

Response

stats
object
Platform statistics
topRoutes
array
Top 6 routes by booking count
topCompanies
array
Top 6 companies by booking count
topDrivers
array
Top 6 drivers by booking count
tripActivity
array
Monthly trip activity chart data
userRegistrations
array
Monthly user registration chart data
The overview report aggregates data from individual trips, company trips, and company public trips. Profit calculations include commission amounts from confirmed and completed bookings.

Trip Ledger

Get detailed financial ledger for a specific trip, including all bookings and revenue breakdown.
curl -X GET "https://api.masareagle.com/api/admin/reports/trip-ledger?tripId=trip_abc123" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Query Parameters

tripId
string
required
Trip identifier (supports driver trips, company trips, and public trips)

Response

success
boolean
Operation status
data
object
Trip ledger data

Trip Trace

Smart trace search that accepts trip ID, booking ID, or booking number and returns complete financial history with wallet transactions.
curl -X GET "https://api.masareagle.com/api/admin/reports/trip-trace?searchTerm=BK12345" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Query Parameters

searchTerm
string
required
Trip ID, booking ID, or booking number (with or without # prefix)

Response

success
boolean
Operation status
data
object
Trace data
Trip trace provides complete financial visibility by:
  • Automatically detecting trip type from any search term
  • Including all wallet transactions related to the trip and its bookings
  • Resolving user names for better readability
  • Showing chronological transaction timeline

Use Cases

Monthly Performance Report

curl -X GET "https://api.masareagle.com/api/admin/reports/overview?dateFrom=2024-03-01&dateTo=2024-03-31" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"
Get a complete monthly report with revenue, top performers, and user growth.

Trip Financial Audit

curl -X GET "https://api.masareagle.com/api/admin/reports/trip-ledger?tripId=trip_xyz" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"
Audit all bookings and revenue for a specific trip.

Customer Support Inquiry

curl -X GET "https://api.masareagle.com/api/admin/reports/trip-trace?searchTerm=BK12345" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"
Quickly look up a booking by its number and see complete transaction history.

Build docs developers (and LLMs) love