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

# Where a merchant's catalog is between Shopify and the search index

> Returns where the merchant's catalog is between Shopify and the search/recommendations index: the pipeline `stage`, whether search is `serving`, and document counts. Call it to tell whether search and recommendations can work yet, or how far an import has come; the portal polls it every few seconds while a store activates. Read-only.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /merchants/{merchant_id}/catalog-readiness
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:
  /merchants/{merchant_id}/catalog-readiness:
    get:
      summary: Where a merchant's catalog is between Shopify and the search index
      description: >-
        Returns where the merchant's catalog is between Shopify and the
        search/recommendations index: the pipeline `stage`, whether search is
        `serving`, and document counts. Call it to tell whether search and
        recommendations can work yet, or how far an import has come; the portal
        polls it every few seconds while a store activates. Read-only.
      operationId: catalogReadiness
      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: path
      responses:
        '200':
          description: The readiness snapshot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogReadiness'
        '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, or unknown to lite.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '502':
          description: Lite ingestion could not answer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    CatalogReadiness:
      type: object
      properties:
        serving:
          type:
            - boolean
            - 'null'
          description: >-
            Every locale's serving index exists and holds documents; null while
            a count is unreadable.
        stage:
          type: string
          enum:
            - not_started
            - fetching_shopify
            - finalizing
            - projecting
            - indexing
            - ready
            - stalled
            - unknown
          description: >-
            Pipeline position; `ready` = fully indexed, `stalled` = no progress
            where some was expected.
        lite:
          type: object
          properties:
            read:
              type: string
              enum:
                - ok
                - unavailable
            ingestionState:
              type:
                - integer
                - 'null'
            running:
              type: boolean
            finalizing:
              type: boolean
            workflowId:
              type:
                - string
                - 'null'
            startedAt:
              type:
                - string
                - 'null'
            registeredBatches:
              type: integer
          required:
            - read
            - ingestionState
            - running
            - finalizing
            - workflowId
            - startedAt
            - registeredBatches
        foundation:
          type: object
          properties:
            read:
              type: string
              enum:
                - ok
                - unknown_merchant
                - unavailable
            s2Active:
              type: boolean
            s3Active:
              type: boolean
            pendingRerun:
              type: boolean
            backlog:
              type: boolean
            lastProjectedAt:
              type:
                - string
                - 'null'
          required:
            - read
            - s2Active
            - s3Active
            - pendingRerun
            - backlog
            - lastProjectedAt
        index:
          type: object
          properties:
            expectedDocuments:
              type:
                - integer
                - 'null'
              description: Live variants times live locales; null until known.
            indexedDocuments:
              type:
                - integer
                - 'null'
              description: >-
                Documents in the serving indexes; null while any locale's count
                is unknown.
            locales:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  aliasPresent:
                    type: boolean
                  documents:
                    type:
                      - integer
                      - 'null'
                required:
                  - code
                  - aliasPresent
                  - documents
          required:
            - expectedDocuments
            - indexedDocuments
            - locales
        checkedAt:
          type: string
      required:
        - serving
        - stage
        - lite
        - foundation
        - index
        - checkedAt
    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.

````