> ## 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.

# Per-product funnel: clicks, carts, orders, performance score

> A page of products ranked by `order_by` (the performance score by default), each with clicks, add-to-carts, orders, views, revenue and their previous-period values, the product itself, the collections it sits in and a Need attention verdict. Storewide, or one collection's products with `collection_id`. Page with offset/page_size while has_more. Read-only.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /product-funnel-metrics/metrics
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:
  /product-funnel-metrics/metrics:
    get:
      summary: 'Per-product funnel: clicks, carts, orders, performance score'
      description: >-
        A page of products ranked by `order_by` (the performance score by
        default), each with clicks, add-to-carts, orders, views, revenue and
        their previous-period values, the product itself, the collections it
        sits in and a Need attention verdict. Storewide, or one collection's
        products with `collection_id`. Page with offset/page_size while
        has_more. Read-only.
      operationId: productFunnelMetrics
      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.
          required: true
          description: First day, inclusive.
          name: from_date
          in: query
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            example: '2026-09-01'
            description: Last day, inclusive.
          required: true
          description: Last day, inclusive.
          name: to_date
          in: query
        - schema:
            type:
              - integer
              - 'null'
            minimum: 0
            default: 0
            description: Rows to skip.
          required: false
          description: Rows to skip.
          name: offset
          in: query
        - schema:
            type: string
            enum:
              - DESC
              - ASC
            default: DESC
          required: false
          name: order
          in: query
        - schema:
            type: string
            enum:
              - d_score
              - clicks
              - add_to_carts
              - orders
              - product_views
              - revenue
            default: d_score
            description: d_score is the performance score.
          required: false
          description: d_score is the performance score.
          name: order_by
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 20000
            default: 100
            description: Rows per page.
          required: false
          description: Rows per page.
          name: page_size
          in: query
        - schema:
            type: string
            description: >-
              Scope the page to one collection's products, including ones with
              no activity.
          required: false
          description: >-
            Scope the page to one collection's products, including ones with no
            activity.
          name: collection_id
          in: query
        - schema:
            type: integer
            enum:
              - 1
            description: >-
              `1` appends catalogue products with no activity after the ranked
              ones (DESC, storewide only).
          required: false
          description: >-
            `1` appends catalogue products with no activity after the ranked
            ones (DESC, storewide only).
          name: include_untouched
          in: query
      responses:
        '200':
          description: One page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductFunnelMetricsPage'
        '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:
    ProductFunnelMetricsPage:
      type: object
      properties:
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/ProductFunnelMetricsResponse'
        has_more:
          type: boolean
      required:
        - metrics
        - has_more
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
    ProductFunnelMetricsResponse:
      type: object
      properties:
        merchant:
          type: string
        main_product_id:
          type: string
        clicks:
          type: number
        prev_clicks:
          type: number
        add_to_carts:
          type: number
        prev_add_to_carts:
          type: number
        orders:
          type: number
        prev_orders:
          type: number
        product_views:
          type: number
        revenue:
          type: number
        click_through_rate:
          type: number
        add_to_cart_rate:
          type: number
        order_through_rate:
          type: number
        d_score:
          type: number
        prev_d_score:
          type: number
        normalized_d_score:
          type: number
          description: 0–10.
        normalized_prev_d_score:
          type: number
        product:
          $ref: '#/components/schemas/LiteProduct'
        collections:
          type: array
          items:
            $ref: '#/components/schemas/FunnelCollectionInfo'
        needs_attention:
          $ref: '#/components/schemas/NeedsAttention'
      required:
        - merchant
        - main_product_id
        - clicks
        - prev_clicks
        - add_to_carts
        - prev_add_to_carts
        - orders
        - prev_orders
        - product_views
        - revenue
        - click_through_rate
        - add_to_cart_rate
        - order_through_rate
        - d_score
        - prev_d_score
        - normalized_d_score
        - normalized_prev_d_score
        - product
        - collections
        - needs_attention
    LiteProduct:
      type: object
      properties:
        main_product_id:
          type: string
          description: Shopify product id (numeric string).
        title:
          type: string
        handle:
          type: string
        images:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyImage'
        tags:
          type: array
          items:
            type: string
        price:
          type:
            - number
            - 'null'
        status:
          $ref: '#/components/schemas/ProductStatus'
        has_online_store_channel:
          type:
            - boolean
            - 'null'
          description: >-
            Whether the Online Store sales channel is enabled; null when
            ingestion has not stamped it.
        in_stock:
          type: boolean
        quantity:
          type: integer
          description: Summed available quantity over variants.
        badges:
          type: array
          items:
            $ref: '#/components/schemas/ProductBadge'
        skus:
          type: array
          items:
            type: string
        created_at:
          type: string
        published_at:
          type:
            - string
            - 'null'
        variants:
          type: array
          items:
            $ref: '#/components/schemas/LiteVariant'
      required:
        - main_product_id
        - title
        - handle
        - images
        - tags
        - price
        - status
        - has_online_store_channel
        - in_stock
        - quantity
        - badges
        - skus
        - created_at
        - published_at
        - variants
    FunnelCollectionInfo:
      type: object
      properties:
        collection_id:
          type: string
        position:
          type: number
          description: 0-based grid index; add one before showing it.
        title:
          type: string
        n_products:
          type: number
        image_urls:
          type: array
          items:
            type: string
        product_images:
          type:
            - array
            - 'null'
          items:
            type: string
        merchandised:
          type: boolean
          description: False for Shopify's automatic All listing (catalogue order).
        recommendation:
          type: string
          enum:
            - good
            - up
            - down
          description: >-
            Need attention verdict for this grid: up = sells but sits low, down
            = prominent but barely sells.
      required:
        - collection_id
        - position
        - title
        - n_products
        - image_urls
        - product_images
        - merchandised
        - recommendation
    NeedsAttention:
      type: object
      properties:
        uncartable:
          type: boolean
        bring_up_collection_id:
          type:
            - string
            - 'null'
        take_action_collection_id:
          type:
            - string
            - 'null'
      required:
        - uncartable
        - bring_up_collection_id
        - take_action_collection_id
    ShopifyImage:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
        width:
          type:
            - integer
            - 'null'
        height:
          type:
            - integer
            - 'null'
        alt:
          type:
            - string
            - 'null'
      required:
        - id
        - url
    ProductStatus:
      type: string
      enum:
        - ACTIVE
        - ARCHIVED
        - DRAFT
        - SCHEDULED
        - UNLISTED
    ProductBadge:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - on_sale
            sale_percentage:
              type: number
            markets_on_sale:
              type:
                - array
                - 'null'
              items:
                type: object
                properties:
                  market_id:
                    type: string
                  display_name:
                    type: string
                required:
                  - market_id
                  - display_name
              description: Markets where the product is on sale, when not all are.
            total_markets:
              type:
                - integer
                - 'null'
            market_group_display_name:
              type:
                - string
                - 'null'
          required:
            - type
            - sale_percentage
        - type: object
          properties:
            type:
              type: string
              enum:
                - out_of_stock
          required:
            - type
        - type: object
          properties:
            type:
              type: string
              enum:
                - partially_out_of_stock
          required:
            - type
        - type: object
          properties:
            type:
              type: string
              enum:
                - partially_low_stock
          required:
            - type
        - type: object
          properties:
            type:
              type: string
              enum:
                - new_in
            published_at:
              type: string
            date_source:
              type: string
              enum:
                - published_at
                - created_at
          required:
            - type
            - published_at
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - bestseller
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - bestseller_revenue
            currency:
              type:
                - string
                - 'null'
              description: ISO currency of `value`.
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - slow_mover
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - trending
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            value:
              type: number
            n_days:
              type: integer
              description: Window the value was measured over.
            type:
              type: string
              enum:
                - trending_revenue
            currency:
              type:
                - string
                - 'null'
              description: ISO currency of `value`.
          required:
            - value
            - n_days
            - type
        - type: object
          properties:
            type:
              type: string
              enum:
                - few_variants_available
            variant_options_available:
              type: array
              items:
                type: object
                additionalProperties:
                  type: string
              description: Option name → value, one entry per variant still available.
            n_variants_total:
              type: integer
          required:
            - type
            - variant_options_available
            - n_variants_total
        - type: object
          properties:
            type:
              type: string
              enum:
                - tag
            tag:
              type: string
          required:
            - type
            - tag
        - type: object
          properties:
            type:
              type: string
              enum:
                - collection
            collection_id:
              type: string
            collection_title:
              type: string
          required:
            - type
            - collection_id
            - collection_title
    LiteVariant:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        sku:
          type:
            - string
            - 'null'
        quantity_available:
          type: integer
        image_url:
          type:
            - string
            - 'null'
        selected_options:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              value:
                type: string
            required:
              - name
              - value
      required:
        - id
        - title
        - sku
        - quantity_available
        - image_url
        - selected_options
  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.

````