Skip to main content
GET
/
products
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  appID: 'app_xxxxxxxxxxxxxx',
  apiKey: 'My API Key',
});

// Automatically fetches more pages as needed.
for await (const productListItem of client.products.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {
  console.log(productListItem.id);
}
{
  "data": [
    {
      "id": "prod_xxxxxxxxxxxxx",
      "title": "<string>",
      "visibility": "visible",
      "headline": "<string>",
      "verified": true,
      "business_type": "education_program",
      "industry_type": "trading",
      "created_at": 1701406800,
      "updated_at": 1701406800,
      "member_count": 42,
      "route": "<string>",
      "published_reviews_count": 42
    }
  ],
  "page_info": {
    "end_cursor": "<string>",
    "start_cursor": "<string>",
    "has_next_page": true,
    "has_previous_page": true
  }
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Query Parameters

after
string | null

Returns the elements in the list that come after the specified cursor.

before
string | null

Returns the elements in the list that come before the specified cursor.

first
integer | null

Returns the first n elements from the list.

Example:

42

last
integer | null

Returns the last n elements from the list.

Example:

42

company_id
string
required

The ID of the company to filter products by

Example:

"biz_xxxxxxxxxxxxxx"

product_types
enum<string>[] | null

The type of products to filter by

visibilities
enum<string>[] | null

The visibility of the products to filter by

order
enum<string> | null

The order of the products The ways a relation of AccessPasses can be ordered

Available options:
active_memberships_count,
created_at,
usd_gmv,
usd_gmv_30_days
direction
enum<string> | null

The direction of the order The direction of the sort.

Available options:
asc,
desc

Response

A successful response

The connection type for PublicAccessPass.

data
object[]
required

A list of nodes.

page_info
object
required

Information to aid in pagination.

I