polarsource/polar

Make /products and /organizations endpoints authenticated only

Closed this issue · 1 comments

Now that creators discovery is not really a thing anymore, we should rework the /products and /organizations endpoints so they are targetted only at the creators themselves, i.e. working only on the products/organizations they own.

This will dramatically ease things in terms of implementation and API design. Typically, I'm currently struggling with custom fields, because I don't really want to output them in the products schema for the anonymous users.


What about storefronts? Since we easily know upfront which organizations have storefront enabled, we can easily create a /storefront endpoint which will return all in one:

  • Organization data
  • Products data

If the organization doesn't have storefront enabled, return 404. No other way to discover products.

Bonus point: it'll make the storefront load faster.

Fully agree and really like this approach @frankie567. Go for it 👏