{"openapi":"3.1.0","info":{"title":"Blue Door Movies API","version":"0.1.0","description":"Draft REST contract for cinema movies, theaters, showtimes, prices, occupancy, and seat availability. This is a read/intelligence API, not a booking API.\n"},"servers":[{"url":"https://api.bluedoor.sh/movies","description":"Production base"},{"url":"http://localhost:8000","description":"Local development"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{}],"tags":[{"name":"Support"},{"name":"Auth"},{"name":"Sources"},{"name":"Operations"},{"name":"Chains"},{"name":"Theaters"},{"name":"Movies"},{"name":"Showtimes"},{"name":"Availability"}],"paths":{"/health":{"get":{"tags":["Support"],"summary":"Process health check","operationId":"getHealth","responses":{"200":{"description":"Process is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/healthz":{"get":{"tags":["Support"],"summary":"Orchestrator health check","operationId":"getHealthz","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1":{"get":{"tags":["Support"],"summary":"API index","operationId":"getIndex","responses":{"200":{"description":"API index and route links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexEnvelope"}}}}}}},"/v1/openapi.json":{"get":{"tags":["Support"],"summary":"OpenAPI contract","operationId":"getOpenApiJson","responses":{"200":{"description":"OpenAPI document","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/stats":{"get":{"tags":["Support"],"summary":"Service statistics","operationId":"getStats","responses":{"200":{"description":"Counts and freshness","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsEnvelope"}}}}}}},"/v1/usage":{"get":{"tags":["Support"],"summary":"Current API credit usage","operationId":"getUsage","responses":{"200":{"description":"Credit usage for the resolved API identity","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/auth/otp":{"post":{"tags":["Auth"],"summary":"Request an email verification code","operationId":"requestAuthOtp","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"202":{"description":"Verification code accepted for delivery","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/auth/verify":{"post":{"tags":["Auth"],"summary":"Verify an email code and issue a management token","operationId":"verifyAuthOtp","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"type":"string","format":"email"},"code":{"type":"string","pattern":"^[0-9]{6}$"},"create_key":{"type":"boolean","default":true},"label":{"type":"string","maxLength":80}}}}}},"responses":{"200":{"description":"Management token and optionally a one-time API key secret","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/auth/keys":{"get":{"tags":["Auth"],"summary":"List API keys for the verified email identity","operationId":"listAuthKeys","security":[{"BearerAuth":[]}],"parameters":[{"name":"include_revoked","in":"query","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"API keys for the management token email","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Auth"],"summary":"Create another API key for the verified email identity","operationId":"createAuthKey","security":[{"BearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","maxLength":80}}}}}},"responses":{"201":{"description":"New API key secret, shown once","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/v1/auth/keys/{key_id}":{"patch":{"tags":["Auth"],"summary":"Rename an API key","operationId":"updateAuthKey","security":[{"BearerAuth":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["label"],"properties":{"label":{"type":"string","maxLength":80}}}}}},"responses":{"200":{"description":"Updated API key metadata","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Auth"],"summary":"Revoke an API key","operationId":"revokeAuthKey","security":[{"BearerAuth":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked API key metadata","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/sources":{"get":{"tags":["Sources"],"summary":"List source adapters","operationId":"listSources","parameters":[{"$ref":"#/components/parameters/Capability"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Source adapters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceListEnvelope"}}}}}}},"/v1/artifacts":{"get":{"tags":["Operations"],"summary":"List imported source artifacts","operationId":"listArtifacts","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"parameters":[{"name":"source_id","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/ChainId"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Recent source artifacts known to the read model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactListEnvelope"}}}}}}},"/v1/analytics":{"get":{"tags":["Operations"],"summary":"Internal API and sync analytics","operationId":"getAnalytics","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":90,"default":7},"description":"Rolling window for usage, rate-limit, auth, and sync aggregates."},{"name":"top_limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"description":"Maximum number of top rows returned per analytics section."}],"responses":{"200":{"description":"Protected internal dashboard analytics backed by Postgres control-plane tables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsEnvelope"}}}},"401":{"$ref":"#/components/responses/Error"}}}},"/v1/sync-jobs":{"get":{"tags":["Operations"],"summary":"List configured periodic sync jobs","operationId":"listSyncJobs","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"parameters":[{"name":"include_all","in":"query","schema":{"type":"boolean","default":false},"description":"Include opt-in jobs such as browser/CDP collectors."},{"name":"profile","in":"query","schema":{"type":"string","enum":["daily","browser","all"],"default":"daily"},"description":"Select the configured sync profile when include_all is false."},{"name":"requires_browser","in":"query","schema":{"type":"boolean"},"description":"Filter to browser-required or non-browser jobs."},{"name":"requires_fresh_cookies","in":"query","schema":{"type":"boolean"},"description":"Filter to jobs that need recently refreshed browser/session cookies."}],"responses":{"200":{"description":"Sync job plan and default daily profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPlanEnvelope"}}}},"401":{"$ref":"#/components/responses/Error"}}}},"/v1/sync-runs":{"get":{"tags":["Operations"],"summary":"List recent source sync and import runs","operationId":"listSyncRuns","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"parameters":[{"name":"source_id","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/ChainId"},{"name":"status","in":"query","schema":{"type":"string","enum":["running","succeeded","partial","failed"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Recent sync runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRunListEnvelope"}}}}}}},"/v1/sync-status":{"get":{"tags":["Operations"],"summary":"Per-source sync freshness and read-model status","operationId":"getSyncStatus","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"parameters":[{"name":"source_id","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/ChainId"},{"name":"include_inactive","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Source-level sync freshness, latest run, latest artifact, and coverage counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncStatusListEnvelope"}}}},"401":{"$ref":"#/components/responses/Error"}}}},"/v1/coverage":{"get":{"tags":["Sources"],"summary":"Coverage by source, chain, theater, date, and capability","operationId":"getCoverage","parameters":[{"$ref":"#/components/parameters/ChainId"},{"$ref":"#/components/parameters/TheaterIdQuery"},{"$ref":"#/components/parameters/Date"},{"$ref":"#/components/parameters/Capability"}],"responses":{"200":{"description":"Coverage records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageEnvelope"}}}}}}},"/v1/chains":{"get":{"tags":["Chains"],"summary":"List cinema chains","operationId":"listChains","parameters":[{"$ref":"#/components/parameters/Capability"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Chains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainListEnvelope"}}}}}}},"/v1/chains/{chain_id}":{"get":{"tags":["Chains"],"summary":"Get chain detail","operationId":"getChain","parameters":[{"$ref":"#/components/parameters/ChainIdPath"}],"responses":{"200":{"description":"Chain detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/theaters/search":{"get":{"tags":["Theaters"],"summary":"Search theaters","operationId":"searchTheaters","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"lat","in":"query","schema":{"type":"number","format":"double"}},{"name":"lon","in":"query","schema":{"type":"number","format":"double"}},{"name":"radius_miles","in":"query","schema":{"type":"number","format":"double","default":25,"minimum":0}},{"name":"bbox","in":"query","description":"min_lon,min_lat,max_lon,max_lat","schema":{"type":"string"}},{"$ref":"#/components/parameters/ChainId"},{"name":"state","in":"query","schema":{"type":"string"}},{"name":"city","in":"query","schema":{"type":"string"}},{"name":"postal_code","in":"query","schema":{"type":"string"}},{"name":"has_seatmaps","in":"query","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/Capability"},{"name":"updated_after","in":"query","schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Matching theaters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TheaterListEnvelope"}}}}}}},"/v1/theaters/{theater_id}":{"get":{"tags":["Theaters"],"summary":"Get theater detail","operationId":"getTheater","parameters":[{"$ref":"#/components/parameters/TheaterIdPath"}],"responses":{"200":{"description":"Theater detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TheaterEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/theaters/{theater_id}/showtimes":{"get":{"tags":["Showtimes"],"summary":"List showtimes for a theater","operationId":"listTheaterShowtimes","parameters":[{"$ref":"#/components/parameters/TheaterIdPath"},{"$ref":"#/components/parameters/Date"},{"$ref":"#/components/parameters/Days"},{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"$ref":"#/components/parameters/Include"},{"$ref":"#/components/parameters/SeatDetail"},{"$ref":"#/components/parameters/SourceMode"},{"$ref":"#/components/parameters/Freshness"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Theater showtimes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowtimeListEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/movies/search":{"get":{"tags":["Movies"],"summary":"Search movies","operationId":"searchMovies","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"playing_now","in":"query","description":"When true, only returns movies with current or future showtimes.","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/Date"},{"$ref":"#/components/parameters/Days"},{"name":"near","in":"query","description":"Convenience location string; prefer lat/lon for exact search.","schema":{"type":"string"}},{"name":"lat","in":"query","schema":{"type":"number","format":"double"}},{"name":"lon","in":"query","schema":{"type":"number","format":"double"}},{"name":"radius_miles","in":"query","schema":{"type":"number","format":"double","default":25}},{"$ref":"#/components/parameters/ChainId"},{"$ref":"#/components/parameters/TheaterIdQuery"},{"$ref":"#/components/parameters/Include"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Matching movies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovieListEnvelope"}}}}}}},"/v1/movies/{movie_id}":{"get":{"tags":["Movies"],"summary":"Get movie detail","operationId":"getMovie","parameters":[{"$ref":"#/components/parameters/MovieIdPath"}],"responses":{"200":{"description":"Movie detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovieEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/movies/{movie_id}/showtimes":{"get":{"tags":["Showtimes"],"summary":"List showtimes for a movie","operationId":"listMovieShowtimes","parameters":[{"$ref":"#/components/parameters/MovieIdPath"},{"name":"near","in":"query","schema":{"type":"string"}},{"name":"lat","in":"query","schema":{"type":"number","format":"double"}},{"name":"lon","in":"query","schema":{"type":"number","format":"double"}},{"name":"radius_miles","in":"query","schema":{"type":"number","format":"double","default":25}},{"$ref":"#/components/parameters/Date"},{"$ref":"#/components/parameters/Days"},{"$ref":"#/components/parameters/ChainId"},{"$ref":"#/components/parameters/TheaterIdQuery"},{"$ref":"#/components/parameters/Include"},{"$ref":"#/components/parameters/SeatDetail"},{"$ref":"#/components/parameters/SourceMode"},{"$ref":"#/components/parameters/Freshness"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Movie showtimes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowtimeListEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/showtimes/search":{"get":{"tags":["Showtimes"],"summary":"Search showtimes","description":"Defaults to current/future screenings when date, from, and to are omitted. Supply an explicit date or time window to query historical rows.","operationId":"searchShowtimes","parameters":[{"$ref":"#/components/parameters/TheaterIdQuery"},{"$ref":"#/components/parameters/MovieIdQuery"},{"$ref":"#/components/parameters/ChainId"},{"$ref":"#/components/parameters/Date"},{"$ref":"#/components/parameters/Days"},{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"name":"business_date","in":"query","schema":{"type":"string","format":"date"}},{"name":"lat","in":"query","schema":{"type":"number","format":"double"}},{"name":"lon","in":"query","schema":{"type":"number","format":"double"}},{"name":"radius_miles","in":"query","schema":{"type":"number","format":"double","default":25}},{"name":"format","in":"query","schema":{"type":"string"}},{"name":"has_seatmap","in":"query","schema":{"type":"boolean"}},{"name":"seating_type","in":"query","schema":{"$ref":"#/components/schemas/SeatingType"}},{"$ref":"#/components/parameters/Include"},{"$ref":"#/components/parameters/SeatDetail"},{"$ref":"#/components/parameters/SourceMode"},{"$ref":"#/components/parameters/Freshness"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Matching showtimes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowtimeListEnvelope"}}}}}}},"/v1/showtimes/{showtime_id}":{"get":{"tags":["Showtimes"],"summary":"Get showtime detail","operationId":"getShowtime","parameters":[{"$ref":"#/components/parameters/ShowtimeIdPath"},{"$ref":"#/components/parameters/Include"},{"$ref":"#/components/parameters/SeatDetail"}],"responses":{"200":{"description":"Showtime detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowtimeEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/showtimes/{showtime_id}/seatmap":{"get":{"tags":["Availability"],"summary":"Get seat availability for one showtime","operationId":"getShowtimeSeatmap","parameters":[{"$ref":"#/components/parameters/ShowtimeIdPath"},{"$ref":"#/components/parameters/SeatDetail"},{"$ref":"#/components/parameters/SourceMode"},{"$ref":"#/components/parameters/Freshness"}],"responses":{"200":{"description":"Seat availability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatMapEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnsupportedCapability"},"503":{"$ref":"#/components/responses/UpstreamUnavailable"}}}},"/v1/showtimes/{showtime_id}/prices":{"get":{"tags":["Availability"],"summary":"Get ticket types and prices for one showtime","operationId":"getShowtimePrices","parameters":[{"$ref":"#/components/parameters/ShowtimeIdPath"},{"$ref":"#/components/parameters/SourceMode"},{"$ref":"#/components/parameters/Freshness"}],"responses":{"200":{"description":"Prices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnsupportedCapability"},"503":{"$ref":"#/components/responses/UpstreamUnavailable"}}}},"/v1/availability/snapshot":{"post":{"tags":["Availability"],"summary":"Run a bounded batch availability query","operationId":"createAvailabilitySnapshot","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilitySnapshotRequest"}}}},"responses":{"200":{"description":"Batch availability snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilitySnapshotEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"503":{"$ref":"#/components/responses/UpstreamUnavailable"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"ChainIdPath":{"name":"chain_id","in":"path","required":true,"schema":{"type":"string"}},"ChainId":{"name":"chain_id","in":"query","schema":{"type":"string"}},"TheaterIdPath":{"name":"theater_id","in":"path","required":true,"schema":{"type":"string"}},"TheaterIdQuery":{"name":"theater_id","in":"query","schema":{"type":"string"}},"MovieIdPath":{"name":"movie_id","in":"path","required":true,"schema":{"type":"string"}},"MovieIdQuery":{"name":"movie_id","in":"query","schema":{"type":"string"}},"ShowtimeIdPath":{"name":"showtime_id","in":"path","required":true,"schema":{"type":"string"}},"Date":{"name":"date","in":"query","description":"Cinema business date in YYYY-MM-DD format.","schema":{"type":"string","format":"date"}},"Days":{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":45,"default":1}},"From":{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},"To":{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},"Include":{"name":"include","in":"query","description":"Comma-separated expansions such as movie,theater,prices,seat_summary,occupancy.","schema":{"type":"string"}},"SeatDetail":{"name":"seat_detail","in":"query","schema":{"type":"string","enum":["none","summary","grid"],"default":"summary"}},"SourceMode":{"name":"source_mode","in":"query","schema":{"$ref":"#/components/schemas/SourceMode"}},"Freshness":{"name":"freshness","in":"query","description":"Maximum acceptable age, for example 10m, 1h, or 1d.","schema":{"type":"string","pattern":"^[0-9]+[mhd]$"}},"Capability":{"name":"capability","in":"query","schema":{"$ref":"#/components/schemas/CapabilityName"}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},"Cursor":{"name":"cursor","in":"query","schema":{"type":"string"}}},"responses":{"Error":{"description":"Error envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"NotFound":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"InsufficientCredits":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"UnsupportedCapability":{"description":"Requested source/session cannot support this capability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"UpstreamUnavailable":{"description":"Live upstream source unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"schemas":{"HealthResponse":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"generated_at":{"type":"string","format":"date-time"}}},"Meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"source_mode":{"$ref":"#/components/schemas/SourceMode"},"freshness":{"type":"object","properties":{"max_age_seconds":{"type":"integer"},"oldest_captured_at":{"type":"string","format":"date-time"},"newest_captured_at":{"type":"string","format":"date-time"}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"credits_charged":{"type":"number"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/Warning"}},"requested_days":{"type":"integer"},"resolved_days":{"type":"integer"},"source_horizons":{"type":"array","items":{"$ref":"#/components/schemas/SourceHorizon"}}}},"Pagination":{"type":"object","properties":{"limit":{"type":"integer"},"next_cursor":{"type":["string","null"]}}},"Warning":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["general_admission_no_grid","stale_availability"]},"message":{"type":"string"},"source_id":{"type":"string"},"showtime_id":{"type":"string"}}},"ErrorEnvelope":{"type":"object","required":["error","meta"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["not_found","unsupported_capability","upstream_unavailable"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"SourceMode":{"type":"string","enum":["cached","live","auto"],"default":"cached"},"CapabilityName":{"type":"string","enum":["showtimes","prices","ticket_types","occupancy_rate","occupancy_counts","seat_summary","seat_grid","general_admission","booking_url"]},"DataCapabilities":{"type":"object","properties":{"showtimes":{"type":"boolean"},"prices":{"type":"boolean"},"ticket_types":{"type":"boolean"},"occupancy_rate":{"type":"boolean"},"occupancy_counts":{"type":"boolean"},"seat_summary":{"type":"boolean"},"seat_grid":{"type":"boolean"},"general_admission":{"type":"boolean"},"booking_url":{"type":"boolean"},"live_refresh":{"type":"boolean"},"source_modes":{"type":"array","items":{"$ref":"#/components/schemas/SourceMode"}}}},"SourceLineage":{"type":"object","properties":{"source_id":{"type":"string"},"chain_id":{"type":"string"},"adapter":{"type":"string"},"platform":{"type":"string"},"captured_at":{"type":"string","format":"date-time"},"raw_ids":{"type":"object","additionalProperties":{"type":"string"}},"artifact_id":{"type":"string"},"limitations":{"type":"array","items":{"type":"string"}}}},"SourceHorizon":{"type":"object","properties":{"source_id":{"type":"string"},"chain_id":{"type":"string"},"max_horizon_days":{"type":"integer"},"first_available_date":{"type":"string","format":"date"},"last_available_date":{"type":"string","format":"date"},"horizon_source":{"type":"string","enum":["static","probed","source_reported","unknown"]}}},"Chain":{"type":"object","required":["id","name","capabilities"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","partial","blocked","defunct","unknown"]},"platforms":{"type":"array","items":{"type":"string"}},"theater_count":{"type":"integer"},"capabilities":{"$ref":"#/components/schemas/DataCapabilities"},"coverage":{"$ref":"#/components/schemas/CoverageSummary"},"horizon":{"$ref":"#/components/schemas/SourceHorizon"},"source_lineage":{"$ref":"#/components/schemas/SourceLineage"}}},"Source":{"type":"object","required":["id","name","capabilities"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"chain_id":{"type":"string"},"platform":{"type":"string"},"status":{"type":"string","enum":["active","partial","blocked","unknown"]},"capabilities":{"$ref":"#/components/schemas/DataCapabilities"},"horizon":{"$ref":"#/components/schemas/SourceHorizon"},"docs":{"type":"array","items":{"type":"string"}}}},"Artifact":{"type":"object","properties":{"id":{"type":"integer"},"source_id":{"type":["string","null"]},"chain_id":{"type":["string","null"]},"artifact_type":{"type":"string"},"local_path":{"type":["string","null"]},"s3_uri":{"type":["string","null"]},"sha256":{"type":["string","null"]},"bytes":{"type":["integer","null"]},"row_count":{"type":["integer","null"]},"captured_at":{"type":["string","null"],"format":"date-time"},"imported_at":{"type":["string","null"],"format":"date-time"},"metadata":{"type":"object","additionalProperties":true}}},"SyncJob":{"type":"object","required":["id","mode","command","enabled_by_default","requires_browser","requires_fresh_cookies"],"properties":{"id":{"type":"string"},"source_id":{"type":["string","null"]},"chain_id":{"type":["string","null"]},"mode":{"type":"string","examples":["daily_full","browser_daily_full","cookie_gated_full"]},"command":{"type":"array","items":{"type":"string"}},"command_string":{"type":"string"},"description":{"type":"string"},"timeout_seconds":{"type":"integer"},"enabled_by_default":{"type":"boolean"},"default_daily":{"type":"boolean"},"requires_browser":{"type":"boolean"},"requires_fresh_cookies":{"type":"boolean"}}},"SyncRun":{"type":"object","properties":{"id":{"type":"string"},"source_id":{"type":["string","null"]},"chain_id":{"type":["string","null"]},"mode":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","partial","failed"]},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"planned":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"},"error_message":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":true}}},"SyncStatus":{"type":"object","properties":{"source_id":{"type":"string"},"chain_id":{"type":["string","null"]},"chain_name":{"type":["string","null"]},"source_name":{"type":"string"},"platform":{"type":["string","null"]},"source_status":{"type":"string"},"health":{"type":"string","enum":["ok","empty","failed","partial","missing_artifact"]},"counts":{"$ref":"#/components/schemas/CoverageSummary"},"coverage":{"$ref":"#/components/schemas/CoverageSummary"},"latest_run":{"$ref":"#/components/schemas/SyncRun"},"latest_artifact":{"$ref":"#/components/schemas/Artifact"}}},"AnalyticsMetricRow":{"type":"object","properties":{"usecase":{"type":"string"},"route":{"type":"string"},"route_family":{"type":"string"},"status":{"type":"string"},"count":{"type":"integer"},"calls":{"type":"integer"},"runs":{"type":"integer"},"windows":{"type":"integer"},"identities":{"type":"integer"},"credits":{"type":"number"},"requests":{"type":"integer"},"blocked_estimate":{"type":"integer"},"planned":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"},"last_seen_at":{"type":["string","null"],"format":"date-time"},"latest_started_at":{"type":["string","null"],"format":"date-time"},"latest_finished_at":{"type":["string","null"],"format":"date-time"}}},"AnalyticsSummary":{"type":"object","required":["window","usage","rate_limits","auth","sync"],"properties":{"window":{"type":"object","required":["days","top_limit"],"properties":{"days":{"type":"integer"},"top_limit":{"type":"integer"}}},"usage":{"type":"object","required":["totals","by_usecase","by_route"],"properties":{"totals":{"type":"object","properties":{"ledger_entries":{"type":"integer"},"identities":{"type":"integer"},"credits":{"type":"number"},"last_seen_at":{"type":["string","null"],"format":"date-time"}}},"by_usecase":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsMetricRow"}},"by_route":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsMetricRow"}}}},"rate_limits":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsMetricRow"}},"auth":{"type":"object","properties":{"active_keys":{"type":"integer"},"revoked_keys":{"type":"integer"},"expired_keys":{"type":"integer"},"key_emails":{"type":"integer"},"latest_key_created_at":{"type":["string","null"],"format":"date-time"},"latest_key_used_at":{"type":["string","null"],"format":"date-time"},"credit_accounts":{"type":"object","properties":{"accounts":{"type":"integer"},"accounts_with_balance":{"type":"integer"},"credits_used":{"type":"number"},"credits_granted":{"type":"number"}}},"limit_requests_by_status":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsMetricRow"}}}},"sync":{"type":"object","required":["runs_by_status","source_health_counts","sources_attention"],"properties":{"runs_by_status":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsMetricRow"}},"source_health_counts":{"type":"object","additionalProperties":{"type":"integer"}},"sources_attention":{"type":"array","items":{"type":"object","properties":{"source_id":{"type":"string"},"chain_id":{"type":["string","null"]},"source_status":{"type":"string"},"health":{"type":"string"},"counts":{"$ref":"#/components/schemas/CoverageSummary"},"latest_run":{"$ref":"#/components/schemas/SyncRun"},"latest_artifact":{"$ref":"#/components/schemas/Artifact"}}}}}}}},"Address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}},"Geo":{"type":"object","properties":{"lat":{"type":"number","format":"double"},"lon":{"type":"number","format":"double"}}},"Theater":{"type":"object","required":["id","chain_id","name"],"properties":{"id":{"type":"string"},"chain_id":{"type":"string"},"source_theater_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"},"geo":{"$ref":"#/components/schemas/Geo"},"timezone":{"type":"string"},"phone":{"type":"string"},"website_url":{"type":"string","format":"uri"},"amenities":{"type":"array","items":{"type":"string"}},"formats":{"type":"array","items":{"type":"string"}},"capabilities":{"$ref":"#/components/schemas/DataCapabilities"},"coverage":{"$ref":"#/components/schemas/CoverageSummary"},"source_lineage":{"$ref":"#/components/schemas/SourceLineage"}}},"MovieAlias":{"type":"object","required":["source","type","value"],"properties":{"source":{"type":"string"},"type":{"type":"string","examples":["tmdb_id","imdb_id","source_movie_id","vista_ho_code"]},"value":{"type":"string"}}},"Movie":{"type":"object","required":["id","title"],"properties":{"id":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/MovieAlias"}},"title":{"type":"string"},"original_title":{"type":"string"},"release_date":{"type":"string","format":"date"},"runtime_minutes":{"type":"integer"},"rating":{"type":"string"},"rating_reason":{"type":"string"},"genres":{"type":"array","items":{"type":"string"}},"synopsis":{"type":"string"},"images":{"type":"object","properties":{"poster":{"type":"string","format":"uri"},"backdrop":{"type":"string","format":"uri"},"thumbnail":{"type":"string","format":"uri"}}},"cast":{"type":"array","items":{"type":"string"}},"directors":{"type":"array","items":{"type":"string"}},"distributors":{"type":"array","items":{"type":"string"}},"metadata_grade":{"type":"string","enum":["rich","partial","title_only","unknown"]},"source_lineage":{"$ref":"#/components/schemas/SourceLineage"}}},"ShowtimeStatus":{"type":"string","enum":["on_sale","not_on_sale","sold_out","past","cancelled","unknown"]},"SeatingType":{"type":"string","enum":["reserved","general_admission","mixed","unknown"]},"Showtime":{"type":"object","required":["id","theater_id","movie_id","starts_at","business_date","status"],"properties":{"id":{"type":"string"},"source_showtime_id":{"type":"string"},"theater_id":{"type":"string"},"movie_id":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"starts_at_local":{"type":"string"},"business_date":{"type":"string","format":"date"},"timezone":{"type":"string"},"auditorium":{"type":"string"},"screen":{"type":"string"},"format_tags":{"type":"array","items":{"type":"string"}},"raw_format_tags":{"type":"array","items":{"type":"string"}},"language":{"type":"string"},"subtitle_language":{"type":"string"},"status":{"$ref":"#/components/schemas/ShowtimeStatus"},"booking_url":{"type":"string","format":"uri"},"capabilities":{"$ref":"#/components/schemas/DataCapabilities"},"availability_summary":{"$ref":"#/components/schemas/SeatMapSummary"},"movie":{"$ref":"#/components/schemas/Movie"},"theater":{"$ref":"#/components/schemas/Theater"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceQuote"}},"source_lineage":{"$ref":"#/components/schemas/SourceLineage"}}},"TicketAudience":{"type":"string","enum":["adult","child","senior","student","military","member","loyalty","companion","unknown"]},"PriceQuote":{"type":"object","required":["ticket_type_id","label","amount","currency"],"properties":{"ticket_type_id":{"type":"string"},"label":{"type":"string"},"audience":{"$ref":"#/components/schemas/TicketAudience"},"amount":{"type":"number","format":"double"},"currency":{"type":"string","minLength":3,"maxLength":3},"tax_amount":{"type":["number","null"],"format":"double"},"fee_amount":{"type":["number","null"],"format":"double"},"fees_included":{"type":["boolean","null"]},"area_id":{"type":"string"},"area_label":{"type":"string"},"min_quantity":{"type":"integer"},"max_quantity":{"type":"integer"},"rules":{"type":"array","items":{"type":"string"}},"source_lineage":{"$ref":"#/components/schemas/SourceLineage"}}},"SeatStatus":{"type":"string","enum":["available","sold","held","blocked","broken","gap","unknown"]},"SeatType":{"type":"string","enum":["standard","recliner","wheelchair","companion","sofa","loveseat","aisle","unknown"]},"Seat":{"type":"object","required":["id","label","status"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"row":{"type":"string"},"number":{"type":"string"},"section":{"type":"string"},"area_id":{"type":"string"},"x":{"type":"integer"},"y":{"type":"integer"},"status":{"$ref":"#/components/schemas/SeatStatus"},"seat_type":{"$ref":"#/components/schemas/SeatType"},"price_tier_id":{"type":"string"},"raw_status":{"type":"string"},"raw_type":{"type":"string"}}},"SeatMapSummary":{"type":"object","properties":{"seating_type":{"$ref":"#/components/schemas/SeatingType"},"capacity":{"type":["integer","null"]},"available":{"type":["integer","null"]},"sold":{"type":["integer","null"]},"held":{"type":["integer","null"]},"blocked":{"type":["integer","null"]},"broken":{"type":["integer","null"]},"occupancy_rate":{"type":["number","null"],"format":"double"},"captured_at":{"type":"string","format":"date-time"},"confidence":{"type":"string","enum":["high","medium","low","unknown"]}}},"SeatMap":{"type":"object","required":["showtime_id","captured_at","source_mode","seating_type","availability_grade","summary"],"properties":{"showtime_id":{"type":"string"},"captured_at":{"type":"string","format":"date-time"},"source_mode":{"$ref":"#/components/schemas/SourceMode"},"seating_type":{"$ref":"#/components/schemas/SeatingType"},"availability_grade":{"type":"string","enum":["grid","summary","count","rate","none"]},"summary":{"$ref":"#/components/schemas/SeatMapSummary"},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"row_count":{"type":"integer"},"column_count":{"type":"integer"}}}},"seats":{"type":"array","items":{"$ref":"#/components/schemas/Seat"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/Warning"}},"source_lineage":{"$ref":"#/components/schemas/SourceLineage"}}},"CoverageSummary":{"type":"object","properties":{"theaters":{"type":"integer"},"movies":{"type":"integer"},"showtimes":{"type":"integer"},"seatmaps":{"type":"integer"},"prices":{"type":"integer"},"first_business_date":{"type":"string","format":"date"},"last_business_date":{"type":"string","format":"date"},"last_captured_at":{"type":"string","format":"date-time"}}},"CoverageRecord":{"type":"object","properties":{"source_id":{"type":"string"},"chain_id":{"type":"string"},"theater_id":{"type":"string"},"business_date":{"type":"string","format":"date"},"capabilities":{"$ref":"#/components/schemas/DataCapabilities"},"counts":{"$ref":"#/components/schemas/CoverageSummary"}}},"AvailabilityArea":{"type":"object","properties":{"lat":{"type":"number","format":"double"},"lon":{"type":"number","format":"double"},"radius_miles":{"type":"number","format":"double"}}},"AvailabilitySnapshotRequest":{"type":"object","properties":{"theater_ids":{"type":"array","items":{"type":"string"}},"movie_ids":{"type":"array","items":{"type":"string"}},"chain_ids":{"type":"array","items":{"type":"string"}},"area":{"$ref":"#/components/schemas/AvailabilityArea"},"date":{"type":"string","format":"date"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"days":{"type":"integer","minimum":1,"maximum":45,"default":1},"include":{"type":"array","items":{"type":"string","enum":["movie","theater","prices","seat_summary","seat_grid","occupancy"]}},"seat_detail":{"type":"string","enum":["none","summary","grid"],"default":"summary"},"source_mode":{"$ref":"#/components/schemas/SourceMode"},"freshness":{"type":"string","pattern":"^[0-9]+[mhd]$"}}},"AvailabilitySnapshot":{"type":"object","properties":{"showtimes":{"type":"array","items":{"$ref":"#/components/schemas/Showtime"}},"seatmaps":{"type":"array","items":{"$ref":"#/components/schemas/SeatMap"}},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceQuote"}},"coverage":{"type":"array","items":{"$ref":"#/components/schemas/CoverageRecord"}}}},"IndexEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"service":{"type":"string","const":"movies"},"version":{"type":"string"},"links":{"type":"object","additionalProperties":{"type":"string"}}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"StatsEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/CoverageSummary"},"meta":{"$ref":"#/components/schemas/Meta"}}},"SourceListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"ArtifactListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Artifact"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"SyncPlan":{"type":"object","required":["default_daily_jobs","profiles","jobs"],"properties":{"default_daily_jobs":{"type":"array","items":{"type":"string"}},"profiles":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/SyncJob"}}}},"SyncPlanEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/SyncPlan"},"meta":{"$ref":"#/components/schemas/Meta"}}},"SyncRunListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SyncRun"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"SyncStatusListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SyncStatus"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"AnalyticsEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/AnalyticsSummary"},"meta":{"$ref":"#/components/schemas/Meta"}}},"CoverageEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CoverageRecord"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"ChainEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/Chain"},"meta":{"$ref":"#/components/schemas/Meta"}}},"ChainListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"TheaterEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/Theater"},"meta":{"$ref":"#/components/schemas/Meta"}}},"TheaterListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Theater"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"MovieEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/Movie"},"meta":{"$ref":"#/components/schemas/Meta"}}},"MovieListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Movie"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"ShowtimeEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/Showtime"},"meta":{"$ref":"#/components/schemas/Meta"}}},"ShowtimeListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Showtime"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"SeatMapEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/SeatMap"},"meta":{"$ref":"#/components/schemas/Meta"}}},"PriceListEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceQuote"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"AvailabilitySnapshotEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/AvailabilitySnapshot"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}}