Skip to content

Cancellation rate by distribution channel

GET
/v1/reports/cancel_rate_by_channel
curl --request GET \
--url https://api.aerandil.com/v1/reports/cancel_rate_by_channel \
--header 'Authorization: Bearer <token>'

Cancellation rate per (property, distribution channel) over a business-day window: bookings, cancellations, and the ratio, grouped by the reservation source enum.

Interim surface. A hand-authored read over the cancel_rate_by_channel rollup; the conformed-metric (MetricDef) layer later supersedes it, adding the staleness tiers.

Scope: objects:read (the data derives from reservations). Live data: always Cache-Control: no-store.

property_id
string format: uuid

Narrow to one property; else all of the tenant’s properties.

from
string

Inclusive lower bound on period_start, YYYY-MM-DD.

to
string

Inclusive upper bound on period_start, YYYY-MM-DD.

The cancel-rate rows plus a computed-at meta block.

Media typeapplication/json
object
meta
required
object
computed_at
required

Newest row’s compute timestamp, or null when there are no rows.

string | null
report
required
string
rows
required
Array<object>
object
bookings
required
integer
cancel_rate
required

cancellations / bookings, or null when bookings == 0 — never NaN.

number | null
cancellations
required
integer
computed_at
required
string
period_start
required
string
property_id
required
string format: uuid
source
required

Distribution channel — the reservation source enum.

string
Examplegenerated
{
"meta": {
"computed_at": "example"
},
"report": "example",
"rows": [
{
"bookings": 1,
"cancel_rate": 1,
"cancellations": 1,
"computed_at": "example",
"period_start": "example",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"source": "example"
}
]
}
Cache-Control
string
Allowed value: no-store

Always no-store — live data is never cacheable.

invalid_date — from / to must be YYYY-MM-DD.

Media typeapplication/json

Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.

object
error
required
object
code
required

Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).

string
instance_id

Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.

string
message
required

Human-readable explanation of the failure.

string
parameters

Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).

Examplegenerated
{
"error": {
"code": "example",
"instance_id": "example",
"message": "example",
"parameters": "example"
}
}