Skip to content

fix: UEX API drift — broken endpoints and missing fields in catalog ETL steps #280

@GitAddRemote

Description

@GitAddRemote

Background

A live API audit against UEX Corp (https://uexcorp.space/api/2.0) on 2026-06-01 revealed several broken sync steps and field drift. Full audit documented in docs/schema/inventory-catalog-design.md.

Broken endpoints (404 — steps fail silently or crash)

Step file Current path Correct path / fix
pois-sync.step.ts /pois /poi
orbits-sync.step.ts /orbit_distances Endpoint removed — no live equivalent found; remove or stub this fetch
vehicles-sync.step.ts /vehicle_loaners Endpoint removed — loaners now embedded in /vehicles response as loaners[] array

Fields present in our interfaces but absent from live API

Endpoint Field Action
/planets id_orbit, is_lagrange Remove from UexPlanet interface and SQL insert
/jump_points name, size, is_available_live Remove from UexJumpPoint interface and SQL insert
/categories attributes[] Remove from UexCategory interface; station_category_attribute never populates
/commodities slug Remove from UexCommodity interface and SQL insert
/companies id_faction Remove from UexCompany interface and SQL insert

New fields in live API we are not capturing

Endpoint New field Action
/poi subtype Add to UexPoi interface and station_poi table if useful
/terminals screenshot_full, screenshot_author, mcs Evaluate — add to station_terminal or ignore
/vehicles url_photos (array), ids_vehicles_loaners url_photosattributes JSONB on catalog entry; ids_vehicles_loaners → use embedded loaners[] instead

Definition of Done

  • pois-sync.step.ts — path corrected to /poi
  • orbits-sync.step.ts/orbit_distances fetch removed or replaced
  • vehicles-sync.step.ts/vehicle_loaners fetch replaced with embedded loaners[] from /vehicles response
  • Stale fields removed from all affected interfaces and SQL inserts
  • station_poisubtype column added if keeping
  • All affected ETL steps tested against live API with no warnings or errors
  • pnpm test passes

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend services and logicbugSomething isn't workingdatabaseSchema, migrations, indexing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions