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

# Get Dead Stock Products Endpoint

> Merchant-wide dead stock: products with stock on hand but zero sales in
the metrics period (the same definition as
``CollectionMetricsSummary.dead_stock``, which counts these per collection).
Backed by the cached whole-catalog ``fetch_collection_metrics``, so on a
warm cache this is an in-memory filter. Items are sorted by inventory
(worst offenders first) and capped at ``DEAD_STOCK_MAX_ITEMS``; ``total``
is the uncapped count. Products no longer in the catalog are dropped.



## OpenAPI

````yaml /api-reference/openapi/foundation-portal.json get /api/v1/merchants/{merchant_id}/products/dead-stock
openapi: 3.1.0
info:
  title: Depict Foundation Portal API
  version: 1.0.0
  description: >-
    REST API behind the Depict Foundation merchant portal: merchants, products,
    collections, curation, metrics, analytics and search insights. All endpoints
    require an Auth0-issued bearer token.
servers:
  - url: ''
security: []
paths:
  /api/v1/merchants/{merchant_id}/products/dead-stock:
    get:
      tags:
        - Products
      summary: Get Dead Stock Products Endpoint
      description: >-
        Merchant-wide dead stock: products with stock on hand but zero sales in

        the metrics period (the same definition as

        ``CollectionMetricsSummary.dead_stock``, which counts these per
        collection).

        Backed by the cached whole-catalog ``fetch_collection_metrics``, so on a

        warm cache this is an in-memory filter. Items are sorted by inventory

        (worst offenders first) and capped at ``DEAD_STOCK_MAX_ITEMS``;
        ``total``

        is the uncapped count. Products no longer in the catalog are dropped.
      operationId: >-
        get_dead_stock_products_endpoint_api_v1_merchants__merchant_id__products_dead_stock_get
      parameters:
        - name: merchant_id
          in: path
          required: true
          schema:
            type: string
            title: Merchant Id
        - name: market_group_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Market Group Id
        - name: market
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Market
        - name: locale
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Locale
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeadStockResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Auth0: []
components:
  schemas:
    DeadStockResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DeadStockItem'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        low_stock_units:
          type: integer
          title: Low Stock Units
      type: object
      required:
        - items
        - total
        - low_stock_units
      title: DeadStockResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeadStockItem:
      properties:
        main_product_id:
          type: string
          title: Main Product Id
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        inventory:
          type: integer
          title: Inventory
        views:
          type: integer
          title: Views
        clicks:
          type: integer
          title: Clicks
        ctr:
          type: number
          title: Ctr
        prev_sold:
          type: integer
          title: Prev Sold
      type: object
      required:
        - main_product_id
        - inventory
        - views
        - clicks
        - ctr
        - prev_sold
      title: DeadStockItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Auth0:
      type: oauth2
      flows:
        authorizationCode:
          scopes:
            openid: OpenID Connect
            profile: User profile
            email: User email
          authorizationUrl: https://depict.eu.auth0.com/oauth/authorize
          tokenUrl: https://depict.eu.auth0.com/oauth/token
      x-tokenName: id_token

````