> ## 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 surface's pin sets

> Returns every pin set of a surface: one entry per (anchor_type, anchor_id, market_id), each listing the pinned products by slot position. Call it before saving pins, since a save replaces a whole set. Read-only.



## OpenAPI

````yaml /api-reference/openapi/lite.json get /recommendations/surfaces/{surface_name}/pins
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:
  /recommendations/surfaces/{surface_name}/pins:
    get:
      summary: Read a surface's pin sets
      description: >-
        Returns every pin set of a surface: one entry per (anchor_type,
        anchor_id, market_id), each listing the pinned products by slot
        position. Call it before saving pins, since a save replaces a whole set.
        Read-only.
      operationId: recsSurfacePins
      parameters:
        - schema:
            type: string
            pattern: ^[a-z0-9_-]+$
            description: The surface's URL-safe name.
          required: true
          description: The surface's URL-safe name.
          name: surface_name
          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
      responses:
        '200':
          description: One entry per (anchor_type, anchor_id, market_id) set.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RecommendationPinSetSchema'
        '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'
        '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 no such surface.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    RecommendationPinSetSchema:
      type: object
      properties:
        surface_id:
          type: string
        anchor_type:
          type: string
        anchor_id:
          type:
            - string
            - 'null'
        market_id:
          type:
            - string
            - 'null'
        pins:
          type: array
          items:
            type: object
            properties:
              pinned_id:
                type: string
              pinned_level:
                type: string
              position:
                type: integer
            required:
              - pinned_id
              - pinned_level
              - position
      required:
        - surface_id
        - anchor_type
        - anchor_id
        - market_id
        - pins
    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.

````