SPTECH-562: Document GET /{version}/availabilities/status/changes (availability delta feed) - #123
pstarritt-gyg wants to merge 6 commits into
Conversation
Cursor-paginated feed of sold-out / back-in-stock availability changes. Mirrors getyourguide/public-partner-api#2038. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Each delta carries its cursor; page returns first_cursor, last_cursor and page_size. state removed (derive from vacancies). limit 1..5000, default 1000. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
_metadata is a feed-specific CursorPageMetadata (first_cursor, last_cursor, page_size, has_next_page) instead of the shared MetaData; cursors are opaque base64 strings, one per delta. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 4XX response here lives at components/responses/4XX (the internal repo names it ErrorResponse), which broke spec validation in CI. CursorPageMetadata moves to the shared metadata.yaml with element-generic wording for reuse by future cursor APIs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| `has_next_page` is true, and resume from your last stored cursor on the next poll. The | ||
| feed only contains slots that transitioned since the daily availability snapshot; absence | ||
| of a slot means it is unchanged since the snapshot. Slots whose start time has passed are | ||
| removed from the feed and never returned. |
There was a problem hiding this comment.
"never returned" overstates it — there's no date_time filter on the read path, so the ~60s cleanup job leaves expired slots in the feed for up to a minute after their start time.
You already softened this on the internal spec (#2040) to "Once a slot's start time is in the past, it will be removed from the feed"; this partner-facing copy still has the old line.
Match the internal wording so the two agree?
| required: false | ||
| schema: | ||
| type: string | ||
| example: djE6MTA0Mg |
There was a problem hiding this comment.
These examples decode to v1:1042 — the old seq-number cursor. The reader switched to v1:<timestamp>,<id> in #2040 and the internal spec examples were updated; here they're stale (same on line 82, and metadata.yaml start/end_cursor).
Cursors are opaque so nothing breaks, but the examples show a format the API won't emit.
Copy the internal examples over?
What
Documents the new cursor-paginated availability delta endpoint:
GET /{version}/availabilities/status/changes?cursor=<opaque>&limit=<1..5000>This should only be merged when we want to expose it to all partners.
Returns slots whose bookability changed (sold out / back in stock) since the given cursor, ordered by feed position.
_metadatais a feed-specificCursorPageMetadata—first_cursor,last_cursor,page_size,has_next_page. Each delta carries its own opaque base64cursor, plustour_id,option_id, slotdate_time(UTC),vacancies(0= sold out; absent = in stock, exact count unknown), andupdate_timestamp(UTC, microsecond precision, for last-write-wins application). Partners page withlast_cursorwhilehas_next_pageis true.Implementation PR (internal): getyourguide/public-partner-api#2038 — the endpoint ships dark (empty pages) until the data path and the dedicated bulk instances land, so docs publication should be coordinated with the rollout.
🤖 Generated with Claude Code