Approver Report API
Base path: /api/v1/admin/approver-report
Generates and sends a styled HTML email report summarizing all cart approvers and floor price breach (channel) approvers across channels. The report is sent automatically every Monday at 9:00 AM and can be triggered manually.
Report Contents
The report has two sections:
Cart Approvers
Lists all users who can approve cart discounts, per channel.
| Column | Description |
|---|---|
| Channel | Channel name |
| Approver | User name |
| User email | |
| Max Discount | Maximum discount % this approver can authorize |
| View Other Rates | Whether they can view other channels' rates |
Floor Price Breach Approvers (Channel Approvers)
Lists all users who can approve bookings below floor price.
| Column | Description |
|---|---|
| Channel | Channel name |
| Approver | User name |
| User email |
Trigger Report
Manually trigger the weekly report. Sends to the default recipient ([email protected]).
POST /api/v1/admin/approver-report/trigger
Response: 200 OK
"Approver report sent"
Send to Custom Recipients
Send the report to specific email addresses.
POST /api/v1/admin/approver-report/send
Content-Type: application/json
Request body:
Response: 200 OK
{
"status": "sent",
"recipients": ["[email protected]", "[email protected]"]
}
Scheduled Execution
The report runs automatically every Monday at 9:00 AM UTC via @Scheduled(cron = "0 0 9 * * MON").
Database Tables
| Table | Joined Fields |
|---|---|
cart_approver | channel_id, user_id, max_discount_percentage, can_view_other_channel_rates |
channel_approver | channel_id, user_id |
channels | id, name |
users | id, name, email |
Configuration
| Property | Default | Description |
|---|---|---|
elivaas.notification.email.default-source | [email protected] | Sender email address |
Daily Approved & Booked Report API
Base path: /api/v1/admin/approver-report/daily
Generates and sends a styled HTML email report of quotes that were approved and booked on the previous day. Shows who approved each booking, the property, agent, pricing, and booking ID. Sent automatically every day at 9:00 AM.
Report Contents
Approved & Booked
Lists all quotes approved the previous day that resulted in a confirmed booking.
| Column | Description |
|---|---|
| Approved At | Timestamp when the approval was made |
| Approved By | Name of the approver |
| Property | Property name from the quote |
| Check-in | Guest check-in date |
| Agent | Name of the agent who submitted the quote |
| Original Amt | Original net amount before tax |
| Proposal Amt | Proposed/approved amount |
| Booking ID | Confirmed booking identifier |
The report also includes a summary card with the total count of approved & booked quotes for the day.
Trigger Daily Report
Manually trigger the daily report for yesterday. Sends to the default recipient ([email protected]).
POST /api/v1/admin/approver-report/daily/trigger
Response: 200 OK
"Daily approval activity report sent"
Send to Custom Recipients
Send the daily report to specific email addresses.
POST /api/v1/admin/approver-report/daily/send
Content-Type: application/json
Request body:
Response: 200 OK
{
"status": "sent",
"recipients": ["[email protected]", "[email protected]"]
}
Scheduled Execution
The report runs automatically every day at 9:00 AM UTC via @Scheduled(cron = "0 0 9 * * *"), covering the previous day's activity.
Database Tables
| Table | Joined Fields |
|---|---|
approval_process_histories | approval_process_id, by_id, "to", timestamp |
approval_processes | id, quote_id |
quotes | id, property_name, checkin_date, agent_id, original_net_amount_before_tax, proposal_amount, booking_id |
users | id, name (joined as approver and agent) |
Query Filter
Only includes rows where:
approval_process_histories."to" = 'APPROVED'— the quote was approvedquotes.booking_id IS NOT NULL— the quote converted to a booking
Configuration
| Property | Default | Description |
|---|---|---|
elivaas.notification.email.default-source | [email protected] | Sender email address |