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

# Read a collection version's content cards

> Returns the content cards (image, video and text tiles placed in the collection's product grid) of one collection version, in stored order, read from Shopify. Each card is in the shape `PATCH /brand-features/{collection_id}` accepts, plus read-only fields PATCH ignores (`metaobject_id`, `clicks_id`, `image_url`, `hover_image_url`, `link.name`). Read the cards before changing them: PATCH replaces a card's settings with the card it is sent. Version ids come from `GET /collections/{collection_id}/versions`. Read-only.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /brand-features/{collection_id}
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:
  /brand-features/{collection_id}:
    get:
      summary: Read a collection version's content cards
      description: >-
        Returns the content cards (image, video and text tiles placed in the
        collection's product grid) of one collection version, in stored order,
        read from Shopify. Each card is in the shape `PATCH
        /brand-features/{collection_id}` accepts, plus read-only fields PATCH
        ignores (`metaobject_id`, `clicks_id`, `image_url`, `hover_image_url`,
        `link.name`). Read the cards before changing them: PATCH replaces a
        card's settings with the card it is sent. Version ids come from `GET
        /collections/{collection_id}/versions`. Read-only.
      operationId: contentCards
      parameters:
        - 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
        - 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
        - schema:
            type: string
            format: uuid
            description: The collection version (UUID) the features belong to.
          required: true
          description: The collection version (UUID) the features belong to.
          name: version
          in: query
      responses:
        '200':
          description: The version's cards; `cards` is empty when it has none.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentCards'
        '400':
          description: >-
            The query failed the schema, or 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 collection has no such
            version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    ContentCards:
      type: object
      properties:
        version:
          type: string
          description: The collection version (UUID) the cards belong to.
        cards:
          type: array
          items:
            $ref: '#/components/schemas/ContentCard'
          description: >-
            The version's cards in stored order (when two cards claim the same
            grid slot, the earlier one wins).
      required:
        - version
        - cards
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
    ContentCard:
      type: object
      properties:
        handle:
          type: string
          description: The card's handle, unique among the store's cards.
        index:
          type: integer
          description: The grid slot the card is placed at (0 = first).
        span_rows:
          type: integer
          description: Grid rows the card covers.
        span_columns:
          type: integer
          description: Grid columns the card covers.
        aspect_ratio:
          type: number
          description: The card's aspect ratio, as the editor stores it.
        visibility:
          type:
            - string
            - 'null'
          enum:
            - desktop
            - mobile
            - null
          description: Show on one breakpoint only; omit to show on both.
        content:
          oneOf:
            - $ref: '#/components/schemas/ContentCardImage'
            - $ref: '#/components/schemas/ContentCardVideo'
            - $ref: '#/components/schemas/ContentCardSpace'
            - $ref: '#/components/schemas/ContentCardInstagramImage'
            - $ref: '#/components/schemas/ContentCardInstagramVideo'
          discriminator:
            propertyName: type
            mapping:
              image:
                $ref: '#/components/schemas/ContentCardImage'
              video:
                $ref: '#/components/schemas/ContentCardVideo'
              space:
                $ref: '#/components/schemas/ContentCardSpace'
              instagram_image:
                $ref: '#/components/schemas/ContentCardInstagramImage'
              instagram_video:
                $ref: '#/components/schemas/ContentCardInstagramVideo'
          description: >-
            What the card shows; `type` is required. `image` and `video` take
            the gid of a file already in the store's Shopify Files
            (gid://shopify/MediaImage/… or gid://shopify/Video/…), for example
            one another card uses: uploading new media is not available here.
            `space` is a card with no media (text only, or an empty slot of
            `height` px). The Instagram types come from the editor's Instagram
            import; keep them as read.
        hover_image:
          oneOf:
            - $ref: '#/components/schemas/ContentCardImage'
            - $ref: '#/components/schemas/ContentCardInstagramImage'
            - type: 'null'
          description: Image swapped in on hover; omit for none.
        text:
          $ref: '#/components/schemas/ProContentBlockText'
        link:
          $ref: '#/components/schemas/ContentCardLink'
        metaobject_id:
          type: string
          description: 'Read-only: the card''s Shopify metaobject gid.'
        clicks_id:
          type: integer
          description: >-
            Read-only: the numeric metaobject id; equals content_block_id in GET
            /brand-features/content-block-clicks/{collection_id}.
        image_url:
          type: string
          description: >-
            Read-only: URL of the card's image (a video's preview frame); absent
            while the media processes.
        hover_image_url:
          type: string
          description: 'Read-only: URL of the hover image.'
      required:
        - handle
        - index
        - span_rows
        - span_columns
        - aspect_ratio
        - content
        - metaobject_id
        - clicks_id
    ContentCardImage:
      type: object
      properties:
        type:
          type: string
          enum:
            - image
        gid:
          type: string
          description: Shopify GID.
        filename:
          type: string
          description: >-
            The media file's name, for display. Saves ignore it; omit it or echo
            what GET returned.
        alt_text:
          type:
            - string
            - 'null'
      required:
        - type
        - gid
    ContentCardVideo:
      type: object
      properties:
        type:
          type: string
          enum:
            - video
        gid:
          type: string
          description: Shopify GID.
        filename:
          type: string
          description: >-
            The media file's name, for display. Saves ignore it; omit it or echo
            what GET returned.
      required:
        - type
        - gid
    ContentCardSpace:
      type: object
      properties:
        type:
          type: string
          enum:
            - space
        height:
          type:
            - integer
            - 'null'
      required:
        - type
    ContentCardInstagramImage:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_image
        gid:
          type: string
          description: Shopify GID.
        creator:
          type: string
        post_url:
          type: string
        post_id:
          type: string
        media_id:
          type: string
        alt_text:
          type:
            - string
            - 'null'
      required:
        - type
        - gid
        - creator
        - post_url
        - post_id
        - media_id
    ContentCardInstagramVideo:
      type: object
      properties:
        type:
          type: string
          enum:
            - instagram_video
        gid:
          type: string
          description: Shopify GID.
        creator:
          type: string
        post_url:
          type: string
        post_id:
          type: string
        media_id:
          type: string
      required:
        - type
        - gid
        - creator
        - post_url
        - post_id
        - media_id
    ProContentBlockText:
      type:
        - object
        - 'null'
      properties:
        header:
          $ref: '#/components/schemas/ContentBlockTextProperties'
        body:
          $ref: '#/components/schemas/ContentBlockTextProperties'
        horizontal_alignment:
          type:
            - string
            - 'null'
          enum:
            - start
            - center
            - end
            - null
        vertical_alignment:
          type:
            - string
            - 'null'
          enum:
            - start
            - center
            - end
            - null
        background_overlay:
          type:
            - string
            - 'null'
        overlay_style:
          type:
            - string
            - 'null'
          enum:
            - solid
            - gradient
            - null
        text_shadow:
          type:
            - boolean
            - 'null'
        gap:
          type:
            - string
            - 'null'
    ContentCardLink:
      type:
        - object
        - 'null'
      properties:
        type:
          type: string
          enum:
            - collection
            - page
            - product
            - article
            - url
        gid:
          type: string
          description: Shopify GID.
        handle:
          type: string
        url:
          type:
            - string
            - 'null'
        article_handle:
          type:
            - string
            - 'null'
        name:
          type: string
          description: >-
            Read-only: title of the linked collection, page or product. Absent
            when the target was deleted (the gid is kept).
      required:
        - type
        - gid
        - handle
    ContentBlockTextProperties:
      type:
        - object
        - 'null'
      properties:
        html_tag:
          type: string
        color_hex:
          type:
            - string
            - 'null'
        bold:
          type:
            - boolean
            - 'null'
        italic:
          type:
            - boolean
            - 'null'
        underline:
          type:
            - boolean
            - 'null'
        text:
          type:
            - string
            - 'null'
        translations:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          description: Text per locale, keyed by locale code.
      required:
        - html_tag
  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.

````