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

# Replace or clear search's own boost/bury rules

> Whole-replaces the rule set search ranks with (send the full list). A list, including `[]`, takes search off the merchant-wide rules: collections keep them, search uses only this list. `null` clears it, and search follows the merchant-wide rules again. Storefront search picks the change up within about two minutes (its config cache); collections are never affected. Strengths written here hold until the merchant next saves in the portal, whose editor derives every strength from list position (n..1, -1..-n) and keeps the order.



## OpenAPI

````yaml /api-reference/openapi/lite.json patch /search-config/boost-bury
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:
  /search-config/boost-bury:
    patch:
      summary: Replace or clear search's own boost/bury rules
      description: >-
        Whole-replaces the rule set search ranks with (send the full list). A
        list, including `[]`, takes search off the merchant-wide rules:
        collections keep them, search uses only this list. `null` clears it, and
        search follows the merchant-wide rules again. Storefront search picks
        the change up within about two minutes (its config cache); collections
        are never affected. Strengths written here hold until the merchant next
        saves in the portal, whose editor derives every strength from list
        position (n..1, -1..-n) and keeps the order.
      operationId: searchBoostBuryUpdate
      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/SearchBoostBuryRulesUpdate'
      responses:
        '200':
          description: Saved. The body is JSON `null`.
          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'
        '402':
          description: The merchant's plan does not include Search.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Paywall'
        '403':
          description: Authenticated, but this identity may not call the API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '404':
          description: >-
            `Merchant not found`: the merchant is not this caller's. `Search is
            not set up for this merchant`: no Search section (not
            search-entitled, or no store config); the portal hides the section
            on exactly this detail.
          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:
    SearchBoostBuryRulesUpdate:
      type: object
      properties:
        boost_bury_rules:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/SearchBoostBuryRule'
          maxItems: 50
          description: >-
            Search's own rule set. null = search has none and ranks with the
            merchant-wide boost/bury rules (GET /boost-bury); a list, including
            [], replaces them for search only.
      required:
        - boost_bury_rules
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
    Paywall:
      type: object
      properties:
        detail:
          type: string
        code:
          type: string
          enum:
            - product_required
            - collection_limit_exceeded
            - installation_frozen
        product:
          type: string
          enum:
            - search
            - recs
            - vm
        limit:
          type: integer
      required:
        - detail
        - code
      description: >-
        402: the merchant's plan does not include this. Branch on `code`; show
        `detail`.
    SearchBoostBuryRule:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - badge
            badge:
              type: string
              enum:
                - on_sale
                - out_of_stock
                - partially_out_of_stock
                - partially_low_stock
                - new_in
                - bestseller
                - bestseller_revenue
                - slow_mover
                - few_variants_available
                - trending
                - trending_revenue
              description: Matches products currently carrying this badge.
            strength:
              anyOf:
                - type: integer
                  minimum: 1
                  maximum: 50
                - type: integer
                  minimum: -50
                  maximum: -1
              description: >-
                Never 0. > 0 boosts matching products toward the top of search
                results, < 0 buries them; a larger magnitude wins over a smaller
                one.
          required:
            - type
            - badge
            - strength
        - type: object
          properties:
            type:
              type: string
              enum:
                - collection
            collection_id:
              type: string
              pattern: ^\d+$
              description: Numeric Shopify collection id (no gid:// prefix).
            strength:
              anyOf:
                - type: integer
                  minimum: 1
                  maximum: 50
                - type: integer
                  minimum: -50
                  maximum: -1
              description: >-
                Never 0. > 0 boosts matching products toward the top of search
                results, < 0 buries them; a larger magnitude wins over a smaller
                one.
          required:
            - type
            - collection_id
            - strength
        - type: object
          properties:
            type:
              type: string
              enum:
                - tag
            tags:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 255
              minItems: 1
              maxItems: 50
              description: >-
                Matches products carrying any of these Shopify tags, exactly as
                written in Shopify.
            strength:
              anyOf:
                - type: integer
                  minimum: 1
                  maximum: 50
                - type: integer
                  minimum: -50
                  maximum: -1
              description: >-
                Never 0. > 0 boosts matching products toward the top of search
                results, < 0 buries them; a larger magnitude wins over a smaller
                one.
          required:
            - type
            - tags
            - strength
  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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.