> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetPremiumStats

# Package: onlinePrograms

# Namespace: ParticipantsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/participants/get-premium-stats.md

## Permission Scopes:
Manage Online Programs: SCOPE.CHALLENGES.MANAGE

## Introduction

Retrieves premium plan statistics for the site.

---

## REST API

### Schema

```
 Method: getPremiumStats
 Description: Retrieves premium plan statistics for the site.
 URL: https://www.wixapis.com/online-programs/participants/v3/stats/premium
 Method: GET
 Return type: GetPremiumStatsResponse
  - name: premiumEnabled | type: boolean | description: Whether the site has the Online Programs premium feature.  
  - name: activeParticipantsCount | type: integer | description: Number of active participants on the site.  
  - name: activeParticipantsLimit | type: integer | description: Maximum number of active participants allowed on a site without premium.  


```

### Examples

### Get premium plan statistics
Retrieves the site's Online Programs premium status and active participant counts.

```curl
curl -X GET \
'https://www.wixapis.com/online-programs/participants/v3/stats/premium' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.participants.getPremiumStats()
 Description: Retrieves premium plan statistics for the site.
 Return type: PROMISE<GetPremiumStatsResponse>
  - name: premiumEnabled | type: boolean | description: Whether the site has the Online Programs premium feature.  
  - name: activeParticipantsCount | type: integer | description: Number of active participants on the site.  
  - name: activeParticipantsLimit | type: integer | description: Maximum number of active participants allowed on a site without premium.  


```

### Examples

### Get premium plan statistics
Retrieves the site's Online Programs premium status and participant limit.

```javascript
import { participants } from "@wix/online-programs";

async function getPremiumStats() {
  const response = await participants.getPremiumStats();

  return response;
}

/* Promise resolves to:
 * {
 *   "premiumEnabled": true,
 *   "activeParticipantsCount": 0,
 *   "activeParticipantsLimit": 1
 * }
 */

```

### getPremiumStats (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { participants } from '@wix/online-programs';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { participants },
  // Include the auth strategy and host as relevant
});


async function getPremiumStats() {
  const response = await myWixClient.participants.getPremiumStats();
};
```

---