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

# Get Products Under Collection

> To ensure the right set of products are organized within a collection, it's important to review products in each collection. This endpoint gets a paginated list of products in a collection.  **Note**: You can refine your search by specifying `offset` and `limit`. When they're not specified, you'll get up to 10 products by default.



## OpenAPI

````yaml category.openapi get /collections/{id}/products
openapi: 3.0.0
info:
  title: Products - Categories API
  description: >-
    Categories (also called hierarchies or nodes) form a hierarchical tree
    structure to organize items and services into intuitive groups. Organizing
    items this way simplifies item discovery on your e-commerce platform
    (website or app). **Categories** is the original tree of Product List with
    nested levels of categories. Each item is placed where it belongs within a
    category. For example, `Computers` is a parent category with `Laptops` and
    `Desktops` as children categories, and `MacBook Pro` is an item within
    `Laptops`. This organization can be represented as Computers -> Laptops ->
    MacBook Pro. **Collections** serve as alternative organizations of Category
    system, which is the original, single source for all items and categories.
    Their main purpose is distribution management by displaying items on your
    e-commerce platform based on browsing structures you need to achieve various
    merchandising objectives, such as organizational requirements,
    multi-regional assortments, multi-channel assortments, and collections. For
    example, a company that sells, repairs, and supports computers and related
    items and services will have a Category system with a complete list of SKUs.
    Because Category system isn't granular enough to be used on Storefront,
    multiple Collections are created to target specific shopper segment
    experiences. For laptop consumers, you might have one collection that lists
    all the laptops and PCs. For large businesses, you will have another
    collection that lists all commercial laptops, PCs, printers, and servers.
    Both of the collections will act as filters of the Category, tailored to the
    purpose of a merchandising strategy.
  version: 3.0.0
  x-audience: external-public
  contact:
    email: support@fabric.inc
    name: Product team
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
servers:
  - url: https://api.fabric.inc/v3
    description: Production URL
security:
  - authorization: []
tags:
  - name: Categories
    description: >-
      Categories are organized into a hierarchical tree structure based on
      common attributes, allowing logical grouping of items. The Categories
      endpoints enables CRUD operations, such as creating, locating, and
      managing categories.
  - name: Collections
    description: >-
      As the **Categories** system may not be sufficiently granular to
      accommodate all Storefront use cases, **Collections** provide an
      alternative means of organizing products on the Storefront. Collections
      create a representational categorization of products, and are primarily
      used by merchants for short-term marketing campaigns. For instance, a
      collection could be created for a New Year sale that highlights discounted
      furniture products.
  - name: Navigation Paths
    description: >-
      Paths indicate the navigation of the current category or collection to its
      root category or collection. These navigation paths are helpful in
      determining the exact position of a category or collection within the
      hierarchical tree structure.
  - name: Bulk action for categories and collections
    description: These endpoints support creating and updating categories and collections.
externalDocs:
  description: Find out more about Products (previously called PIM)
  url: https://developer.fabric.inc/docs/products-overview
