---
title: "Mark Openings Seen"
method: POST
path: "/api/v1/alerts/itineraries/{itinerary_id}/openings/seen"
tags: ["itineraries"]
---

# Mark Openings Seen

`POST /api/v1/alerts/itineraries/{itinerary_id}/openings/seen`

## 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/alerts/itineraries/{itinerary_id}/openings/seen`
- Auth: none declared

Clear the NEW badge on every opening this route is currently showing.

Includes EXPIRED (rebooked) rows, not only active ones. The detail screen
renders a taken opening exactly like a live one — struck through, "booked
at ..." — so opening the screen counts as seeing it just the same. An
opening rebooked BEFORE the user opened the screen was already expired by
the time this ran, so scoping to active rows left its ``seen_at`` NULL and
stranded the "x new" badge on a row that could never be cleared — on the
detail counter and on the alerts-list badge alike.

Re-stamps rows that are already seen but have REOPENED since, because that
is what ``is_new`` now asks: ``record_openings`` revives a flickering start
day on the SAME row and keeps its ``seen_at``, so "seen once, ever" would
strand a genuinely-new availability window as read (and the bell filter,
which defaults to new-only, would then refuse to render the one bookable
trip). Scoping the UPDATE to ``seen_at IS NULL`` did exactly that. The
predicate below must stay the mirror of ``ItineraryOpening.is_new``; if one
moves, so does the other, or the badge never clears.

A user who never opens the screen never calls this, so a genuinely-unseen
opening keeps its badge.

## Path parameters

- `itinerary_id` string, required

## Headers

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

## Response `200`

Successful Response

- object

## 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)
