docs(catalogs): GET /api/accounts/{id}/catalogs returns a valuation and an owner (chat#1943)
Contract for both rows of chat#1943. The two features extend the same response, so the contract lands once rather than twice; the api implementation follows, then chat renders it.
What this documents
GET /api/accounts/{id}/catalogs now returns, per catalog, its estimated value and its owner.
| Schema | Why it's new |
|---|---|
CatalogListItem | The list item = Catalog + measured_song_count + valuation + owner. Deliberately not an extension of Catalog — that schema is shared by CreateCatalogResponse and UpdateCatalogResponse, which return the bare catalog and must not claim fields they don't send. |
CatalogValuation | low / mid / high, same model as Get catalog measurements. Explicitly nullable: 34 of the 70 catalogs renamed in chat#1942 have no measured songs, and a client must render "not measured", never $0. |
CatalogOwner | id, name, image, is_organization. name and image are nullable because account_info.image genuinely is for some accounts — the Recoup organization's is null — so clients fall back to initials instead of a broken image. |
The decision worth reviewing
A catalog owned both directly and through an organization reports the organization. On prod today there are 135 account_catalogs links across 68 distinct owners, of which 1 is an organization, and 2 catalogs carry more than one owner link — so the tie-break is real, not hypothetical. The organization is the ownership worth surfacing to a member; showing "you" for a shared catalog would be the misleading half of the truth.
is_organization is a computed field, not a column: an owner is an organization when its id appears as organization_id in account_organization_ids, the inverse of the lookup getCatalogOwnerIds already does for visibility (chat#1938).
Files
api-reference/openapi/releases.json— 3 new schemas,CatalogsResponse.catalogsrepointed atCatalogListItem, and the operation description extended. 100 insertions, 3 deletions; re-parsed after the edit.
No new reference page or nav entry: this endpoint already has both.
Merge order
docs (this) → api → chat.
🤖 Generated with Claude Code
Summary by cubic
GET /api/accounts/{id}/catalogs now returns each catalog’s valuation band and owner so lists can be ranked by worth and clearly show ownership. Docs repoint the response to CatalogListItem and reuse ValuationBand for consistency with measurements.
- New Features
- Response items now use
CatalogListItem(catalog +measured_song_count+valuation+owner). - All
CatalogListItemfields are required;valuationreferencesValuationBandand may be null when no songs are measured. - Added
CatalogOwner(id, nullable name/image,is_organization; organization wins ties).
- Response items now use
Summary by CodeRabbit
- Documentation
- Updated the account catalogs API documentation to include estimated valuation ranges and ownership information.
- Catalog list responses now document enriched catalog items with valuation and owner details.