---
title: "Get Cancellation Stats"
method: GET
path: "/api/v1/stats/cancellations"
tags: ["stats"]
---

# Get Cancellation Stats

`GET /api/v1/stats/cancellations`

## Request

- Base URL: `https://api.alert.camp` (the document declares no server; this is the origin it was published from)
- URL: `https://api.alert.camp/api/v1/stats/cancellations`
- Auth: none declared

Get aggregate cancellation statistics.

Returns overview metrics, per-park breakdown, day-of-week distribution,
and lead time buckets for the specified rolling window.

## Query parameters

- `days` integer: Rolling window in days

## Headers

- `authorization` string, nullable
- `x-dev-user-id` string, nullable
- `x-app-version` string, nullable

## Response `200`

Successful Response

- CancellationStatsResponse: Full cancellation statistics response.
  - `overview` CancellationOverview, required: Aggregate overview of cancellation events.
    - `total_cancellations` integer, required
    - `total_rebooked` integer, required
    - `rebooking_rate` number, required
    - `avg_nights` number, nullable, required
    - `avg_rebooking_delay_minutes` number, nullable, required
    - `median_rebooking_delay_minutes` number, nullable, required
    - `avg_days_until` number, nullable, required
    - `period_start` string, date-time, nullable, required
    - `period_end` string, date-time, nullable, required
  - `by_park` ParkCancellationStats[], required
    - `park_id` string, required
    - `park_name` string, nullable, required
    - `cancellation_count` integer, required
  - `by_day_of_week` DayOfWeekStats[], required
    - `day_of_week` integer, required
    - `cancellation_count` integer, required
  - `by_hour_of_day` HourOfDayStats[], required
    - `hour` integer, required
    - `cancellation_count` integer, required
  - `lead_time_distribution` LeadTimeBucket[], required
    - `bucket` string, required
    - `count` integer, required
  - `by_detection_month` MonthStats[], required
    - `month` integer, required
    - `cancellation_count` integer, required
  - `by_camping_month` MonthStats[], required
    - `month` integer, required
    - `cancellation_count` integer, required
  - `rebooking_speed_by_park` ParkRebookingSpeed[], required
    - `park_id` string, required
    - `park_name` string, nullable, required
    - `avg_rebooking_delay_minutes` number, nullable, required
    - `median_rebooking_delay_minutes` number, nullable, required
    - `sample_size` integer, required
  - `alert_success_rate` AlertSuccessRate, required: Alert success rate over a period.
    - `total_alerts` integer, required
    - `alerts_with_matches` integer, required
    - `success_rate` number, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/alert/apis/alertcamp.md) · [All operations](https://skmtc.dev/alert/apis/alertcamp/llms.txt) · [OpenAPI document](https://skmtc.dev/alert/apis/alertcamp/revisions/864c8c9ef833?raw)
