---
title: "Reads a product's quiz results."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › quiz

`GET /v1/stores/{store}/products/{product}/quizzes/stats`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `quiz:read`

## Path parameters

- `store` (`quizStats.path.store`; string, required) — The store's id.
- `product` (`quizStats.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1

## Query parameters

- `from` (`quizStats.query.from`; string, optional)
  - format `date`
- `to` (`quizStats.query.to`; string, optional)
  - format `date`
- `quiz` (`quizStats.query.quiz`; string, optional) — An id.
  - minLength 1

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/quizzes/stats' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/quizzes/stats';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/quizzes/stats"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Reads a product's quiz results.

#### Example

```json
{
  "entries": [
    {
      "total": 0,
      "by_status": {
        "started": 0,
        "submitted": 0,
        "passed": 0,
        "failed": 0,
        "forfeited": 0
      },
      "pass_rate": 0,
      "average_score": 0,
      "average_seconds": 0,
      "entry_id": "string"
    }
  ],
  "total": 0,
  "by_status": {
    "started": 0,
    "submitted": 0,
    "passed": 0,
    "failed": 0,
    "forfeited": 0
  },
  "pass_rate": 0,
  "average_score": 0,
  "average_seconds": 0,
  "time_zone": "string",
  "from": "string",
  "to": "string",
  "quizzes": 0
}
```

- `entries` (`quizStats.response.200.entries`; array<object>, required)
  - `total` (`quizStats.response.200.entries.total`; number, required)
  - `by_status` (`quizStats.response.200.entries.by_status`; object, required)
    - `started` (`quizStats.response.200.entries.by_status.started`; number, required)
    - `submitted` (`quizStats.response.200.entries.by_status.submitted`; number, required)
    - `passed` (`quizStats.response.200.entries.by_status.passed`; number, required)
    - `failed` (`quizStats.response.200.entries.by_status.failed`; number, required)
    - `forfeited` (`quizStats.response.200.entries.by_status.forfeited`; number, required)
  - `pass_rate` (`quizStats.response.200.entries.pass_rate`; any of, required)
    - any of: `number`, `null`
  - `average_score` (`quizStats.response.200.entries.average_score`; any of, required)
    - any of: `number`, `null`
  - `average_seconds` (`quizStats.response.200.entries.average_seconds`; any of, required)
    - any of: `number`, `null`
  - `entry_id` (`quizStats.response.200.entries.entry_id`; string, required)
- `total` (`quizStats.response.200.total`; number, required)
- `by_status` (`quizStats.response.200.by_status`; object, required)
  - `started` (`quizStats.response.200.by_status.started`; number, required)
  - `submitted` (`quizStats.response.200.by_status.submitted`; number, required)
  - `passed` (`quizStats.response.200.by_status.passed`; number, required)
  - `failed` (`quizStats.response.200.by_status.failed`; number, required)
  - `forfeited` (`quizStats.response.200.by_status.forfeited`; number, required)
- `pass_rate` (`quizStats.response.200.pass_rate`; any of, required)
  - any of: `number`, `null`
- `average_score` (`quizStats.response.200.average_score`; any of, required)
  - any of: `number`, `null`
- `average_seconds` (`quizStats.response.200.average_seconds`; any of, required)
  - any of: `number`, `null`
- `time_zone` (`quizStats.response.200.time_zone`; string, required)
- `from` (`quizStats.response.200.from`; any of, required)
  - any of: `string`, `null`
- `to` (`quizStats.response.200.to`; any of, required)
  - any of: `string`, `null`
- `quizzes` (`quizStats.response.200.quizzes`; number, required)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`quizStats.response.default.type`; string, required)
  - format `uri`
- `title` (`quizStats.response.default.title`; string, required)
- `status` (`quizStats.response.default.status`; integer, required)
- `detail` (`quizStats.response.default.detail`; string, required)
- `code` (`quizStats.response.default.code`; string, optional)
- `context` (`quizStats.response.default.context`; object, optional)
- `reached_core` (`quizStats.response.default.reached_core`; boolean, optional)
- `core_answer` (`quizStats.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/quiz-stats/index.md
