- GET /api/pax8/companies/[id] with requireAuth gate (D-07), UUID validation, 404 on missing - Per-subscription latest-billed cost via DISTINCT ON windowed query (Pitfall 2) - Uses line_total not unit_price*quantity (Pitfall 3); fallback label chain (Pitfall 4) - Surfaces tombstoned-subscription order-item rows with no matching subscription |
||
|---|---|---|
| .. | ||
| [id] | ||
| route.ts | ||