rate-suggestions.act
Act on a rate suggestion: 'accepted' writes the suggested (or override) price into room_rates for that room-type/date, 'rejected' dismisses it, 'override' records a custom price. Writes pricing — requires confirmation.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
action | enum | yes | One of: accepted, rejected, override |
overrideCents | integer | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
rate-suggestions.get_auto_mode
Read the current rate_suggestion_auto_mode setting for the tenant. Returns 'off' (no automation), 'suggest' (daily suggestions for operator review), or 'auto' (daily suggestions + auto-apply within ±20% guard). Read-only. Rate suggestions include a losHint field ({ minStay: number } | null) set when occupancy >= 75%; auto-mode writes minStay to rate_restrictions automatically.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
mode | enum | yes | One of: off, suggest, auto |
rate-suggestions.get_benchmark
Get anonymous cross-tenant benchmark rates for a specific date (p25/p50/p75 in cents). Returns null if fewer than 5 tenants are in the cohort (k-anonymity threshold). The cohort is determined by the tenant's country and room-count size band ('5-15' | '16-30' | '31-60' | '60+'). Data is refreshed daily at 03:00 UTC.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
date | string | yes |
Output fields
The whole object may be null.
| Field | Type | Required | Notes |
|---|---|---|---|
p25Cents | integer | yes | |
p50Cents | integer | yes | |
p75Cents | integer | yes | |
sampleSize | integer | yes |
rate-suggestions.get_benchmark_opt_in
Get the current tenant's benchmark opt-in status. When enabled, this tenant's room_rates contribute to the anonymous cross-tenant benchmark pool. Returns { enabled: boolean }.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | yes |
rate-suggestions.list
List AI-generated nightly rate suggestions in a date range — each with the suggested and current price (cents), a rationale, the LOS hint, and whether it was already acted on (accepted/rejected/override). Read-only.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
from | string | yes | |
to | string | yes | |
ratePlanId | string | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.id | string | yes | |
items.roomType | string · nullable | yes | |
items.date | string | yes | |
items.ratePlanId | string · nullable | yes | |
items.suggestedCents | number · nullable | yes | |
items.currentCents | number · nullable | yes | |
items.rationale | string · nullable | yes | |
items.source | string · nullable | yes | |
items.actedOn | string · nullable | yes | |
items.losHint | number · nullable | yes |
rate-suggestions.set_auto_mode
Update the rate_suggestion_auto_mode setting for the tenant. 'off' disables automation; 'suggest' enables daily generation of rate suggestions for operator review; 'auto' additionally applies suggestions that fall within the ±20% guard automatically. Requires confirmation.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
mode | enum | yes | One of: off, suggest, auto |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
mode | enum | yes | One of: off, suggest, auto |
rate-suggestions.set_benchmark_opt_in
Enable or disable this tenant's participation in the anonymous rate benchmark pool. When enabled, the tenant's room_rates feed the aggregated benchmark that all opted-in tenants in the same country + size band can see. The benchmark only surfaces when >= 5 tenants are in the cohort. Requires confirmation.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |