# Reports ES Queries (v1)

Source of truth:
- Service: `app/Services/Elasticsearch/ReportsElasticsearchService.php`
- Controller: `app/Http/Controllers/Reports/ReportController.php`
- Index: `customer_subscription_v1`

## ES-backed service methods
- `fetchRows(...)`

## ES-backed report keys
- `subscription_report`
- `coupon_usage_report`
- `order_conversion_report`
- `total_plan_subscriber`
- `sourcewise_plan_subscribers`

## API endpoints
- `GET /admin/api/reports/{reportKey}`
- `GET /admin/api/reports/{reportKey}/export`

## Notes
- Report ES path uses service-driven query composition by report key.
- Status/date filters are normalized in service logic for v1 nested mapping.
