Skip to content

Implement Event Ticket Analytics API✅ #49

@BigBen-7

Description

@BigBen-7

Description:
Develop the Event Ticket Analytics API to provide insights into ticket orders for an event. The API should support filtering based on different time periods, including hourly, daily, weekly, monthly, and yearly reports. Additionally, users should be able to export the ticket analytics data in XLS or CSV format.
Core Features:
Retrieve total tickets ordered for an event.
Retrieve hourly, daily, weekly, monthly, and yearly ticket order breakdown.
Export ticket analytics data in XLS or CSV format.
Backend Implementation:
Implement the following endpoints with proper validation and authentication:
GET /analytics/events/{eventId}/tickets – Retrieve total tickets ordered for an event.
GET /analytics/events/{eventId}/tickets?filter={hourly|daily|weekly|monthly|yearly} – Retrieve ticket orders based on selected time filters.
GET /analytics/events/{eventId}/tickets/export?format={xls|csv} – Export ticket analytics data in XLS or CSV format.
Calculation Details:
Total Tickets Ordered = Count of all tickets sold for the event.
Filtered Ticket Orders = Count of tickets sold within the selected time period.
Requirements:
Ensure authentication and role-based authorization for ticket analytics.
Use optimized database queries for efficiency.
Implement guards and middleware for access control.
Allow filtering by hourly, daily, weekly, monthly, and yearly.
Implement export functionality for XLS and CSV formats.
Follow best practices for API design and security.
Acceptance Criteria:
All endpoints should be functional and secured.
Users should be able to retrieve total ticket orders and filtered ticket order reports based on selected time periods.
Users should be able to export the ticket analytics data in XLS or CSV format.
Authorization should restrict analytics access to permitted users.
References:
API Best Practices
Authentication & Authorization Docs
XLS/CSV Export Handling in APIs

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions