docs(catalogs): GET /api/accounts/{id}/catalogs returns org-owned catalogs (chat#1938)

Merged
SW
4mo ago
+2-2

Contract for item 1 of recoupable/chat#1938. Docs lead the api PR — this documents the widened read before the code that fulfills it.

Why

Artists already flow through organizations; catalogs do not. selectAccountCatalogs filters on a single account id with no org join, so a catalog owned by an organization account is invisible to every one of its members. On a team account, one member runs a valuation and no colleague can see the resulting catalog.

What this documents

GET /api/accounts/{id}/catalogs now returns the account's own catalogs plus the catalogs of every organization the account belongs to — so a member never has to pass the organization's id (which does not work today anyway: canAccessAccount 403s a member querying their own org, because an org account is not a member of its own org).

Also documented:

  • a catalog owned both directly and through an organization is returned once
  • an account in no organization gets only its own catalogs — unchanged behaviour
  • links to the two endpoints that can create an org-owned catalog

Scope

Org catalogs are a new concept and no existing catalog changes. Measured on prod 2026-08-05: 0 of 117 account_catalogs rows are owned by an organization account, so this alters the visibility of exactly zero existing rows. It documents a new capability, not a migration of old data. Existing catalogs stay private to whoever created them.

No schema change is involved anywhere in this issue — an organization is a row in accounts, so account_catalogs.account can already hold an organization id.

Verification

releases.json parses and still carries all 18 paths. The diff is two description strings; no schema, path, or response-code changes. catalogs.mdx stays frontmatter-only per the repo convention, so all prose lives in the OpenAPI spec.


Summary by cubic

Document widened visibility for GET /api/accounts/{id}/catalogs: an account now receives its own catalogs plus those owned by any organization it belongs to, deduplicated. No change for accounts with no org; updated endpoint and path parameter descriptions and added links to creating org-owned catalogs (chat#1938).

Summary by CodeRabbit

  • Documentation
    • Clarified that catalog results include catalogs directly owned by the account and those owned by its organizations.
    • Specified that duplicate catalogs are removed from the results.