---
title: "Products attributed to the store's quizzes"
method: GET
path: "/v1/analytics/products"
tags: ["analytics"]
---

# Products attributed to the store's quizzes

`GET /v1/analytics/products`

## Request

- Base URL: `https://api.octaneai.com`
- URL: `https://api.octaneai.com/v1/analytics/products`
- Auth: HTTP bearer

## Query parameters

- `limit` integer
- `bucket` 'added_from_quiz' | 'shown_bought_later' | 'bought_not_shown', nullable
- `sort` 'revenue' | 'units' | 'orders'
- `from` string, date, nullable: First day, inclusive, in tz; 29 days before `to` when absent
- `to` string, date, nullable: Last day, inclusive, in tz; today when absent
- `tz` string

## Headers

- `if-none-match` string, nullable

## Response `200`

Analytics for the range. ETag identifies the cached response.

- AnalyticsProducts
  - `quiz_id` string, nullable, required: The quiz; null for every quiz of the store
  - `range` AnalyticsRange, required
    - `start` string, date, required: First day of the range, inclusive, in timezone
    - `end` string, date, required: Last day of the range, inclusive, in timezone
    - `days` integer, required
    - `timezone` string, required: IANA name of the timezone the days are counted in; UTC unless the request named one
  - `freshness` Freshness, required
    - `as_of` string, date-time, nullable, required: When the numbers for past hours were last brought up to date, UTC ISO 8601; today's visits and orders are always counted live; null before the first update
    - `next_refresh_at` string, date-time, nullable, required: When the next update is due, UTC ISO 8601; null when none is scheduled or the numbers are read live
    - `stale` boolean, required
    - `pending` boolean, required: True until every update behind these numbers has run once, so they may be incomplete
    - `closed_days_through` string, date, required: The last day whose numbers are settled: yesterday in the request's timezone
    - `today_live` boolean, required
  - `bucket` 'added_from_quiz' | 'shown_bought_later' | 'bought_not_shown', nullable, required: The how-it-was-bought group the rows and totals are narrowed to; null for all
  - `sort` 'revenue' | 'units' | 'orders', required
  - `total_products` integer, required: How many different products appear in linked orders in the range, within bucket when set
  - `line_revenue` Money, required
    - `amount` string, required: A decimal string, as "79.97"
    - `currency` string, required: ISO 4217 code
  - `totals_by_bucket` ProductBucketMoney, required
    - `added_from_quiz` Money, required
      - `amount` string, required: A decimal string, as "79.97"
      - `currency` string, required: ISO 4217 code
    - `shown_bought_later` Money, required
      - `amount` string, required: A decimal string, as "79.97"
      - `currency` string, required: ISO 4217 code
    - `bought_not_shown` Money, required
      - `amount` string, required: A decimal string, as "79.97"
      - `currency` string, required: ISO 4217 code
  - `orders_matched_by_email` integer, required: Linked orders in the range matched by the email the shopper gave
  - `rows` ProductRow[], required
    - `product_id` string, required
    - `title` string, nullable, required
    - `image_url` string, nullable, required
    - `in_store` boolean, required
    - `quiz_name` string, nullable, required: The quiz that earned most of this product's revenue; null once that quiz is deleted
    - `shown_on` ProductShownOn, required
      - `page_key` string, required
      - `page_title` string, nullable, required: The page's title; null once the page is gone from the published quiz
      - `block_key` string, nullable, required
    - `times_shown` integer, required: How many times the quiz showed the product, once per visit for each card that showed it
    - `orders_approx` integer, required: An estimate of the linked orders containing the product, once per order
    - `units` integer, required: Units of the product bought across linked orders
    - `line_revenue` Money, required
      - `amount` string, required: A decimal string, as "79.97"
      - `currency` string, required: ISO 4217 code
    - `revenue_by_bucket` ProductBucketMoney, required
      - `added_from_quiz` Money, required
        - `amount` string, required: A decimal string, as "79.97"
        - `currency` string, required: ISO 4217 code
      - `shown_bought_later` Money, required
        - `amount` string, required: A decimal string, as "79.97"
        - `currency` string, required: ISO 4217 code
      - `bought_not_shown` Money, required
        - `amount` string, required: A decimal string, as "79.97"
        - `currency` string, required: ISO 4217 code
    - `had_variants` boolean, required

## Other responses

- `304`: If-None-Match matches the cached response; no body is sent.
- `401`: The key is missing, malformed, revoked or expired.
- `403`: The store's plan has no API access, or the key lacks the scope.
- `422`: A request parameter is invalid.
- `429`: The key's or the store's bucket is full; Retry-After says when to try again.
- `503`: Request limits could not be checked for the body, or the store's details could not be read.
- `504`: The request timed out.

---

[API](https://skmtc.dev/octaneai/apis/octane-ai-merchant-api.md) - [All operations](https://skmtc.dev/octaneai/apis/octane-ai-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/octaneai/apis/octane-ai-merchant-api/revisions/dc2d1aa2b7c6?raw)
