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

# Get Single Attribute

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



## OpenAPI

````yaml attribute.openapi get /product-attributes/{id}
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-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'
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
    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
  schemas:
    getAttributeResponse:
      $ref: '#/components/schemas/attribute'
    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'
    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.
    attributeType:
      type: string
      enum:
        - TEXT
        - NUMBER
        - DATETIME
        - BOOLEAN
        - OPTIONS
        - SERIAL
      example: TEXT
      description: Attribute type
    targetValue:
      type: string
      description: >-
        Single string for `EQUALS` operation; comma-separated string for an `IN`
        operation
      example: PRODUCT
      enum:
        - PRODUCT
        - CATEGORY
    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
    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.
  examples:
    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
    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
    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
    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
  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
    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
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: S2S access token (JWT) from fabric Identity service (during Login)

````