> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loopreturns.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Collections

> Retrieve a list of collections. The list can be filtered, sorted, and paginated using the parameters below.



## OpenAPI

````yaml get /collections
openapi: 3.1.0
info:
  title: Collections API
  description: API for managing collections
  version: v1
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Collections
paths:
  /collections:
    get:
      tags:
        - Collections
      summary: List Collections
      description: >-
        Retrieve a list of collections. The list can be filtered, sorted, and
        paginated using the parameters below.
      operationId: listCollections
      parameters:
        - name: external_id
          in: query
          description: An `external_id` used to filter the collections.
          example: 71263csss-12uhsdfh-2138dja
          required: false
          schema:
            type: string
            minimum: 1
            maximum: 64
        - name: limit
          in: query
          description: The maximum number of collections returned.
          example: 20
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 250
            default: 50
        - name: sort_order
          in: query
          description: The sort order for the results.
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: cursor
          in: query
          description: The cursor to return the next page of results.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  collections:
                    type: array
                    items:
                      $ref: '#/components/schemas/CollectionResponseData'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
      security:
        - read: []
components:
  schemas:
    CollectionResponseData:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: The unique identifier for the collection, created by Loop.
        external_id:
          type:
            - string
            - 'null'
          description: >-
            The identifier used by an external source to identify the
            collection.
        sales_channel:
          type:
            - string
            - 'null'
          description: The name of the channel.
        name:
          type: string
          description: The name of the collection.
        products:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/ProductResponse'
          description: An array of products associated with the collection.
    UnauthorizedResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              examples:
                - '401'
            http_code:
              type: string
              examples:
                - GEN-UNAUTHORIZED
            message:
              type: string
              examples:
                - Unauthorized.
    NotFoundResponse:
      type: object
      properties:
        code:
          type: string
          examples:
            - '404'
        http_code:
          type: string
          examples:
            - GEN-NOT-FOUND
        message:
          type: string
          examples:
            - >-
              The collection could not be found. Please verify that the provided
              id is correct.
    ProductResponse:
      title: ProductResponse
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          examples:
            - 810772
          readOnly: true
        external_id:
          type:
            - string
            - 'null'
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        sku:
          type:
            - string
            - 'null'
          examples:
            - SHOES-US44-M-Brwn
        name:
          type: string
  securitySchemes:
    read:
      type: apiKey
      in: header
      name: X-Authorization
      description: 'API Scope: "Collections (read)"'
      x-scope: Collections (Read)

````