RentalTideRentalTideDocs
Dashboard

Analytics API

Reporting, forecasting, AI insights, and event tracking

Endpoints for analytics dashboards, revenue forecasting, AI-powered insights, and event tracking.

Analytics

Get analytics metrics for dashboard KPIs

GET /analytics/metrics

Returns aggregated metrics including revenue, tax, tips, discounts, and booking counts with daily breakdown

Parameters

NameInTypeRequiredDescription
locationIdsquerystringYesComma-separated list of location IDs
startDatequerystringYesStart date (YYYY-MM-DD)
endDatequerystringYesEnd date (YYYY-MM-DD)

Responses

CodeDescription
200Analytics metrics returned successfully
400Missing required parameters
500Server error

Get inventory performance metrics

GET /analytics/inventory-performance

Returns top performing inventory items and assets by revenue

Parameters

NameInTypeRequiredDescription
locationIdsquerystringYesComma-separated list of location IDs
startDatequerystringYesStart date (YYYY-MM-DD)
endDatequerystringYesEnd date (YYYY-MM-DD)
limitqueryintegerNoNumber of items to return

Responses

CodeDescription
200Inventory performance data returned successfully
400Missing required parameters
500Server error

Get year-over-year revenue data

GET /analytics/year-over-year

Returns monthly revenue data for specified locations comparing current and previous year. Uses ledger/journal entries to include all revenue sources (bookings + POS).

Parameters

NameInTypeRequiredDescription
locationIdsquerystringYesComma-separated list of location IDs
currentYearqueryintegerNoThe current year to compare (defaults to current year)

Responses

CodeDescription
200Year-over-year revenue data returned successfully
400Missing or invalid locationIds parameter
500Server error

Update revenue target

PATCH /analytics/revenue-target

Updates the revenue target and/or previous year revenue override for a location

Request body

FieldTypeRequiredDescription
locationIdstringYesThe location ID to update
revenueTargetnumberNoRevenue target amount (must be positive)
previousYearRevenueOverridenumberNoOverride value for previous year revenue (must be positive)

Responses

CodeDescription
200Revenue settings updated successfully
400Missing locationId or invalid values
404Location not found
500Server error

Realize revenue for all completed bookings

POST /analytics/realize-completed-bookings

Creates journal entries for all completed bookings that haven't had revenue recognized yet. This syncs booking revenue to the ledger.

Request body

FieldTypeRequiredDescription
locationIdsarrayNoOptional - limit to specific location IDs
dryRunbooleanNoIf true, only returns count without creating entries

Responses

CodeDescription
200Revenue realization completed successfully
500Server error

Get widget/booking page engagement metrics

GET /analytics/widget-metrics

Returns funnel, temporal heatmap, daily engagement, source breakdown, and top products

Parameters

NameInTypeRequiredDescription
locationIdsquerystringYesComma-separated list of location IDs
startDatequerystringYes
endDatequerystringYes

Responses

CodeDescription
200Widget engagement metrics returned successfully
400Missing required parameters
500Server error

Forecast

Get demand forecast for a location

GET /forecast

Returns predicted daily renter counts using historical data, weather, and holiday detection

Parameters

NameInTypeRequiredDescription
locationIdquerystringYesLocation ID to forecast for
daysqueryintegerNoNumber of days to forecast (7 or 14)
timezonequerystringNoTimezone for date calculations (e.g. America/Toronto)
unitsquerystringNoTemperature units

Responses

CodeDescription
200Forecast data returned successfully
400Missing required parameters
500Server error

AI

Process AI request

POST /ai

Routes AI requests to different services based on the 'what' parameter

Request body

FieldTypeRequiredDescription
whatstringYesType of AI request
messagestringNoMessage or prompt for the AI
promptstringNoDetailed prompt for AI analysis (for emailEnhancement)
businessNamestringNoBusiness name (for socialMediaPost)
businessTypestringNoType of business (for socialMediaPost)
businessLocationstringNoBusiness location (for socialMediaPost)
bookingsarrayNoBooking data (for bookingSidekick)
websiteUrlstringNoWebsite URL (for businessAudit)
businessDataobjectNoAdditional business data (for businessAudit)

Responses

CodeDescription
200AI response returned successfully
400Invalid or missing parameters
401Unauthorized
500Server error

Perform business audit

POST /ai/business-audit

Performs a comprehensive business audit using AI analysis of website and business data. Charges $4.99 per audit.

Request body

FieldTypeRequiredDescription
websiteUrlstringYesWebsite URL to audit
businessDataobjectNoAdditional business data for analysis

Responses

CodeDescription
200Business audit completed successfully
400Invalid or missing websiteUrl
401Unauthorized
403Business audit integration not enabled
404Customer not found
500Server error

Get business audit billing history

GET /ai/business-audit/billing

Retrieves business audit billing history and analytics for the authenticated customer

Responses

CodeDescription
200Billing history returned successfully
401Unauthorized
404Customer not found
500Server error

Validate receipt data

POST /ai/validate-receipt

Validates inputted transaction data against an uploaded receipt image using AI Vision

Request body

FieldTypeRequiredDescription
receiptImagestringYesBase64 encoded image or image URL
inputDataobjectNo

Responses

CodeDescription
200Validation completed successfully
400Missing receipt image or validation data
500Server error

Extract receipt data

POST /ai/extract-receipt-data

Extracts structured data from a receipt image without validation (useful for auto-filling forms)

Request body

FieldTypeRequiredDescription
receiptImagestringYesBase64 encoded image or image URL

Responses

CodeDescription
200Data extracted successfully
400Missing receipt image
500Server error

Proxy external webpage

GET /ai/proxy-page

Proxies an external webpage and injects selection script for click-to-tag inventory import functionality

Parameters

NameInTypeRequiredDescription
urlquerystringYesURL of the page to proxy

Responses

CodeDescription
200Proxied HTML page with injected selection tools
400Missing or invalid URL
500Failed to load page

Scrape inventory from URL

POST /ai/scrape-inventory

Scrapes inventory/rental information from a website URL using Puppeteer screenshots and OpenAI Vision to extract structured data

Request body

FieldTypeRequiredDescription
urlstringYesURL of the inventory page to scrape

Responses

CodeDescription
200Inventory data extracted successfully
400Missing or invalid URL
401Customer ID required
500Server error

Extract driver's license data

POST /ai/extract-license

Extracts driver's license information from an image using GPT-4 Vision

Request body

FieldTypeRequiredDescription
imagestringYesBase64 encoded image or image URL of the driver's license

Responses

CodeDescription
200License data extracted successfully
400Missing image or extraction failed
500Server error

Events

Create a new booking event

POST /events

Request body

FieldTypeRequiredDescription
transactionidstringNo
rentalIdstringNo
event_typestringNo
eventTypestringNo
event_changestringNo
eventLabelstringNo
contentstringNo
detailsobjectNo
actorNamestringNo
actorIdstringNo
customerIdstringNo

Responses

CodeDescription
200Event created successfully
500Error creating event

Get events for booking(s)

GET /events

Parameters

NameInTypeRequiredDescription
transactionidquerystringNoSingle rental ID (backward compat)
rentalIdsquerystringNoComma-separated rental IDs for batch fetch

Responses

CodeDescription
200Events retrieved successfully
400transactionid or rentalIds is required
500Error retrieving events

Was this page helpful?
Need help? Contact Support.See what’s new. Check out changelog.Questions? Book a video chat.
Ask AI
Responses are generated using AI and may contain mistakes.
Ask questions about RentalTide and get help with your integration.