Skip to content

[Phase 4] Expose published occurrences on GET /bookings/occurrences #158

Open

Description

@Davidslv

Epic: #151
Proposal: proposals/bookings_engine.md (local, git-excluded). Argument: https://github.com/Davidslv/notes/issues/178

Purpose

The content site can list published departures. Checkout stays on the Rails app, where the lock and the signed-in guest are.

Scope

In scope

  • GET /bookings/occurrences returns published rows: slug, offering name, start, end, places remaining, price, deposit, currency, details.
  • Places remaining is capacity minus the same sum the lock uses (held, pending_review, confirmed).
  • No authentication on this read. It exposes only published occurrences.
  • Views are not part of this issue. When a later change adds booking screens, they use ui_* if Design is present and plain markup if it is not. This issue does not generate those screens.
  • Do not generate a marketing site, an FAQ, or an Astro app.

Out of scope

  • Holding a place through this endpoint.
  • Prices in a second currency. One currency per occurrence. A second figure on a marketing page is display, in the content site.

How to deliver

Branch <issue-number>-occurrences-read. PR title [#<issue-number>] List published occurrences for the content site.

Acceptance Criteria

  • A published occurrence is in the JSON. A draft one is not.
  • Places remaining matches the lock's sum, including a pending_review booking.
  • The endpoint does not create a booking and does not call Stripe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions