Skip to main content

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.

ColumnDescription
ChannelChannel name
ApproverUser name
EmailUser email
Max DiscountMaximum discount % this approver can authorize
View Other RatesWhether they can view other channels' rates

Floor Price Breach Approvers (Channel Approvers)

Lists all users who can approve bookings below floor price.

ColumnDescription
ChannelChannel name
ApproverUser name
EmailUser 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

TableJoined Fields
cart_approverchannel_id, user_id, max_discount_percentage, can_view_other_channel_rates
channel_approverchannel_id, user_id
channelsid, name
usersid, name, email

Configuration

PropertyDefaultDescription
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.

ColumnDescription
Approved AtTimestamp when the approval was made
Approved ByName of the approver
PropertyProperty name from the quote
Check-inGuest check-in date
AgentName of the agent who submitted the quote
Original AmtOriginal net amount before tax
Proposal AmtProposed/approved amount
Booking IDConfirmed 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

TableJoined Fields
approval_process_historiesapproval_process_id, by_id, "to", timestamp
approval_processesid, quote_id
quotesid, property_name, checkin_date, agent_id, original_net_amount_before_tax, proposal_amount, booking_id
usersid, name (joined as approver and agent)

Query Filter

Only includes rows where:

  • approval_process_histories."to" = 'APPROVED' — the quote was approved
  • quotes.booking_id IS NOT NULL — the quote converted to a booking

Configuration

PropertyDefaultDescription
elivaas.notification.email.default-source[email protected]Sender email address