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

# Find Attribute Groups

> Searches for attribute groups that match the criteria specified in the request body. Attribute groups are reusable sets of attributes that can be assigned to products or categories.



## OpenAPI

````yaml attribute.openapi post /product-attribute-groups/search
openapi: 3.0.0
info:
  title: Products - Attributes API
  description: >-
    fabric **Product Catalog** supports two types of attributes: Item Attributes
    and Category Attributes. Within fabric Products, a product could be an item,
    a variant, or a bundle. Product attributes are factual and objective
    descriptions that shoppers see when browsing through an e-commerce platform
    (website or mobile app). These attributes may include technical
    specifications such as size and weight, design specifications such as color
    and material, as well as basic details like name, description, and ID.
    Similarly, Category attributes define the characteristics of parent and
    children categories. They're essential for organizing products in logical
    groups, making it easier for shoppers to browse and find products on your
    platform with minimal cognitive load.
  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: Attributes
    description: >-
      Supports CRUD operations for managing attributes. These endpoints
      generally require an attribute `target` to be specified to ensure
      appropriate separation and assignment of attributes to the correct target
      - `Item` or `Category`.
  - name: Attribute Groups
    description: >-
      Attribute Group is a collection of product attributes that helps
      categorize products into various semantic groups based on meaning and
      purpose, allowing for easier management and organization of products in
      the catalog. Supports CRUD operations for managing attribute groups.
  - name: Attributes Mapping
    description: >-
      fabric has a predefined set of mandatory attributes for `Items` and
      `Categories`. However, as merchants, you may have your own naming
      conventions for these attributes. For instance, a mandatory attribute
      'unique item identifier' may be referred to as `SKU` by fabric and as
      `productId` by merchant. To address this inconsistency, merchant-defined
      attributes are mapped to fabric attributes as productId -> fabric SKU.
      These endpoints are used to get and update mapping of attributes.
externalDocs:
  description: Find out more about Products (previously called PIM)
  url: https://developer.fabric.inc/docs/products-overview
