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

# Save the thresholds behind the computed product badges

> Replaces the merchant's badge thresholds (all six counts are required; `new_in_date_source` defaults to published_at). Side effects: a new settings version is stored with the caller as author, and every collection that syncs back to Shopify is re-ordered there with the new badges (best effort: a failed re-order is logged, the save still succeeds). Answers null.



## OpenAPI

````yaml /api-reference/openapi/lite.json put /settings/dynamic-status
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:
  /settings/dynamic-status:
    put:
      summary: Save the thresholds behind the computed product badges
      description: >-
        Replaces the merchant's badge thresholds (all six counts are required;
        `new_in_date_source` defaults to published_at). Side effects: a new
        settings version is stored with the caller as author, and every
        collection that syncs back to Shopify is re-ordered there with the new
        badges (best effort: a failed re-order is logged, the save still
        succeeds). Answers null.
      operationId: dynamicStatusUpdate
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DynamicStatusUpdateRequest'
      responses:
        '200':
          description: Saved.
          content:
            application/json:
              schema:
                type: 'null'
        '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'
        '415':
          description: Content-Type is not application/json.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    DynamicStatusUpdateRequest:
      type: object
      properties:
        config_name:
          type: string
        new_in_days:
          type: integer
          description: A product is New in for this many days.
        bestseller_n_products:
          type: integer
          description: How many top sellers get Bestseller.
        slowmover_n_products:
          type: integer
          description: How many bottom sellers get Slow mover.
        low_in_stock_percentage:
          type: integer
          description: Low stock below this percentage of variants in stock.
        order_data_days:
          type: integer
          description: Days of orders the sales-based badges are computed over.
        trending_n_products:
          type: integer
          description: How many products get Trending.
        new_in_date_source:
          type: string
          enum:
            - published_at
            - created_at
          description: Defaults to published_at.
      required:
        - new_in_days
        - bestseller_n_products
        - slowmover_n_products
        - low_in_stock_percentage
        - order_data_days
        - trending_n_products
    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.

````