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

# Bulk Import Categories

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

**Expected CSV columns**
- **name** or **category_name** (required): Category name
- **parent_id** or **parent_category_id** (optional): Parent category ID
- **breadcrumb** (optional): Full breadcrumb path
- **inferred_category** (optional): AI-inferred category




## OpenAPI

````yaml product-agent.openapi post /v2/categories/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/categories/import:
    post:
      summary: Bulk Import Categories
      description: >
        Upload a CSV file to import category data for the specified
        brand/domain. The import is processed asynchronously.


        **Expected CSV columns**

        - **name** or **category_name** (required): Category name

        - **parent_id** or **parent_category_id** (optional): Parent category ID

        - **breadcrumb** (optional): Full breadcrumb path

        - **inferred_category** (optional): AI-inferred category
      operationId: importCategories
      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 categories (e.g. categories.csv)
                name:
                  type: string
                  description: Human friendly import name
                  example: Spring catalog category import
                notify_email:
                  type: boolean
                  description: Send an email when the import completes.
                  default: true
                  example: true
      responses:
        '202':
          description: Import accepted for asynchronous processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryImportAcceptedResponse'
              example:
                import_id: a0cf63a0-55b8-4a25-9218-d972d4d65a79
                status: PENDING
                message: >-
                  Import queued. Use GET /categories/import/{import_id} to track
                  progress.
                created_at: '2026-03-12T17:58:13.605818Z'
        '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'
      security:
        - bearerAuth: []
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:
    CategoryImportAcceptedResponse:
      type: object
      required:
        - import_id
        - status
        - message
        - created_at
      properties:
        import_id:
          type: string
          format: uuid
          description: Identifier for the import job.
          example: a0cf63a0-55b8-4a25-9218-d972d4d65a79
        status:
          type: string
          example: PENDING
        message:
          type: string
          description: Status message for the queued import.
          example: >-
            Import queued. Use GET /categories/import/{import_id} to track
            progress.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the import was created.
          example: '2026-03-12T17:58:13.605818Z'
    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

````