paths:
  /product-attribute-groups/search:
    post:
      tags:
        - Attribute Groups
      summary: Find Attribute Groups
      description: >-
        Searches for attribute groups that match the criteria specified in the
        request body. Attribute groups are reusable sets of attributes that can
        be assigned to products or categories.
      operationId: searchAttributesGroups
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      requestBody:
        $ref: '#/components/requestBodies/searchAttributeGroupRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAttributeGroupsResponse'
          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'
        '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
  requestBodies:
    searchAttributeGroupRequest:
      description: Search criteria for attribute group
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - match
            properties:
              sort:
                type: string
                description: >-
                  Criteria to sort the response. Currently, sorting is only
                  supported on `createdAt`, `updatedAt`, `name`,
                  `attributesCount` and `priority`. `-` refers to descending
                  while `+` refers to ascending order
                example: +name,-attributesCount
              match:
                description: Specification for matching attributes
                type: object
                minProperties: 1
                properties:
                  id:
                    $ref: '#/components/schemas/simpleStringSearchOperation'
                  name:
                    $ref: '#/components/schemas/stringSearchOperation'
                  priority:
                    $ref: '#/components/schemas/numberSearchOperation'
                  attributeIds:
                    $ref: '#/components/schemas/simpleStringSearchOperation'
                  createdAt:
                    $ref: '#/components/schemas/dateTimeSearchOperation'
                  updatedAt:
                    $ref: '#/components/schemas/dateTimeSearchOperation'
              offset:
                description: >-
                  Number of records to skip before returning records. For
                  example, `offset=20, limit=10` returns records 21-30.
                type: integer
                format: int32
                default: 0
                example: 2
              limit:
                description: Maximum number of records per page
                type: integer
                format: int32
                default: 10
                example: 10
  schemas:
    getAttributeGroupsResponse:
      description: Details of attribute groups
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/attributeGroup'
        offset:
          description: >-
            Number of records to skip before returning records. For example,
            `offset=20, limit=10` returns records 21-30.
          type: integer
          format: int32
          default: 0
          example: 2
        limit:
          description: Maximum number of records per page
          type: integer
          format: int32
          default: 10
          example: 10
        count:
          description: Total number of records in the search results
          type: integer
          format: int32
          example: 1000
    simpleStringSearchOperation:
      type: object
      description: Simple string search
      anyOf:
        - $ref: '#/components/schemas/simpleMultiStringSearchOperation'
        - $ref: '#/components/schemas/simpleSingleStringSearchOperation'
    stringSearchOperation:
      type: object
      description: String search
      anyOf:
        - $ref: '#/components/schemas/simpleMultiStringSearchOperation'
        - $ref: '#/components/schemas/singleStringSearchOperation'
    numberSearchOperation:
      type: object
      description: Number search
      anyOf:
        - $ref: '#/components/schemas/singleNumberSearchOperation'
        - $ref: '#/components/schemas/multiNumberSearchOperation'
    dateTimeSearchOperation:
      type: object
      description: Date-time search
      anyOf:
        - $ref: '#/components/schemas/datetimeRangeOperation'
        - $ref: '#/components/schemas/datetimeInOperation'
        - $ref: '#/components/schemas/datetimeOperation'
    attributeGroup:
      type: object
      properties:
        id:
          type: string
          example: 59328bf0b5f328bf0b5f3288
          description: 24-character system-generated attribute group ID
        name:
          type: string
          example: Dimensions
          description: Attribute group name
        description:
          type: string
          example: Dimensions of a product
          description: Brief description of attribute group
        priority:
          type: integer
          format: int32
          example: 1
          description: Determines attribute group's order of appearance in the UI
        attributes:
          type: array
          items:
            properties:
              attributeId:
                type: string
                example: 33328bf0b5f328bf0b5f3288
                description: 24-character system-generated attribute ID
              name:
                type: string
                example: color
                description: >-
                  Attribute name when it isn't localized. When localized, the
                  translated name shows.
              type:
                $ref: '#/components/schemas/attributeType'
              localizedProperties:
                $ref: '#/components/schemas/localizedProperties'
              isLocalizable:
                type: boolean
                example: true
                description: >-
                  true: Attribute name is translated into different languages or
                  localized for different regions <br /> false: Attribute name
                  isn't localized **Note**: Refer to `localizedProperties` to
                  get relevant attributes based on locale.
              isReadOnly:
                type: boolean
                example: true
                description: >-
                  true: Attribute is read only <br /> false: Attribute is
                  editable
        attributeCount:
          type: integer
          format: int32
          description: Number of attributes in the attribute group
          example: 20
        updatedBy:
          type: string
          description: Email of user who last updated Attribute Group
          example: test@email.com
        createdAt:
          type: string
          description: Attribute group creation time (UTC)
          example: '2021-04-20T10:24:36.162Z'
        updatedAt:
          type: string
          description: Time of last update to attribute group (UTC)
          example: '2021-04-20T10:24:36.162Z'
    genericError:
      type: object
      properties:
        message:
          type: string
          description: Placeholder error message for all the 4xx, 5xx errors
          example: Request is invalid
        type:
          type: string
          description: Placeholder error type for all the 4xx, 5xx errors
          example: Bad request
        errors:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                description: Error type
                example: CLIENT_ERROR
              message:
                type: string
                description: Error details
                example: Invalid request. Check your parameters or request body.
    simpleMultiStringSearchOperation:
      type: object
      description: Simple multi-string search
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: Operations that can be performed on a `string` type
          example: IN
          enum:
            - IN
        value:
          type: array
          items:
            $ref: '#/components/schemas/stringSchema'
    simpleSingleStringSearchOperation:
      type: object
      description: Simple single-string search
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: Operations that can be performed on a `string` type
          example: EQUALS
          enum:
            - EQUALS
        value:
          $ref: '#/components/schemas/stringSchema'
    singleStringSearchOperation:
      type: object
      description: Single string search
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: Operations that can be performed on a `string` type
          example: EQUALS
          enum:
            - EQUALS
            - CONTAINS
        value:
          $ref: '#/components/schemas/stringSchema'
    singleNumberSearchOperation:
      type: object
      description: Single number search
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: >-
            Operations that can be performed on a `number` type such as equals
            to, less than (LT), Greater than (GT), Less than or equal to (LTE),
            Greater than or equal to (GTE), etc.
          example: GTE
          enum:
            - EQUALS
            - LTE
            - GTE
            - LT
            - GT
        value:
          $ref: '#/components/schemas/doubleSchema'
    multiNumberSearchOperation:
      type: object
      description: Multi-number search
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: In operation on a `number` type
          example: IN
          enum:
            - IN
        value:
          type: array
          items:
            $ref: '#/components/schemas/doubleSchema'
    datetimeRangeOperation:
      type: object
      description: Date range search
      required:
        - op
        - fromValue
        - toValue
      properties:
        op:
          type: string
          description: Date range
          example: RANGE
          enum:
            - RANGE
        fromValue:
          type: string
          description: Starting range (UTC)
          example: '2022-04-20T10:24:36.162Z'
        toValue:
          type: string
          description: Ending range (UTC)
          example: '2023-04-20T10:24:36.162Z'
    datetimeInOperation:
      type: object
      description: Date-time search for IN condition
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: >-
            Operations that can be performed on a `date` type. That is, searches
            for values that are equal to, less than, greater than, less than or
            equal to, or greater or than equal to the specified value.
          example: IN
          enum:
            - IN
        value:
          type: array
          items:
            type: string
            description: Timestamp to be searched (UTC)
            example: '2023-04-20T10:24:36.162Z'
    datetimeOperation:
      type: object
      description: Date-time search
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: >-
            Operations that can be performed on a date-time type. That is,
            equals to, less than, greater than, less than equal to, greater than
            equal to
          example: GTE
          enum:
            - EQUALS
            - LTE
            - GTE
            - LT
            - GT
        value:
          type: string
          description: Timestamp to be searched
          example: '2023-04-20T10:24:36.162Z'
    attributeType:
      type: string
      enum:
        - TEXT
        - NUMBER
        - DATETIME
        - BOOLEAN
        - OPTIONS
        - SERIAL
      example: TEXT
      description: Attribute type
    localizedProperties:
      type: object
      additionalProperties:
        type: object
        properties:
          name:
            type: string
            example: color
            description: Localized name
      example:
        en-US:
          name: color
        en-IN:
          name: colour
      description: Names of localized attributes
    stringSchema:
      type: string
      description: Sample `string` schema
      example: blue
    doubleSchema:
      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: Request isn't authorized
      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
    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: 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)

````