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

# The collection templates a collection can switch between

> Lists the collection templates in the store's published theme, marks the one this collection uses, and flags which render Depict's grid. When the Depict variant of the active template does not exist yet, a `written: false` placeholder is appended and `theme_onboarding_status` says whether Depict is still writing it (the portal polls while it is `pending`). Read-only; several Shopify calls per request.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /shopify-collection-template/{merchant_id}/{collection_id}/templates
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:
  /shopify-collection-template/{merchant_id}/{collection_id}/templates:
    get:
      summary: The collection templates a collection can switch between
      description: >-
        Lists the collection templates in the store's published theme, marks the
        one this collection uses, and flags which render Depict's grid. When the
        Depict variant of the active template does not exist yet, a `written:
        false` placeholder is appended and `theme_onboarding_status` says
        whether Depict is still writing it (the portal polls while it is
        `pending`). Read-only; several Shopify calls per request.
      operationId: collectionTemplates
      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
        - schema:
            type: string
            description: The Shopify collection id (numeric, no gid prefix).
          required: true
          description: The Shopify collection id (numeric, no gid prefix).
          name: collection_id
          in: path
      responses:
        '200':
          description: The templates and the theme's onboarding state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCollectionTemplatesResponse'
        '400':
          description: The merchant has no Shopify configuration.
          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, or the store has no published
            theme.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error, or Shopify rejected the call.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    GetCollectionTemplatesResponse:
      type: object
      properties:
        theme_onboarding_status:
          type: string
          enum:
            - success
            - warning
            - failure
            - pending
          description: >-
            The main theme's onboarding outcome; `pending` while the Depict
            template is still being written.
        user_approved:
          type: boolean
          description: The merchant has activated a Depict template on this theme before.
        templates:
          type: array
          items:
            $ref: '#/components/schemas/CollectionTemplateWithActiveAndWrittenStatus'
      required:
        - theme_onboarding_status
        - user_approved
        - templates
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
    CollectionTemplateWithActiveAndWrittenStatus:
      allOf:
        - $ref: '#/components/schemas/CollectionTemplate'
        - type: object
          properties:
            active:
              type: boolean
              description: The collection uses this template now.
            written:
              type: boolean
              description: >-
                The template exists in the main theme. `false` = a placeholder
                Depict's theme onboarding has yet to write.
            source_already_patched:
              type: boolean
              description: >-
                On the unwritten placeholder only: the active template is itself
                a copy of a Depict one, so the placeholder will never be
                written.
          required:
            - active
            - written
    CollectionTemplate:
      type: object
      properties:
        template_suffix:
          type: string
          description: >-
            The Shopify template suffix: `""` is the default `collection`
            template, `"depict"` is `collection.depict`.
        is_depict_template:
          type: boolean
          description: The template renders Depict's sorted grid.
      required:
        - template_suffix
        - is_depict_template
  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.

````