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

# Start preparing the search header on the merchant's theme

> Queues the background job that prepares Depict's search header for the merchant's live theme (nothing is published; the result is stashed). Call once; then poll searchOnboardingStatus until `stashed`, and continue with searchOnboardingGoLive. Needs a plan that includes Search.



## OpenAPI

````yaml /api-reference/openapi/lite.json post /search-onboarding/enable
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-onboarding/enable:
    post:
      summary: Start preparing the search header on the merchant's theme
      description: >-
        Queues the background job that prepares Depict's search header for the
        merchant's live theme (nothing is published; the result is stashed).
        Call once; then poll searchOnboardingStatus until `stashed`, and
        continue with searchOnboardingGoLive. Needs a plan that includes Search.
      operationId: searchOnboardingEnable
      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
      responses:
        '202':
          description: Started; the body is the new status to poll from.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchOnboardingStatusResponse'
        '400':
          description: '`merchant_id` is missing; `detail` carries zod''s message.'
          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 (terminal).
            `Store config is not ready yet`: mid-install, retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '409':
          description: >-
            A preparation or go-live is already running, or the store already
            runs the Search by Depict app.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: >-
            Internal error, or the job could not be queued (retryable once the
            in-flight state expires).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    SearchOnboardingStatusResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/SearchOnboardingStatus'
        existing_search_app:
          type: boolean
          description: >-
            The store already runs the Search by Depict app and never started
            this flow: it gets in touch instead of pressing the button.
        error:
          type:
            - string
            - 'null'
        theme_id:
          type:
            - integer
            - 'null'
        duplicate_theme_id:
          type:
            - integer
            - 'null'
          description: The unpublished theme copy that carries the search header.
        updated_at:
          type:
            - string
            - 'null'
        editor_deep_link:
          type:
            - string
            - 'null'
          description: >-
            Theme-editor link that adds the search block to the duplicate's
            header; only at live_ready.
        preview_link:
          type:
            - string
            - 'null'
          description: Storefront preview of the duplicate; only at live_ready.
      required:
        - status
        - existing_search_app
        - error
        - theme_id
        - duplicate_theme_id
        - updated_at
        - editor_deep_link
        - preview_link
    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`.
    SearchOnboardingStatus:
      type:
        - string
        - 'null'
      enum:
        - pending
        - running
        - stashed
        - failed
        - stale
        - golive_running
        - live_ready
        - golive_failed
        - null
      description: null = the merchant never started search onboarding.
  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.

````