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

# Import attributes from CSV

> Upload a CSV file to import attribute definitions for the specified brand/domain. The import is processed asynchronously.

**Expected CSV columns**
- **attribute_name** (required): Attribute display name
- **attribute_key** (optional): Machine-readable key
- **description** (optional): Attribute description
- **data_type** (optional): Data type
- **scope** (optional): Attribute scope
- **enum_values** (optional): Allowed values, pipe-delimited (e.g. `S|M|L`)
- **allow_ai_content** (optional): Allow AI to generate values (`true`/`false`)
- **source** (optional): `MERCHANT` or `GOLD_STANDARD`
- **guideline_reason** (optional): Guidance for AI enrichment




## OpenAPI

````yaml product-agent.openapi post /v2/attributes/import
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Support Team
  description: >
    The Product Agent API helps brands optimize product data for AI-driven
    commerce.

    Monitor how your catalog performs in AI search experiences, enrich product

    content for stronger semantic visibility, and publish optimized data across

    channels. Designed for iterative improvement, Product Agent enables teams to

    measure, refine, and enhance product content as AI shopping behavior
    evolves.
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: fabric Orders API
  version: 3.0.0
  x-audience: external-public
servers:
  - url: https://commerceos.aiagents.fabric.inc/api
    description: Production API
security:
  - authorization: []
externalDocs:
  description: Find out more about Product Agent.
  url: https://developer.fabric.inc/product-agent/overview
paths:
  /v2/attributes/import:
    post:
      summary: Import attributes from CSV
      description: >
        Upload a CSV file to import attribute definitions for the specified
        brand/domain. The import is processed asynchronously.


        **Expected CSV columns**

        - **attribute_name** (required): Attribute display name

        - **attribute_key** (optional): Machine-readable key

        - **description** (optional): Attribute description

        - **data_type** (optional): Data type

        - **scope** (optional): Attribute scope

        - **enum_values** (optional): Allowed values, pipe-delimited (e.g.
        `S|M|L`)

        - **allow_ai_content** (optional): Allow AI to generate values
        (`true`/`false`)

        - **source** (optional): `MERCHANT` or `GOLD_STANDARD`

        - **guideline_reason** (optional): Guidance for AI enrichment
      operationId: importAttributes
      parameters:
        - $ref: '#/components/parameters/DomainHeader'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: CSV file containing attribute definitions.
                name:
                  type: string
                  description: Human-friendly import name.
                  example: Spring attributes import
      responses:
        '202':
          description: Import accepted for asynchronous processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributeImportAcceptedResponse'
              example:
                import_id: e2716438-b763-4be8-82d2-36abe0cb92b1
                name: attribute_test.csv
                status: PENDING
                total_rows: 36
                processed_rows: 0
                created_count: 0
                updated_count: 0
                skipped_count: 0
                failed_count: 0
                input_filename: attribute_test.csv
                input_file_url: null
                error_file_url: null
                error_message: null
                errors: []
                started_at: null
                completed_at: null
                created_at: '2026-03-12T18:04:03.879876Z'
        '400':
          description: Bad request - invalid CSV or missing file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '401':
          description: Unauthorized - missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
components:
  parameters:
    DomainHeader:
      name: domain
      in: header
      required: true
      schema:
        type: string
        example: vessel
      description: >-
        The brand domain or brand identifier used to scope the request to a
        specific brand’s data and configuration.
  schemas:
    AttributeImportAcceptedResponse:
      type: object
      required:
        - import_id
        - name
        - status
        - total_rows
        - processed_rows
        - created_count
        - updated_count
        - skipped_count
        - failed_count
        - input_filename
        - errors
        - created_at
      properties:
        import_id:
          type: string
          format: uuid
          description: Identifier for the attribute import job.
          example: e2716438-b763-4be8-82d2-36abe0cb92b1
        name:
          type: string
          description: Import name.
          example: attribute_test.csv
        status:
          type: string
          example: PENDING
        total_rows:
          type: integer
          example: 36
        processed_rows:
          type: integer
          example: 0
        created_count:
          type: integer
          example: 0
        updated_count:
          type: integer
          example: 0
        skipped_count:
          type: integer
          example: 0
        failed_count:
          type: integer
          example: 0
        input_filename:
          type: string
          example: attribute_test.csv
        input_file_url:
          type: string
          format: uri
          nullable: true
          example: null
        error_file_url:
          type: string
          format: uri
          nullable: true
          example: null
        error_message:
          type: string
          nullable: true
          example: null
        errors:
          type: array
          items:
            type: string
          example: []
        started_at:
          type: string
          format: date-time
          nullable: true
          example: null
        completed_at:
          type: string
          format: date-time
          nullable: true
          example: null
        created_at:
          type: string
          format: date-time
          example: '2026-03-12T18:04:03.879876Z'
    errorResponse:
      description: Error response
      properties:
        errors:
          description: Errors
          items:
            $ref: '#/components/schemas/errorResponse'
          type: array
        message:
          description: Error message
          example: Bad request
          type: string
        type:
          description: Error type
          example: CLIENT_ERROR
          type: string
      type: object
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````