openapi: 3.0.0
x-mint:
  mcp:
    enabled: true
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
externalDocs:
  description: Find out more about Products (previously called PIM)
  url: https://developer.fabric.inc/docs/products-overview
servers:
  - url: https://api.fabric.inc/v3
    description: Production URL
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.
paths:
  /product-attribute-mappings:
    get:
      tags:
        - Attributes Mapping
      summary: Get Attribute Mapping
      description: >-
        Before adding an item (with or without variants) to fabric **Product
        Catalog**, you must map merchant-specific attributes to fabric-specific
        attributes. Once mapping is created, this endpoint is used to get the
        mapping details.
      operationId: getAttributeMapping
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAttributeMappingsResponse'
          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'
        '500':
          $ref: '#/components/responses/internalServerError'
    put:
      tags:
        - Attributes Mapping
      summary: Update Attribute Mapping
      description: >-
        This endpoint updates mapping of merchant-defined attributes to
        fabric-defined standard attributes. This will help ensure consistency.
      operationId: updateAttributeMappings
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      requestBody:
        $ref: '#/components/requestBodies/updateAttributeMappingsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updateAttributeMappingsResponse'
          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'
        '500':
          $ref: '#/components/responses/internalServerError'
  /product-attributes:
    post:
      tags:
        - Attributes
      summary: Create an Attribute
      description: >-
        In **Product Catalog**, both products (Items, Variants, and Bundles) and
        categories have attributes. For products, they may be technical
        specifications like size, weight, etc., design specifications like
        color, material, etc. For Categories, they may be basic specifications
        such as name, description, ID, etc. This endpoint creates attributes
        that can be assigned to a `target` - Product or Category.
      operationId: createCategoryAttribute
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      requestBody:
        $ref: '#/components/requestBodies/createAttributeRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createAttributeResponse'
              examples:
                CategoryDate:
                  $ref: '#/components/examples/categoryDateResponse'
                CategoryBoolean:
                  $ref: '#/components/examples/categoryBooleanResponse'
                CategoryNumber:
                  $ref: '#/components/examples/categoryNumberResponse'
                CategoryText:
                  $ref: '#/components/examples/categoryTextResponse'
                Serial:
                  $ref: '#/components/examples/serialResponse'
                MandatoryBoolean:
                  $ref: '#/components/examples/mandatoryBooleanResponse'
                Date:
                  $ref: '#/components/examples/dateResponse'
                Formula:
                  $ref: '#/components/examples/formulaResponse'
                DecimalRangeNumber:
                  $ref: '#/components/examples/decimalWithRangeResponse'
                DecimalNumber:
                  $ref: '#/components/examples/decimalResponse'
                Number:
                  $ref: '#/components/examples/numberResponse'
                Options:
                  $ref: '#/components/examples/lovResponse'
                LocalizedOptions:
                  $ref: '#/components/examples/localizedLovResponse'
                TextArea:
                  $ref: '#/components/examples/localizedTextAreaResponse'
                SmallText:
                  $ref: '#/components/examples/smallTextResponse'
          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'
        '500':
          $ref: '#/components/responses/internalServerError'
    get:
      tags:
        - Attributes
      summary: Get Attributes
      description: >-
        Retrieves all available attributes that can be assigned to a specified
        target—either `item` or `category`. You can refine results using
        `offset` and `limit` query parameters. If not specified, the response
        defaults to a maximum of 10 attributes.
      operationId: getAttributes
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
        - $ref: '#/components/parameters/locale'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/attributeTarget'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAttributesResponse'
              examples:
                Attributes:
                  $ref: '#/components/examples/multiAttributeResponse'
          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'
  /product-attributes/search:
    post:
      tags:
        - Attributes
      summary: Find Attributes
      description: >-
        Searches for attributes using criteria such as name, creation or
        modification date, attribute type, and other filters.
      operationId: searchAttributes
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      requestBody:
        $ref: '#/components/requestBodies/searchAttributeRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAttributesResponse'
              examples:
                Attributes:
                  $ref: '#/components/examples/multiAttributeResponse'
          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'
  /product-attributes/{id}:
    get:
      tags:
        - Attributes
      summary: Get Single Attribute
      description: >-
        Retrieves details of a specific attribute by its ID. Attributes define
        how product information such as name, size, or color is displayed on
        e-commerce platforms.
      operationId: getAttribute
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: The 24-character system-generated ID of the attribute to retrieve.
          example: 53184766610c0e32a86d875
        - $ref: '#/components/parameters/locale'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAttributeResponse'
              examples:
                CategoryDate:
                  $ref: '#/components/examples/categoryDateResponse'
                CategoryBoolean:
                  $ref: '#/components/examples/categoryBooleanResponse'
                CategoryNumber:
                  $ref: '#/components/examples/categoryNumberResponse'
                CategoryText:
                  $ref: '#/components/examples/categoryTextResponse'
                Serial:
                  $ref: '#/components/examples/serialResponse'
                MandatoryBoolean:
                  $ref: '#/components/examples/mandatoryBooleanResponse'
                Date:
                  $ref: '#/components/examples/dateResponse'
                Formula:
                  $ref: '#/components/examples/formulaResponse'
                DecimalRangeNumber:
                  $ref: '#/components/examples/decimalWithRangeResponse'
                DecimalNumber:
                  $ref: '#/components/examples/decimalResponse'
                Number:
                  $ref: '#/components/examples/numberResponse'
                Options:
                  $ref: '#/components/examples/lovResponse'
                LocalizedOptions:
                  $ref: '#/components/examples/localizedLovResponse'
                TextArea:
                  $ref: '#/components/examples/localizedTextAreaResponse'
                SmallText:
                  $ref: '#/components/examples/smallTextResponse'
          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/resourceNotFound'
        '500':
          $ref: '#/components/responses/internalServerError'
    put:
      tags:
        - Attributes
      summary: Update Single Attribute
      description: >-
        This endpoint updates attribute details such as name, description,
        validation criteria, and more, for the specified ID.  <Note>The target
        and type fields cannot be updated via this endpoint.</Note>
      operationId: updateAttribute
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: The 24-character system-generated ID of the attribute to update.
          example: 5f328bf0b5f328bf0b5f328b
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      requestBody:
        $ref: '#/components/requestBodies/updateAttributeRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updateAttributeResponse'
              examples:
                CategoryDate:
                  $ref: '#/components/examples/categoryDateResponse'
                CategoryBoolean:
                  $ref: '#/components/examples/categoryBooleanResponse'
                CategoryNumber:
                  $ref: '#/components/examples/categoryNumberResponse'
                CategoryText:
                  $ref: '#/components/examples/categoryTextResponse'
                Serial:
                  $ref: '#/components/examples/serialResponse'
                MandatoryBoolean:
                  $ref: '#/components/examples/mandatoryBooleanResponse'
                Date:
                  $ref: '#/components/examples/dateResponse'
                Formula:
                  $ref: '#/components/examples/formulaResponse'
                DecimalRangeNumber:
                  $ref: '#/components/examples/decimalWithRangeResponse'
                DecimalNumber:
                  $ref: '#/components/examples/decimalResponse'
                Number:
                  $ref: '#/components/examples/numberResponse'
                Options:
                  $ref: '#/components/examples/lovResponse'
                LocalizedOptions:
                  $ref: '#/components/examples/localizedLovResponse'
                TextArea:
                  $ref: '#/components/examples/localizedTextAreaResponse'
                SmallText:
                  $ref: '#/components/examples/smallTextResponse'
          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/resourceNotFound'
        '500':
          $ref: '#/components/responses/internalServerError'
    delete:
      tags:
        - Attributes
      summary: Delete Single Attribute
      description: >-
        Deletes an attribute by its ID. Use this to remove obsolete or
        incorrectly created attributes from Product Catalog. Attributes that are
        already assigned to an `Item` or `Category` can't be deleted.
      operationId: deleteAttribute
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: The 24-character system-generated ID of the attribute to update.
          example: 53184766610c0e32a86d875
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      responses:
        '200':
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/x-fabric-request-id-header'
          description: OK
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/notAuthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/resourceNotFound'
        '500':
          $ref: '#/components/responses/internalServerError'
  /product-attribute-groups:
    post:
      tags:
        - Attribute Groups
      summary: Create Product Attribute Group
      description: >-
        An attribute group is a collection of attributes that can be assigned to
        products or categories. This endpoint creates an attribute group with
        associated attributes so that it's easier to assign attributes to
        products and categories. At least one attribute must be specified.
      operationId: createAttributeGroup
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      requestBody:
        $ref: '#/components/requestBodies/createAttributeGroupRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createAttributeGroupResponse'
          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'
        '500':
          $ref: '#/components/responses/internalServerError'
    get:
      tags:
        - Attribute Groups
      summary: Get All Product Attribute Groups
      description: >-
        Attribute group is a collection of attributes that can be assigned to
        products or categories. This endpoint gets all the existing attribute
        groups along with their attributes.
      operationId: getAttributeGroups
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/sortby'
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      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'
  /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'
  /product-attribute-groups/{id}:
    get:
      tags:
        - Attribute Groups
      summary: Get Single Attribute Group
      description: >-
        Attribute groups are collections of attributes that can be assigned to
        products or categories. This endpoint gets details of the product
        attribute groups for the specified ID for proper details of product
        information on your e-commerce portal.
      operationId: getAttributeGroup
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: 24-character system-generated attribute group ID
          example: 63328bf0b5f328bf0b5f3288
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAttributeGroupResponse'
          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/resourceNotFound'
        '500':
          $ref: '#/components/responses/internalServerError'
    put:
      tags:
        - Attribute Groups
      summary: Update Attribute Group
      description: >-
        Updates the specified attribute group by replacing its current
        configuration. You can modify group name, description, priority order,
        and the list of associated attributes. You may also adjust whether the
        attribute is editable or read-only. This operation completely replaces
        the existing group configuration.
      operationId: updateAttributeGroup
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: 24-character system-generated attribute group ID
          example: 88328bf0b5f328bf0b5f328b
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      requestBody:
        $ref: '#/components/requestBodies/updateAttributeGroupRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updateAttributeGroupResponse'
          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/resourceNotFound'
        '500':
          $ref: '#/components/responses/internalServerError'
    delete:
      tags:
        - Attribute Groups
      summary: Delete Attribute Group
      description: >-
        Deletes a product attribute group by its ID. This operation is typically
        used to remove outdated or unused attribute group configurations.
      operationId: deleteAttributeGroup
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: 24-character system-generated attribute group ID
          example: 5f328bf0b5f328bf0b5f328b
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      responses:
        '200':
          description: OK
          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/resourceNotFound'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  examples:
    categoryDateRequest:
      value:
        name: Category datetime example
        isLocalizable: false
        target: CATEGORY
        type: DATETIME
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          dateFormat: MM/DD/YYYY
    categoryBooleanRequest:
      value:
        name: Category boolean example
        isLocalizable: false
        target: CATEGORY
        type: BOOLEAN
        validation:
          isMandatory: false
    categoryNumberRequest:
      value:
        name: Category number example
        isLocalizable: false
        target: CATEGORY
        type: NUMBER
        validation:
          isMandatory: false
          isDecimal: true
          formula: ''
    categoryTextRequest:
      value:
        name: category text example
        isLocalizable: false
        target: CATEGORY
        type: TEXT
        validation:
          isMandatory: false
          subType: SMALL_TEXT
          formula: ''
    serialRequest:
      value:
        name: serialNumber
        description: >-
          Serial number that starts with the 1 and keeps incrementing 10 on the
          subsequent calls.
        type: SERIAL
        target: PRODUCT
        isLocalizable: false
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          startWith: 1
          increment: 10
    mandatoryBooleanRequest:
      value:
        name: isLive
        description: Boolean attribute to capture if the product is live.
        type: BOOLEAN
        target: PRODUCT
        isLocalizable: false
        validation:
          isMandatory: true
    dateRequest:
      value:
        name: Date Attribute
        description: Attribute to capture date
        type: DATETIME
        target: PRODUCT
        isLocalizable: false
        validation:
          isMandatory: false
          dateFormat: MM/DD/YYYY
          formula: ''
    decimalWithRangeRequest:
      value:
        name: percentage
        description: Attribute to capture percentage
        type: NUMBER
        isLocalizable: false
        target: PRODUCT
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          isDecimal: true
          max: 100
          min: 0
    formulaRequest:
      value:
        name: Weight in pounds
        description: Weight of the parcel in pounds
        type: NUMBER
        isLocalizable: false
        target: PRODUCT
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: >-
            (async ()=> parseFloat(await attribute('64c15579e1f95e3214660cce'))
            * 2.2)()
          isDecimal: true
    decimalRequest:
      value:
        name: Weight
        description: Weight of the parcel
        type: NUMBER
        isLocalizable: false
        target: PRODUCT
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          isDecimal: true
    numberRequest:
      value:
        name: Age
        description: Attribute to capture age
        type: NUMBER
        isLocalizable: false
        target: PRODUCT
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          isDecimal: false
    lovRequest:
      value:
        name: MultiOption
        description: Color Attribute
        isLocalizable: false
        target: PRODUCT
        type: OPTIONS
        validation:
          isMandatory: false
          isManualOverwrite: false
          subType: MULTIPLE
          acceptedValues:
            - Colour
            - Flavour
    localizedLovRequest:
      value:
        name: MultiOption
        description: Color Attribute
        isLocalizable: true
        target: PRODUCT
        type: OPTIONS
        validation:
          isMandatory: false
          isManualOverwrite: false
          subType: MULTIPLE
          localizedAcceptedValues:
            en-GB:
              - Colour
              - Flavour
            en-US:
              - Color
              - Flavor
        localizedProperties:
          en-GB:
            name: Multi-Option
    localizedTextAreaRequest:
      value:
        name: Color
        description: Color Attribute
        isLocalizable: true
        target: PRODUCT
        type: TEXT
        validation:
          isMandatory: false
          subType: TEXT_AREA
          formula: ''
        localizedProperties:
          en-GB:
            name: Colour
    smallTextRequest:
      value:
        name: Small Text example
        isLocalizable: false
        target: PRODUCT
        type: TEXT
        validation:
          isMandatory: false
          subType: SMALL_TEXT
          formula: ''
    categoryDateResponse:
      value:
        id: 64c15582e1f95e3214660d08
        name: Category datetime example
        isLocalizable: false
        target: CATEGORY
        type: DATETIME
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          dateFormat: MM/DD/YYYY
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    categoryBooleanResponse:
      value:
        id: 64c15581e1f95e3214660d03
        name: Category boolean example
        isLocalizable: false
        target: CATEGORY
        type: BOOLEAN
        validation:
          isMandatory: false
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    categoryNumberResponse:
      value:
        id: 64c15581e1f95e3214660cfe
        name: Category number example
        isLocalizable: false
        target: CATEGORY
        type: NUMBER
        validation:
          isMandatory: false
          isDecimal: true
          formula: ''
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    categoryTextResponse:
      value:
        id: 64c15580e1f95e3214660cf9
        name: category text example
        isLocalizable: false
        target: CATEGORY
        type: TEXT
        validation:
          isMandatory: false
          subType: SMALL_TEXT
          formula: ''
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    serialResponse:
      value:
        id: 64c1557de1f95e3214660ceb
        name: serialNumber
        description: >-
          Serial number which starts with the 1 and keeps incrementing 10 for
          the subsequent call
        type: SERIAL
        target: PRODUCT
        isLocalizable: false
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          startWith: 1
          increment: 10
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    mandatoryBooleanResponse:
      value:
        id: 64c1557ce1f95e3214660ce6
        name: isLive
        description: Boolean attribute to capture if the product is live.
        type: BOOLEAN
        target: PRODUCT
        isLocalizable: false
        validation:
          isMandatory: true
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    dateResponse:
      value:
        id: 64c1557be1f95e3214660ce1
        name: Date Attribute
        description: Attribute to capture date
        type: DATETIME
        target: PRODUCT
        isLocalizable: false
        validation:
          isMandatory: false
          dateFormat: MM/DD/YYYY
          formula: ''
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    decimalWithRangeResponse:
      value:
        id: 64c1557be1f95e3214660c12
        name: percentage
        description: Attribute to capture percentage
        type: NUMBER
        isLocalizable: false
        target: PRODUCT
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          isDecimal: true
          max: 100
          min: 0
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    formulaResponse:
      value:
        id: 64c1557be1f95e3214660cdc
        name: Weight in pounds
        description: Weight of the parcel in pounds
        type: NUMBER
        isLocalizable: false
        target: PRODUCT
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: >-
            (async ()=> parseFloat(await attribute('64c15579e1f95e3214660cce'))
            * 2.2)()
          isDecimal: true
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    decimalResponse:
      value:
        id: 64c15579e1f95e3214660cce
        name: Weight
        description: Weight of the parcel
        type: NUMBER
        isLocalizable: false
        target: PRODUCT
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          isDecimal: true
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    numberResponse:
      value:
        id: 64c1557ae1f95e3214660cd9
        name: Age
        description: Attribute to capture age
        type: NUMBER
        isLocalizable: false
        target: PRODUCT
        validation:
          isMandatory: false
          isManualOverwrite: false
          formula: ''
          isDecimal: false
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    lovResponse:
      value:
        id: 64c15579e1f95e3214660abc
        name: MultiOption
        description: Color Attribute
        isLocalizable: false
        target: PRODUCT
        type: OPTIONS
        validation:
          isMandatory: false
          isManualOverwrite: false
          subType: MULTIPLE
          acceptedValues:
            - Colour
            - Flavour
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    localizedLovResponse:
      value:
        id: 64c15579e1f95e3214660cce
        name: MultiOption
        description: Color Attribute
        isLocalizable: true
        target: PRODUCT
        type: OPTIONS
        validation:
          isMandatory: false
          isManualOverwrite: false
          subType: MULTIPLE
          localizedAcceptedValues:
            en-GB:
              - Colour
              - Flavour
            en-US:
              - Color
              - Flavor
        localizedProperties:
          en-GB:
            name: Multi-Option
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    localizedTextAreaResponse:
      value:
        id: 64c1557ae1f95e3214660dd3
        name: Color
        description: Color Attribute
        isLocalizable: true
        target: PRODUCT
        type: TEXT
        validation:
          isMandatory: false
          subType: TEXT_AREA
          formula: ''
          isManualOverwrite: false
        localizedProperties:
          en-GB:
            name: Colour
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    smallTextResponse:
      value:
        id: 64c15577e1f95e3214660cbe
        name: Small Text example
        isLocalizable: false
        target: PRODUCT
        type: TEXT
        validation:
          isMandatory: false
          subType: SMALL_TEXT
          isManualOverwrite: false
          formula: ''
        updatedAt: 2023-07-26T17:18:47.162Z
        createdAt: 2023-07-26T17:18:47.162Z
        updatedBy: test@email.com
    multiAttributeResponse:
      value:
        data:
          - id: 64c1557de1f95e3214660ceb
            name: serialNumber
            description: >-
              Serial number which starts with the 1 and keeps incrementing 10
              for the subsequent call
            type: SERIAL
            target: PRODUCT
            isLocalizable: false
            validation:
              isMandatory: false
              isManualOverwrite: false
              formula: ''
              startWith: 1
              increment: 10
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c1557ce1f95e3214660ce6
            name: isLive
            description: Boolean attribute to capture if the product is live.
            type: BOOLEAN
            target: PRODUCT
            isLocalizable: false
            validation:
              isMandatory: true
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c1557be1f95e3214660ce1
            name: Date Attribute
            description: Attribute to capture date
            type: DATETIME
            target: PRODUCT
            isLocalizable: false
            validation:
              isMandatory: false
              dateFormat: MM/DD/YYYY
              formula: ''
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c1557be1f95e3214660c12
            name: percentage
            description: Attribute to capture percentage
            type: NUMBER
            isLocalizable: false
            target: PRODUCT
            validation:
              isMandatory: false
              isManualOverwrite: false
              formula: ''
              isDecimal: true
              max: 100
              min: 0
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c1557be1f95e3214660cdc
            name: Weight in pounds
            description: Weight of the parcel in pounds
            type: NUMBER
            isLocalizable: false
            target: PRODUCT
            validation:
              isMandatory: false
              isManualOverwrite: false
              formula: >-
                (async ()=> parseFloat(await
                attribute('64c15579e1f95e3214660cce')) * 2.2)()
              isDecimal: true
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c15579e1f95e3214660cce
            name: Weight
            description: Weight of the parcel
            type: NUMBER
            isLocalizable: false
            target: PRODUCT
            validation:
              isMandatory: false
              isManualOverwrite: false
              formula: ''
              isDecimal: true
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c1557ae1f95e3214660cd9
            name: Age
            description: Attribute to capture age
            type: NUMBER
            isLocalizable: false
            target: PRODUCT
            validation:
              isMandatory: false
              isManualOverwrite: false
              formula: ''
              isDecimal: false
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c15579e1f95e3214660abc
            name: MultiOption
            description: Color Attribute
            isLocalizable: false
            target: PRODUCT
            type: OPTIONS
            validation:
              isMandatory: false
              isManualOverwrite: false
              subType: MULTIPLE
              acceptedValues:
                - Colour
                - Flavour
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c15579e1f95e3214660cce
            name: MultiOption
            description: Color Attribute
            isLocalizable: true
            target: PRODUCT
            type: OPTIONS
            validation:
              isMandatory: false
              isManualOverwrite: false
              subType: MULTIPLE
              localizedAcceptedValues:
                en-GB:
                  - Colour
                  - Flavour
                en-US:
                  - Color
                  - Flavor
            localizedProperties:
              en-GB:
                name: Multi-Option
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c1557ae1f95e3214660dd3
            name: Color
            description: Color Attribute
            isLocalizable: true
            target: PRODUCT
            type: TEXT
            validation:
              isMandatory: false
              subType: TEXT_AREA
              formula: ''
              isManualOverwrite: false
            localizedProperties:
              en-GB:
                name: Colour
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
          - id: 64c15577e1f95e3214660cbe
            name: Small Text example
            isLocalizable: false
            target: PRODUCT
            type: TEXT
            validation:
              isMandatory: false
              subType: SMALL_TEXT
              isManualOverwrite: false
              formula: ''
            updatedAt: 2023-07-26T17:18:47.162Z
            createdAt: 2023-07-26T17:18:47.162Z
            updatedBy: test@email.com
        offset: 0
        limit: 10
        count: 10
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: S2S access token (JWT) from fabric Identity service (during Login)
  parameters:
    locale:
      in: query
      name: locales
      schema:
        type: string
        example: fr-CA, en-US
      description: >-
        Comma-separated locale codes of product. You'll get a 400 error if the
        locales aren't supported. Refer to standard locales in
        https://www.rfc-editor.org/rfc/rfc5646.
      required: false
    attributeTarget:
      in: query
      name: target
      schema:
        type: string
        enum:
          - PRODUCT
          - CATEGORY
      description: Distinguishes between `Product` and `Category` attributes
      example: PRODUCT
      required: false
    limit:
      in: query
      name: limit
      description: Maximum number of records per page
      schema:
        type: integer
        format: int32
        default: 10
        example: 20
    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: 2
      required: false
    sortby:
      in: query
      name: sortby
      description: Criteria to sort the response
      schema:
        type: string
        enum:
          - NAME
          - PRIORITY
          - UPDATED_AT
          - ATTRIBUTE_COUNT
        example: NAME
    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:
    searchAttributeRequest:
      description: Request body for attribute search
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - match
            properties:
              sort:
                type: string
                description: >-
                  Criteria to sort response. Sorting is supported only on
                  `createdAt`, `updatedAt`, `type`, `name` and `isMandatory`.
                  `-` refers to descending while `+` refers to ascending order
                example: +name,-isMandatory
              match:
                description: Specification for matching attributes
                type: object
                minProperties: 1
                properties:
                  id:
                    $ref: '#/components/schemas/simpleStringSearchOperation'
                  name:
                    allOf:
                      - $ref: '#/components/schemas/stringSearchOperation'
                    type: object
                    description: >-
                      Searches for attributes that matches the query. Append
                      locale and name with a `#` as a value
                    properties:
                      locale:
                        type: array
                        description: >-
                          If `isLocalizable` is true, searches for the requested
                          name in the list of locales provided here. If
                          `isLocalizable` is false, the search will only be on
                          the non-localized names.
                        items:
                          type: string
                          description: Locale
                          example: en_US
                  description:
                    $ref: '#/components/schemas/stringSearchOperation'
                  isLocalizable:
                    $ref: '#/components/schemas/booleanSearchOperation'
                  isMandatory:
                    $ref: '#/components/schemas/booleanSearchOperation'
                  isManualOverwrite:
                    $ref: '#/components/schemas/booleanSearchOperation'
                  isFormulaSet:
                    $ref: '#/components/schemas/booleanSearchOperation'
                  isCustomFormulaSet:
                    $ref: '#/components/schemas/booleanSearchOperation'
                  target:
                    anyOf:
                      - $ref: '#/components/schemas/singleTarget'
                      - $ref: '#/components/schemas/multiTarget'
                  type:
                    anyOf:
                      - $ref: '#/components/schemas/singleType'
                      - $ref: '#/components/schemas/multiType'
                  subType:
                    anyOf:
                      - $ref: '#/components/schemas/singleSubType'
                      - $ref: '#/components/schemas/multiSubType'
                  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 <br /> When no value is
                  specified, default is 10.
                type: integer
                format: int32
                default: 10
                example: 10
    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
    createAttributeRequest:
      description: Request body to create attribute
      content:
        application/json:
          examples:
            CategoryDate:
              $ref: '#/components/examples/categoryDateRequest'
            CategoryBoolean:
              $ref: '#/components/examples/categoryBooleanRequest'
            CategoryNumber:
              $ref: '#/components/examples/categoryNumberRequest'
            CategoryText:
              $ref: '#/components/examples/categoryTextRequest'
            Serial:
              $ref: '#/components/examples/serialRequest'
            MandatoryBoolean:
              $ref: '#/components/examples/mandatoryBooleanRequest'
            Date:
              $ref: '#/components/examples/dateRequest'
            Formula:
              $ref: '#/components/examples/formulaRequest'
            DecimalRangeNumber:
              $ref: '#/components/examples/decimalWithRangeRequest'
            DecimalNumber:
              $ref: '#/components/examples/decimalRequest'
            Number:
              $ref: '#/components/examples/numberRequest'
            Options:
              $ref: '#/components/examples/lovRequest'
            LocalizedOptions:
              $ref: '#/components/examples/localizedLovRequest'
            TextArea:
              $ref: '#/components/examples/localizedTextAreaRequest'
            SmallText:
              $ref: '#/components/examples/smallTextRequest'
          schema:
            type: object
            additionalProperties: false
            required:
              - type
              - target
            properties:
              name:
                type: string
                example: color
                description: >-
                  Attribute name that appears when it isn't localized. Refer to
                  `localizedProperties` to get the localized name.
              description:
                type: string
                example: Product color
                description: Attribute description
              type:
                $ref: '#/components/schemas/attributeType'
              target:
                anyOf:
                  - $ref: '#/components/schemas/targetValue'
                  - description: Distinguishes between `Product` and `Category` attributes
              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.
              validation:
                $ref: '#/components/schemas/attributeValidation'
    updateAttributeRequest:
      description: Request body to update attribute
      content:
        application/json:
          examples:
            CategoryDate:
              $ref: '#/components/examples/categoryDateRequest'
            CategoryBoolean:
              $ref: '#/components/examples/categoryBooleanRequest'
            CategoryNumber:
              $ref: '#/components/examples/categoryNumberRequest'
            CategoryText:
              $ref: '#/components/examples/categoryTextRequest'
            Serial:
              $ref: '#/components/examples/serialRequest'
            MandatoryBoolean:
              $ref: '#/components/examples/mandatoryBooleanRequest'
            Date:
              $ref: '#/components/examples/dateRequest'
            Formula:
              $ref: '#/components/examples/formulaRequest'
            DecimalRangeNumber:
              $ref: '#/components/examples/decimalWithRangeRequest'
            DecimalNumber:
              $ref: '#/components/examples/decimalRequest'
            Number:
              $ref: '#/components/examples/numberRequest'
            Options:
              $ref: '#/components/examples/lovRequest'
            LocalizedOptions:
              $ref: '#/components/examples/localizedLovRequest'
            TextArea:
              $ref: '#/components/examples/localizedTextAreaRequest'
            SmallText:
              $ref: '#/components/examples/smallTextRequest'
          schema:
            type: object
            additionalProperties: false
            properties:
              name:
                type: string
                example: color
                description: >-
                  Attribute name that appears when it isn't localized. Refer to
                  `localizedProperties` to get the localized name.
              description:
                type: string
                example: Product color
                description: Brief description of attribute
              localizedProperties:
                $ref: '#/components/schemas/localizedProperties'
              type:
                $ref: '#/components/schemas/attributeType'
              target:
                anyOf:
                  - $ref: '#/components/schemas/targetValue'
                  - description: Distinguishes between `Product` and `Category` attributes
              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.
              validation:
                $ref: '#/components/schemas/attributeValidation'
    updateAttributeMappingsRequest:
      description: Request body to update mapping of attribute
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/attributeMappingRequest'
    createAttributeGroupRequest:
      description: Request body to create attribute group
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - name
            properties:
              name:
                type: string
                example: Dimensions
                description: Attribute group name
              description:
                type: string
                example: Item dimensions
                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
                minItems: 1
                items:
                  required:
                    - attributeId
                  properties:
                    attributeId:
                      type: string
                      example: 5f328bf0b5f328bf0b5f328b
                      description: 24-character system-generated attribute ID
                    isReadOnly:
                      type: boolean
                      example: true
                      description: >-
                        true: Attribute is read only <br /> false: Attribute is
                        editable
    updateAttributeGroupRequest:
      description: Request body to update attribute group
      content:
        application/json:
          schema:
            type: object
            required:
              - name
            properties:
              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
                minItems: 1
                items:
                  properties:
                    attributeId:
                      type: string
                      example: 5f328bf0b5f328bf0b5f328b
                      description: 24-character system-generated attribute ID
                    isReadOnly:
                      type: boolean
                      example: true
                      description: >-
                        true: Attribute is read only <br /> false: Attribute is
                        editable
  responses:
    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
    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'
    resourceNotFound:
      description: Not found
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                description: Error code
                type: string
                example: NOT_FOUND
              message:
                description: Error description
                type: string
                example: Resource not found
    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
    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
  headers:
    x-fabric-request-id-header:
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  schemas:
    singleSubType:
      description: Searches for attributes of the specified `subType`
      type: object
      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/subTypeValue'
    subTypeValue:
      type: string
      description: >-
        Single string for an `EQUALS` operation; comma-separated string for an
        `IN` operation
      example: SINGLE
      enum:
        - SINGLE
        - MULTIPLE
        - SMALL_TEXT
        - TEXT_AREA
        - HTML
    multiSubType:
      description: Searches for attributes of the specified `subType`
      type: object
      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/subTypeValue'
    singleType:
      description: Attributes of the specified type
      type: object
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: Operations supported on a `string` type
          example: EQUALS
          enum:
            - EQUALS
        value:
          $ref: '#/components/schemas/typeValue'
    typeValue:
      type: string
      description: >-
        Single string for `EQUALS` operation; comma-separated string for an `IN`
        operation
      example: TEXT
      enum:
        - TEXT
        - NUMBER
        - DATETIME
        - BOOLEAN
        - OPTIONS
        - SERIAL
    multiType:
      description: Attributes of the specified type
      type: object
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: Operations supported on a `string` type
          example: IN
          enum:
            - IN
        value:
          type: array
          items:
            $ref: '#/components/schemas/typeValue'
    singleTarget:
      type: object
      description: Attributes of the specified target
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: Operations supported on a `string` type.
          example: EQUALS
          enum:
            - EQUALS
        value:
          $ref: '#/components/schemas/targetValue'
    targetValue:
      type: string
      description: >-
        Single string for `EQUALS` operation; comma-separated string for an `IN`
        operation
      example: PRODUCT
      enum:
        - PRODUCT
        - CATEGORY
    multiTarget:
      type: object
      description: Attributes of the specified target
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: Operations supported on a `string` type.
          example: IN
          enum:
            - IN
        value:
          type: array
          items:
            $ref: '#/components/schemas/targetValue'
    attributeValidation:
      type: object
      description: Validation details
      properties:
        isMandatory:
          type: boolean
          default: false
          example: true
          description: 'true: Attribute is mandatory. <br /> false: Attribute is optional'
        isManualOverwrite:
          type: boolean
          default: false
          example: true
          description: >-
            true: The value isn't computed using `formula` property <br />
            false: The value is computed using `formula` property. <br /> Note:
            `manualOverwrite` is applicable only for `formula` property.
        formula:
          type: string
          example: '`(async () => await attribute(''id'') *10)()`'
          description: >-
            JavaScript will be evaluated and applied on product. <br />
            Applicable only for `attributeType` - `TEXT`, `NUMBER`, `OPTIONS`,
            and `DATE`.
        customValidationFormula:
          type: string
          example: (async () => await attribute('id') > 1)()
          description: >-
            JavaScript can be provided here to add custom validations.<br />
            Applicable only for `attributeType` - `TEXT`, `NUMBER`, `OPTIONS`,
            and `DATE`.
        dateFormat:
          type: string
          example: MM-DD-YYYY
          description: Date format. <br /> Applicable when `attributeType` is `DATETIME`.
        isDecimal:
          type: boolean
          default: false
          example: true
          description: >-
            true: Input can be a float. <br /> false: Input must be an integer.
            <br /> Applicable only when `attributeType` is `NUMBER`.
        min:
          type: number
          format: double
          example: 100
          description: >-
            Minimum value allowed for an attribute. <br /> Applicable only when
            `attributeType` is `NUMBER`.
        max:
          type: number
          format: double
          example: 100
          description: >-
            Maximum value allowed for an attribute. <br /> Applicable only when
            `attributeType` is `NUMBER`.
        startWith:
          type: integer
          format: int32
          example: 1
          description: >-
            Starting number in a series. <br /> Applicable only when
            `attributeType` is `SERIAL`.
        increment:
          type: integer
          format: int32
          example: 10
          description: >-
            Represents number increment in a series. <br /> Applicable only when
            `attributeType` is `SERIAL`. For example, if the `startWith` is 5
            and `increment` is 5, the next value in the series will 10, 15, and
            so forth.
        subType:
          type: string
          enum:
            - SINGLE
            - MULTIPLE
            - SMALL_TEXT
            - TEXT_AREA
            - HTML
          example: SINGLE
          description: >-
            Subtypes such as `SINGLE` and `MULTIPLE` are applicable when
            `attributeType` is `OPTIONS`. The rest of the subTypes are
            applicable when `attributeType` is `TEXT`.
        acceptedValues:
          type: array
          items:
            type: string
            description: Accepted values
            example: a
          description: >-
            List of accepted values. Applicable when the `attributeType` is
            `OPTIONS` and `subType` is `MULTIPLE`. **Note**: When non-localized,
            shows the attribute name as it is. Otherwise, shows the localized
            name.
        localizedAcceptedValues:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
              example: a
              description: Localized accepted value
          example:
            en-US:
              - a
              - b
              - c
            en-IN:
              - x
              - 'y'
              - z
          description: >-
            List of accepted localized values. Applicable when the
            `attributeType` is `OPTIONS` and `subType` is `MULTIPLE`. When
            attribute name is localized, the localized values are shown.
    attributeType:
      type: string
      enum:
        - TEXT
        - NUMBER
        - DATETIME
        - BOOLEAN
        - OPTIONS
        - SERIAL
      example: TEXT
      description: Attribute type
    attribute:
      type: object
      properties:
        id:
          type: string
          example: CAZZX1234567DDDDD
          description: Attribute ID
        name:
          type: string
          example: color
          description: >-
            Non-localized attribute name. Refer to `localizedProperties` to get
            the localized name.
        description:
          type: string
          example: Product color
          description: Brief description of attribute
        type:
          $ref: '#/components/schemas/attributeType'
        target:
          anyOf:
            - $ref: '#/components/schemas/targetValue'
            - description: Distinguishes between `Product` and `Category` attributes
        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.
        validation:
          $ref: '#/components/schemas/attributeValidation'
        updatedBy:
          type: string
          description: Email of the user who last updated the attribute
          example: test@email.com
        createdAt:
          type: string
          description: Time of attribute creation (UTC)
          example: '2021-04-20T10:24:36.162Z'
        updatedAt:
          type: string
          description: Time of last update to attribute (UTC)
          example: '2021-04-20T10:24:36.162Z'
    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.
    attributeMappingRequest:
      description: Mapping of merchant-specified names to fabric-standard names
      type: object
      additionalProperties: false
      properties:
        image:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              example: CAXCC1234AASXSSSS
              description: >-
                Merchant-specified `image` name to be mapped to fabric-standard
                name
        active:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              example: CBCAC1234AASXLLLL
              description: >-
                Merchant-specified name for `active` status to be mapped to
                fabric-standard name
        sku:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              example: CBCAC1234AASKKKK
              description: >-
                Merchant-specified name for `SKU` to be mapped to
                fabric-standard name
        title:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              example: CBCAC1234AAS554R
              description: >-
                Merchant-specified name for `title` to be mapped to
                fabric-standard name
    attributeMapping:
      type: object
      properties:
        image:
          type: object
          properties:
            id:
              type: string
              example: CAXCC1234AASXSSSS
              description: Merchant-specified image ID
            name:
              type: string
              example: color
              description: Merchant-specified name for `image`
            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.
        active:
          type: object
          properties:
            id:
              type: string
              example: CBCAC1234AASXLLLL
              description: Merchant-specified ID for `active` status
            name:
              type: string
              example: color
              description: Merchant-specified name for `active` status
            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.
        sku:
          type: object
          properties:
            id:
              type: string
              example: CBCAC1234AASKKKK
              description: Merchant-specified SKU ID
            name:
              type: string
              example: color
              description: Merchant-specified name for `SKU`
            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.
        title:
          type: object
          properties:
            id:
              type: string
              example: CBCAC1234AAS554R
              description: Merchant-specified title ID
            name:
              type: string
              example: color
              description: Merchant-specified name for `title`
            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.
    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
    getAttributeMappingsResponse:
      $ref: '#/components/schemas/attributeMapping'
    updateAttributeMappingsResponse:
      $ref: '#/components/schemas/attributeMapping'
    getAttributeResponse:
      $ref: '#/components/schemas/attribute'
    getAttributesResponse:
      description: Attribute details
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/attribute'
        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: 5
        limit:
          description: Maximum number of records per page
          type: integer
          format: int32
          default: 10
          example: 10
        count:
          description: Total number of records
          type: integer
          format: int32
          example: 100
    createAttributeResponse:
      $ref: '#/components/schemas/attribute'
    updateAttributeResponse:
      $ref: '#/components/schemas/attribute'
    getAttributeGroupResponse:
      $ref: '#/components/schemas/attributeGroup'
    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
    createAttributeGroupResponse:
      $ref: '#/components/schemas/attributeGroup'
    updateAttributeGroupResponse:
      $ref: '#/components/schemas/attributeGroup'
    dateTimeSearchOperation:
      type: object
      description: Date-time search
      anyOf:
        - $ref: '#/components/schemas/datetimeRangeOperation'
        - $ref: '#/components/schemas/datetimeInOperation'
        - $ref: '#/components/schemas/datetimeOperation'
    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'
    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'
    numberSearchOperation:
      type: object
      description: Number search
      anyOf:
        - $ref: '#/components/schemas/singleNumberSearchOperation'
        - $ref: '#/components/schemas/multiNumberSearchOperation'
    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'
    simpleStringSearchOperation:
      type: object
      description: Simple string search
      anyOf:
        - $ref: '#/components/schemas/simpleMultiStringSearchOperation'
        - $ref: '#/components/schemas/simpleSingleStringSearchOperation'
    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'
    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'
    stringSearchOperation:
      type: object
      description: String search
      anyOf:
        - $ref: '#/components/schemas/simpleMultiStringSearchOperation'
        - $ref: '#/components/schemas/singleStringSearchOperation'
    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'
    booleanSearchOperation:
      type: object
      description: Boolean search
      required:
        - op
        - value
      properties:
        op:
          type: string
          description: Operations that can be performed on a `boolean` type
          example: EQUALS
          enum:
            - EQUALS
        value:
          $ref: '#/components/schemas/booleanSchema'
    booleanSchema:
      type: boolean
      description: Sample `boolean` schema
      example: true
    stringSchema:
      type: string
      description: Sample `string` schema
      example: blue
    doubleSchema:
      type: number
      format: double
      description: Sample `double` schema
      example: 1
security:
  - authorization: []
