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

# Change search settings and the empty-state configuration

> Partial update of the merchant's search config: every field is optional and an omitted field keeps its stored value; `search_configuration` merges key by key. Writes `config.gpt_search_config`, which live storefront search reads, so a save changes what shoppers see. Read back with the configuration and states routes. An empty body is a no-op.



## OpenAPI

````yaml /api-reference/openapi/lite.json patch /search-config
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:
    patch:
      summary: Change search settings and the empty-state configuration
      description: >-
        Partial update of the merchant's search config: every field is optional
        and an omitted field keeps its stored value; `search_configuration`
        merges key by key. Writes `config.gpt_search_config`, which live
        storefront search reads, so a save changes what shoppers see. Read back
        with the configuration and states routes. An empty body is a no-op.
      operationId: searchConfigPatch
      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/SearchConfigPatchRequest'
      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 (superusers bypass
            this).
          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: >-
            As for the reads, or `Synonyms are not enabled for this merchant`:
            the body carries `tenant_synonym_groups` while the `search_synonyms`
            feature is off (nothing is written).
          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:
    SearchConfigPatchRequest:
      type: object
      properties:
        sort_order:
          type: string
          enum:
            - CREATED_DESC
            - STOCK_DESC
            - BESTSELLERS
          description: Order of the products shown before the shopper types.
        hide_out_of_stock_products:
          type: boolean
        pinned_main_product_ids:
          type: array
          items:
            type: string
          maxItems: 6
          description: >-
            Numeric Shopify product ids pinned first in the empty state, in
            order.
        generated_empty_state_suggestions:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
              maxLength: 500
            maxItems: 100
          description: >-
            Per-locale suggestion chips shown before the shopper types; writing
            them marks them merchant-curated.
        localized_strings_overrides:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: string
              maxLength: 4000
          description: 'Per-locale storefront UI string overrides: `{locale: {key: text}}`.'
        search_configuration:
          type: object
          properties:
            vector_alpha:
              type:
                - number
                - 'null'
              minimum: 0
              maximum: 1
              description: >-
                Keyword (0) to meaning (1) blend of hybrid search; null = the
                serving default.
            query_by_fields:
              type:
                - array
                - 'null'
              items:
                type: object
                properties:
                  field:
                    type: string
                    enum:
                      - title
                      - colors
                      - variant_color
                      - material
                      - occasions
                      - product_type
                      - style_attributes
                      - pattern
                      - variant_title
                      - attribute_text
                      - gender
                      - tags
                      - merchandising_tags
                      - short_description
                      - description
                      - name_gloss
                  weight:
                    type: integer
                    minimum: 0
                    maximum: 127
                required:
                  - field
                  - weight
              description: Searchable fields with weights; null resets to the defaults.
            filter_facets:
              type:
                - array
                - 'null'
              items:
                type: string
                enum:
                  - colors
                  - material
                  - gender
                  - product_type
                  - on_sale
                  - is_bestseller
                  - new
                  - size
              maxItems: 8
              description: >-
                Filter field names shown on results, in order; null resets to
                the defaults, [] shows none. Labels are not written: the read
                derives them.
            out_of_stock_exempt_tags:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 255
              maxItems: 20
              description: >-
                Product tags that stay visible when sold out; [] turns the
                exemption off.
            tenant_synonym_groups:
              type: array
              items:
                type: array
                items:
                  type: string
                  minLength: 1
                  maxLength: 64
                minItems: 2
                maxItems: 8
              maxItems: 300
              description: >-
                Whole-replaces the synonym groups ([] clears). Needs the
                `search_synonyms` portal feature, else 404.
          description: >-
            Merged key by key into the stored configuration: omitted keys keep
            their value, and `{}` changes nothing.
        suggestion_blocked_terms:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 100
          maxItems: 200
          description: Terms never offered as generated suggestions.
        suggestion_extra_instructions:
          type:
            - string
            - 'null'
          maxLength: 4000
          description: >-
            Extra guidance for the suggestion generator; null or blank clears
            it.
    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`.
  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.

````