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

# Recommendation performance totals for a window

> Returns the merchant's recommendation performance over [from_date, to_date]: impressions, clicks, CTR, attributed add-to-carts, orders and revenue, and the derived rates, plus when the merchant's recommendation data starts. Call it for headline numbers or to compare two windows (call twice). Counts come from storefront events attributed to recommendation carousels; money figures use the shared Depict attribution rule. Read-only; answers from Tinybird analytics.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /recommendation-metrics/totals
openapi: 3.1.0
info:
  title: Search & Merchandising API
  version: 1.0.0
  description: >-
    REST API behind Depict: Search & Merchandising, the native Shopify app:
    onboarding, collections, boost & bury, dashboards, A/B testing and
    multi-store management. Endpoints are served under the /api/lite prefix and
    are authenticated with the Shopify session token that App Bridge issues to
    the embedded app.
servers:
  - url: /api/lite
security:
  - ShopifySessionToken: []
paths:
  /recommendation-metrics/totals:
    get:
      summary: Recommendation performance totals for a window
      description: >-
        Returns the merchant's recommendation performance over [from_date,
        to_date]: impressions, clicks, CTR, attributed add-to-carts, orders and
        revenue, and the derived rates, plus when the merchant's recommendation
        data starts. Call it for headline numbers or to compare two windows
        (call twice). Counts come from storefront events attributed to
        recommendation carousels; money figures use the shared Depict
        attribution rule. Read-only; answers from Tinybird analytics.
      operationId: recsMetricsTotals
      parameters:
        - schema:
            type: string
            description: Lite merchant id, e.g. `shopify-<shop id>`.
          required: true
          description: Lite merchant id, e.g. `shopify-<shop id>`.
          name: merchant_id
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            example: '2026-09-01'
            description: First day, inclusive (UTC).
          required: true
          description: First day, inclusive (UTC).
          name: from_date
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            example: '2026-09-01'
            description: Last day, inclusive (UTC).
          required: true
          description: Last day, inclusive (UTC).
          name: to_date
          in: query
        - schema:
            type: string
            description: >-
              Restricts to one Shopify market (its market group's members);
              absent or empty = every market.
          required: false
          description: >-
            Restricts to one Shopify market (its market group's members); absent
            or empty = every market.
          name: market_id
          in: query
        - schema:
            type: string
            pattern: ^[A-Z]{3}$
            description: >-
              Converts the money figures into this currency (the shop's base
              currency); absent = as summed, null when mixed.
          required: false
          description: >-
            Converts the money figures into this currency (the shop's base
            currency); absent = as summed, null when mixed.
          name: currency
          in: query
      responses:
        '200':
          description: The window's totals.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecommendationMetricsTotalsResponse'
        '400':
          description: >-
            The query, path or body failed the schema; `detail` carries zod's
            messages.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '401':
          description: Not authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '403':
          description: Authenticated, but this identity may not call the API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '404':
          description: Merchant not found for this caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    RecommendationMetricsTotalsResponse:
      type: object
      properties:
        impressions:
          type:
            - number
            - 'null'
          description: >-
            Carousels shown (distinct request ids); null where the storefront
            does not track impressions.
        clicked_impressions:
          type:
            - number
            - 'null'
          description: Carousels with at least one click; null whenever impressions is.
        clicks:
          type: number
          description: Product clicks in carousels.
        ctr:
          type:
            - number
            - 'null'
          description: clicked_impressions / impressions.
        attributed_add_to_carts:
          type: number
        attributed_orders:
          type: number
        attributed_revenue:
          type:
            - number
            - 'null'
          description: >-
            In `currency`; null when the window mixes currencies and no
            `currency` was asked for.
        currency:
          type:
            - string
            - 'null'
        revenue_currencies:
          type: array
          items:
            type: string
          description: Every currency the window's orders were placed in.
        aov:
          type:
            - number
            - 'null'
          description: attributed_revenue / attributed_orders.
        atc_rate:
          type:
            - number
            - 'null'
          description: attributed_add_to_carts / clicks.
        purchase_rate:
          type:
            - number
            - 'null'
          description: attributed_orders / clicks.
        first_data_at:
          type:
            - string
            - 'null'
          description: >-
            When the merchant's first day with a recommendation click or
            impression began (UTC); null before any. Merchant-wide.
      required:
        - impressions
        - clicked_impressions
        - clicks
        - ctr
        - attributed_add_to_carts
        - attributed_orders
        - attributed_revenue
        - currency
        - revenue_currencies
        - aov
        - atc_rate
        - purchase_rate
        - first_data_at
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
  securitySchemes:
    ShopifySessionToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Shopify App Bridge session token of the embedded Depict: Search &
        Merchandising app. The shop in the token determines the merchant;
        merchant_id parameters must belong to that shop.

````