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

# Import catalog CSV

> Import current products and exact variant rows from a CSV file.

The multipart field name is `file`. See [Sync the catalog](/custom-js/catalog#csv-format)
for row inheritance, current columns, and delete rows.


## OpenAPI

````yaml openapi.yaml POST /vfr/manage/sites/{site_id}/products/import
openapi: 3.1.0
info:
  title: virtual.fit API
  version: 2.0.0
  description: Catalog sync, storefront fit evidence, and product recommendation endpoints.
servers:
  - url: https://api.virtual.fit
security:
  - bearerAuth: []
tags:
  - name: Catalog
  - name: Storefront evidence
  - name: Recommendations
paths:
  /vfr/manage/sites/{site_id}/products/import:
    post:
      tags:
        - Catalog
      summary: Import products from CSV
      description: |
        Imports a multipart CSV file synchronously, up to 32 MiB and 1,000
        rows. Repeat `product_id` for exact variant rows. Split larger catalogs
        across multiple files. Upserts are idempotent, so the same file can be
        retried; rows saved before an infrastructure failure remain saved.
        Omit `schema_version` for the current contract.
      operationId: importCatalogCSV
      parameters:
        - $ref: '#/components/parameters/SiteID'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Import result.
          content:
            application/json:
              schema:
                type: object
                required:
                  - imported_count
                  - deleted_product_count
                  - deleted_variant_count
                  - products
                properties:
                  imported_count:
                    type: integer
                  deleted_product_count:
                    type: integer
                  deleted_variant_count:
                    type: integer
                  products:
                    type: array
                    items:
                      type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '413':
          $ref: '#/components/responses/TooLarge'
components:
  parameters:
    SiteID:
      name: site_id
      in: path
      required: true
      description: Custom JavaScript site ID from virtual.fit.
      schema:
        type: string
        format: uuid
  responses:
    BadRequest:
      description: Invalid field or inconsistent catalog data.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API-key account cannot modify this site.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooLarge:
      description: Request body, file, field, or collection exceeds its documented limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Keep the virtual.fit API key on your server.

````