paths:
  /collections/{id}/products:
    get:
      tags:
        - Collections
      summary: Get Products Under Collection
      description: >-
        To ensure the right set of products are organized within a collection,
        it's important to review products in each collection. This endpoint gets
        a paginated list of products in a collection.  **Note**: You can refine
        your search by specifying `offset` and `limit`. When they're not
        specified, you'll get up to 10 products by default.
      operationId: getProductsByCollection
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
        - $ref: '#/components/parameters/collectionId'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/locales'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getCollectionProductsResponse'
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/x-fabric-request-id-header'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/notAuthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFoundError'
        '413':
          $ref: '#/components/responses/payloadLimitExceededError'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  parameters:
    x-fabric-tenant-id:
      name: x-fabric-tenant-id
      in: header
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      schema:
        type: string
        example: 517fa9dfd42d8b00g1o3k312
    x-fabric-request-id:
      name: x-fabric-request-id
      in: header
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
    collectionId:
      in: path
      name: id
      description: System-generated 24-character collection ID
      schema:
        type: string
      required: true
      example: 54328bf0b5f328bf0b5f3280
    offset:
      in: query
      name: offset
      description: >-
        Number of records to skip before returning records. For example,
        `offset=20, limit=10` returns records 21-30.
      schema:
        type: integer
        format: int32
        default: 0
        example: 0
      required: false
    limit:
      in: query
      name: limit
      description: Maximum number of records per page
      schema:
        type: integer
        format: int32
        default: 10
        example: 10
      required: false
    locales:
      in: query
      name: locales
      allowReserved: true
      schema:
        type: string
        example: fr-CA, en-US
        description: >-
          Comma-separated locale codes of category. The service throws a 400
          error if locale isn't supported. Standard locales can be found at
          https://www.rfc-editor.org/rfc/rfc5646. The recommended way to get the
          locale is by invoking multi-channel service
      required: false
  schemas:
    getCollectionProductsResponse:
      description: Details of products in a collection
      allOf:
        - $ref: '#/components/schemas/paginatedResultMeta'
        - type: object
          properties:
            data:
              type: object
              properties:
                id:
                  description: 24-character system-generated collection ID
                  type: string
                  example: 617329dfd5288b0011332388
                products:
                  type: array
                  items:
                    $ref: '#/components/schemas/idBasedProduct'
    paginatedResultMeta:
      description: Meta details needed for every paginated response
      type: object
      properties:
        offset:
          type: integer
          format: int32
          default: 0
          example: 5
          description: >-
            Number of records to skip before returning records. For example,
            `offset=20, limit=10` returns records 21-30.
        limit:
          type: integer
          format: int32
          default: 10
          example: 10
          description: Maximum number of records per page
        count:
          type: integer
          format: int32
          example: 100
          description: Total number of records in the response
    idBasedProduct:
      type: object
      description: Product details by ID
      properties:
        id:
          type: string
          example: 53184766610c0e32a86d875
          description: 24-character system-generated product ID
        sku:
          $ref: '#/components/schemas/sku'
        isActive:
          type: boolean
          example: true
          description: 'true: Product is active <br /> false: Product is inactive'
        hasDraft:
          $ref: '#/components/schemas/hasDraft'
        hasLive:
          $ref: '#/components/schemas/hasLive'
        status:
          $ref: '#/components/schemas/status'
        attributes:
          type: array
          description: Attributes of a product
          items:
            $ref: '#/components/schemas/productAttributeValue'
        localizedProperties:
          $ref: '#/components/schemas/productProperties'
        variants:
          $ref: '#/components/schemas/variantProducts'
        categoryId:
          type: string
          example: 64184766610c0e32a86d8758
          description: 24-character system-generated category ID
      example:
        id: 5g7329dfd5288b00113323p7
        sku: QWERTTY56DDFFVVV
        type: ITEM
        isActive: true
        hasDraft: true
        hasLive: true
        status: LIVE
        attributes:
          - id: 227329dfd5288b0011332315
            name: Color
            type: string
            isDeleted: false
            value: blue
            isInherited: true
        localizedProperties:
          en-US:
            attributes:
              - id: 637329dfd5288b0011332354
                name: Color
                type: string
                isDeleted: false
                value: blue
                isInherited: true
          en-IN:
            attributes:
              - id: 8f7329dfd5288b0011332334
                name: Colour
                type: string
                isDeleted: false
                value: blue
                isInherited: true
        variants:
          - id: 967329dfd5288b0011332356
        categoryId: 7f7329dfd5288b0011332378
        createdAt: '2021-09-14T22:10:30.618Z'
        updatedAt: '2021-09-14T22:10:30.618Z'
    genericError:
      type: object
      description: Error details
      properties:
        message:
          type: string
          description: Error message
          example: Request was invalid
        type:
          type: string
          description: Error type
          example: Bad request
        errors:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                description: Error type
                example: CLIENT_ERROR
              message:
                type: string
                description: Brief error message
                example: Invalid request
    sku:
      type: string
      example: XP-123345
      description: >-
        Unique product ID that maps to fabric's standard attribute called `SKU`.
        <br /> <b>Note:</b> `sku` shouldn't include `;` or `=`
      pattern: ^[^;=]*$
    hasDraft:
      type: boolean
      example: true
      description: >-
        true: Product has a Draft version <br /> false: Product doesn't have a
        Draft version
    hasLive:
      type: boolean
      example: true
      description: >-
        true: Product has a Live version <br /> false: Product doesn't have a
        Live version
    status:
      type: string
      description: >-
        Represents the current status of product. This value would take
        precedence over `isActive` if both are part of the request.
      enum:
        - DRAFT
        - LIVE
      example: LIVE
    productAttributeValue:
      type: object
      description: Details of product attributes
      properties:
        id:
          type: string
          example: 917329dfd5288b0011332300
          description: 24-character system-generated attribute ID
        name:
          type: string
          example: color
          description: Attribute name
        type:
          type: string
          example: string
          description: Attribute type
        isDeleted:
          type: boolean
          example: false
          description: >-
            true: Attributes are inherited from parent product <br /> false:
            Attributes aren't inherited from parent product **Note**: Attributes
            are soft deleted when a product is moved from one category to
            another.
        isInherited:
          type: boolean
          example: true
          description: >-
            true: Attributes are inherited from parent product <br /> false:
            Attributes aren't inherited from parent product
        value:
          anyOf:
            - $ref: '#/components/schemas/booleanSchema'
            - $ref: '#/components/schemas/stringSchema'
            - $ref: '#/components/schemas/integerSchema'
            - $ref: '#/components/schemas/doubleSchema'
            - $ref: '#/components/schemas/arrayOfStrings'
            - $ref: '#/components/schemas/arrayOfNumbers'
          example: blue
          description: Attribute value
    productProperties:
      type: object
      description: Localized names of attributes
      additionalProperties:
        type: object
        properties:
          attributes:
            type: array
            items:
              $ref: '#/components/schemas/productAttributeValue'
      example:
        en-US:
          attributes:
            - id: 917329dfd5288b0011332300
              name: Color
              type: string
              isDeleted: false
              value: blue
              isInherited: true
    variantProducts:
      type: array
      items:
        type: object
        description: Variant details
        properties:
          id:
            type: string
            example: 64184766610c0e32a86d8758
            description: 24-character system-generated variant ID
    booleanSchema:
      type: boolean
      nullable: true
      description: Sample boolean schema
      example: true
    stringSchema:
      type: string
      nullable: true
      description: Sample string schema
      example: blue
    integerSchema:
      type: integer
      nullable: true
      format: int32
      description: Sample integer schema
      example: 1
    doubleSchema:
      type: number
      nullable: true
      format: double
      description: Sample double schema
      example: 1
    arrayOfStrings:
      type: array
      items:
        type: string
        example: a
        description: Sample array of strings
    arrayOfNumbers:
      type: array
      items:
        type: number
        format: double
        description: Sample double schema
        example: 1
  headers:
    x-fabric-request-id-header:
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  responses:
    badRequest:
      description: Request is invalid or malformed
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
    notAuthorized:
      description: Unauthorized requester
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            message: The requester is unauthorized
            type: UNAUTHORIZED_ERROR
    forbidden:
      description: User isn't allowed to perform the action
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: REQUEST_DENIED
            message: User doesn't have the required permission
    notFoundError:
      description: The entity requested for isn't found
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: NOT_FOUND
            message: Resource not found
    payloadLimitExceededError:
      description: Payload limit exceeded (> 10MB)
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: PAYLOAD_LIMIT_EXCEEDED_ERROR
            message: The payload exceeds maximum configured size
    internalServerError:
      description: Internal server error
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: SERVER_ERROR
            message: Internal Server Error
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: S2S access token (JWT) from fabric Identity service (during Login)

````