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

# Bulk Import Products from CSV

> Queue a bulk CSV product import for the authenticated organization. Upload a CSV file with multipart/form-data or send JSON with inline `csvText` or a stored `documentId`. The API creates import rows, queues enrichment and product writes through Inngest, and returns a `bulk_...` job ID to poll with GET /api/v1/jobs/{jobId}. Cancel in-flight imports with POST /api/v1/jobs/{jobId}/cancel.



## OpenAPI

````yaml /openapi.json post /api/v1/products/bulk-import
openapi: 3.1.0
info:
  title: OmniCommerce API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://omnicommerce.sg/terms
  description: >-
    OmniCommerce API surface for agents and developer integrations. Includes
    public endpoints (merchant discovery, product search, compare, catalog, ACO
    retrieval) and authenticated endpoints (product management via API key
    Bearer tokens).
servers:
  - url: https://omnicommerce.sg
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: agentic-checkout
    description: Merchant-fulfilled agentic checkout
    x-group: Agentic Checkout
  - name: commerce
    description: Root commerce discovery
    x-group: Commerce
  - name: developer-platform
    description: Authenticated developer platform APIs
    x-group: Developer Platform
  - name: looks
    description: AI-styled product looks
    x-group: Looks
  - name: oauth
    description: OAuth token endpoints
    x-group: OAuth
  - name: orders
    description: Workspace and agentic orders
    x-group: Orders
  - name: organizations
    description: Organization management
    x-group: Organizations
  - name: price-books
    description: Marketplace list-price markup rules
    x-group: Price Books
  - name: products
    description: Product CRUD, bulk import, and publish
    x-group: Products
  - name: promotions
    description: Central promotions and marketplace sync
    x-group: Promotions
  - name: public-agent
    description: Public agent discovery and catalog APIs
    x-group: Public Agent
  - name: settlements
    description: settlements
    x-group: Settlements
  - name: ucp
    description: Universal Commerce Protocol
    x-group: UCP
paths:
  /api/v1/products/bulk-import:
    post:
      tags:
        - products
      summary: Bulk Import Products from CSV
      description: >-
        Queue a bulk CSV product import for the authenticated organization.
        Upload a CSV file with multipart/form-data or send JSON with inline
        `csvText` or a stored `documentId`. The API creates import rows, queues
        enrichment and product writes through Inngest, and returns a `bulk_...`
        job ID to poll with GET /api/v1/jobs/{jobId}. Cancel in-flight imports
        with POST /api/v1/jobs/{jobId}/cancel.
      operationId: post_v1_products_bulk_import
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - targetMarketplaces
                - targetCountries
              properties:
                file:
                  type: string
                  format: binary
                  description: CSV file containing product rows.
                organizationId:
                  type: string
                  description: >-
                    Optional for API-key requests; required for
                    session-authenticated requests across multiple
                    organizations.
                fileName:
                  type: string
                  description: >-
                    Optional display name override. Defaults to the uploaded
                    file name.
                targetMarketplaces:
                  oneOf:
                    - type: string
                      description: Comma-separated marketplace list, e.g. `shopee,lazada`.
                    - type: array
                      items:
                        type: string
                        enum:
                          - shopee
                          - lazada
                          - tiktok
                          - shopify
                          - zalora
                          - amazon
                targetCountries:
                  oneOf:
                    - type: string
                      description: Comma-separated country list, e.g. `sg,my`.
                    - type: array
                      items:
                        type: string
                fieldMapping:
                  type: string
                  description: >-
                    JSON object mapping CSV headers to import fields, e.g.
                    `{"sku":"SKU","title":"Product Name"}`.
                marketplaceStoreSelections:
                  type: string
                  description: JSON object mapping marketplace keys to connected store IDs.
                selectedRowIndexes:
                  type: string
                  description: JSON array of zero-based CSV row indexes to import.
                lane:
                  type: string
                  enum:
                    - standard
                    - enterprise
                dedupPolicy:
                  type: string
                  enum:
                    - keep_first
                    - keep_last
                    - merge_fields_prefer_non_empty
                    - fail_job
                autoApproveThreshold:
                  oneOf:
                    - type: number
                    - type: string
                  description: >-
                    Optional confidence threshold between 0 and 1, or the string
                    `null`.
                spendCeilingUsd:
                  oneOf:
                    - type: number
                    - type: string
                model:
                  type: string
                  description: Optional enrichment model override.
                workflow:
                  type: string
                  description: >-
                    JSON object with enrichment workflow options such as
                    `sourceImagesAutomatically`, `enableRichDescription`, and
                    `autoAssignMarketplaceTaxonomy`.
          application/json:
            schema:
              type: object
              required:
                - targetMarketplaces
                - targetCountries
              properties:
                organizationId:
                  type: string
                  description: >-
                    Optional for API-key requests; required for
                    session-authenticated requests across multiple
                    organizations.
                csvText:
                  type: string
                  description: Inline CSV text. Required unless `documentId` is provided.
                documentId:
                  type: string
                  description: Existing uploaded CSV document ID for the organization.
                fileName:
                  type: string
                selectedRowIndexes:
                  type: array
                  items:
                    type: integer
                    minimum: 0
                lane:
                  type: string
                  enum:
                    - standard
                    - enterprise
                targetMarketplaces:
                  type: array
                  items:
                    type: string
                    enum:
                      - shopee
                      - lazada
                      - tiktok
                      - shopify
                      - zalora
                      - amazon
                  minItems: 1
                targetCountries:
                  type: array
                  items:
                    type: string
                  minItems: 1
                fieldMapping:
                  type: object
                  additionalProperties:
                    type: string
                dedupPolicy:
                  type: string
                  enum:
                    - keep_first
                    - keep_last
                    - merge_fields_prefer_non_empty
                    - fail_job
                autoApproveThreshold:
                  type:
                    - number
                    - 'null'
                spendCeilingUsd:
                  type:
                    - number
                    - 'null'
                marketplaceStoreSelections:
                  type: object
                  additionalProperties:
                    type: string
                model:
                  type: string
                workflow:
                  type: object
                  additionalProperties: true
            example:
              organizationId: org_1
              csvText: |
                sku,title,price,images
                SKU-1,Sample product,19.90,https://cdn.example.com/sku-1.jpg
              targetMarketplaces:
                - shopee
              targetCountries:
                - sg
              fieldMapping:
                sku: sku
                title: title
                price: price
                images: images
      responses:
        '202':
          description: Bulk import workflow accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  apiVersion:
                    type: string
                    default: developer_v1
                  operationId:
                    type: string
                  status:
                    type: string
                  jobId:
                    type: string
                    description: Bulk import job ID with `bulk_` prefix.
                  warnings:
                    type: array
                    items:
                      type: string
                  recommendations:
                    type: array
                    items:
                      type: string
                  links:
                    type: object
                    additionalProperties:
                      type: string
                  data:
                    type: object
                    properties:
                      rowCount:
                        type: integer
                      fileName:
                        type: string
                      targetMarketplaces:
                        type: array
                        items:
                          type: string
                      targetCountries:
                        type: array
                        items:
                          type: string
                      fieldMapping:
                        type: object
                      counts:
                        type: object
        '400':
          description: Bad Request - Invalid CSV or payload
        '401':
          description: Unauthorized - Invalid or missing Bearer token
        '403':
          description: Forbidden - Token not authorized for this organization
        '413':
          description: Payload Too Large - CSV upload exceeds limit
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Bearer API key for server-to-server access. Session auth is also
        supported in first-party UI flows.

````