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

# Batch import products

> Import up to 100 products in a single request.

Each product is upserted individually — existing products (matched
by external_id) are updated, new ones are created.



## OpenAPI

````yaml /api-reference/openapi.json post /api/knowledge/products/batch
openapi: 3.1.0
info:
  title: Big Panda — Public API
  description: >-
    Externe REST-API für Connector-Plugins (JTL, Shopware), n8n-Integrationen
    und Custom-Clients. Tenant-Routing über Subdomain, Auth über Bearer-Token.
  version: 0.1.0
servers:
  - url: https://{tenant}.app.big-panda.ai
    description: Big Panda — Tenant-Subdomain. Ersetze {tenant} durch deinen Tenant-Slug.
    variables:
      tenant:
        default: demo
        description: Dein Big-Panda-Tenant-Slug (z.B. 'acme').
security:
  - BearerAuth: []
tags:
  - name: Products
  - name: Knowledge Entries
  - name: Categories
  - name: Sites
  - name: Search
  - name: OAuth
    description: >-
      OAuth-2.1-Authentifizierung — Discovery, Dynamic Client Registration,
      Authorize, Token, Revoke.
paths:
  /api/knowledge/products/batch:
    post:
      tags:
        - Products
      summary: Batch import products
      description: |-
        Import up to 100 products in a single request.

        Each product is upserted individually — existing products (matched
        by external_id) are updated, new ones are created.
      operationId: batch_import_products_batch_post
      parameters:
        - name: site_id
          in: query
          required: true
          schema:
            type: string
            description: Site to push products to (UUID or slug)
            title: Site Id
          description: Site to push products to (UUID or slug)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductBatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductBatchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ProductBatchRequest:
      properties:
        products:
          items:
            $ref: '#/components/schemas/ProductCreate'
          type: array
          maxItems: 100
          minItems: 1
          title: Products
          description: Up to 100 products per batch request
      type: object
      required:
        - products
      title: ProductBatchRequest
      description: 'Batch import: multiple products in one request.'
    ProductBatchResponse:
      properties:
        created:
          type: integer
          title: Created
        updated:
          type: integer
          title: Updated
        errors:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Errors
        products:
          items:
            $ref: '#/components/schemas/ProductBatchItem'
          type: array
          title: Products
      type: object
      required:
        - created
        - updated
      title: ProductBatchResponse
      description: Result of a batch import.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProductCreate:
      properties:
        external_id:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: External Id
        title:
          type: string
          minLength: 1
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        short_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Description
        sku:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Sku
        gtin:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Gtin
          description: GTIN/EAN barcode
        brand:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Brand
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
        properties:
          additionalProperties: true
          type: object
          title: Properties
        price_current:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Price Current
        price_msrp:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Price Msrp
        price_special:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Price Special
        price_on_request:
          type: boolean
          title: Price On Request
          default: false
        currency:
          type: string
          maxLength: 3
          title: Currency
          default: EUR
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        additional_images:
          items:
            type: string
          type: array
          title: Additional Images
        product_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Url
        availability:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Availability
        rating_average:
          anyOf:
            - type: number
              maximum: 5
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Rating Average
        rating_count:
          type: integer
          minimum: 0
          title: Rating Count
          default: 0
        language:
          type: string
          maxLength: 5
          minLength: 2
          title: Language
        parent_external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent External Id
          description: external_id of the parent product (for variants)
        is_variant:
          type: boolean
          title: Is Variant
          description: True for concrete variants (children of a parent).
          default: false
        is_parent:
          type: boolean
          title: Is Parent
          description: >-
            True for abstract parent/master products that have variant children.
            Excluded from search when the tenant runs with
            variant_strategy=children_only.
          default: false
        similarity_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Similarity Text
          description: >-
            Anchor text for the centroid_similar.py 'find related' path.
            Connector typically composes this from a small, stable set of
            attributes (e.g. perfume: 'Duft + Saison').
        search_keywords:
          items:
            type: string
          type: array
          title: Search Keywords
          description: >-
            Alternative spellings / synonyms / JTL-Suchbegriffe. Boosts
            BM25-matches without affecting semantic search.
        embedding_text_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Embedding Text Description
          description: >-
            Pre-assembled text for description embedding. If omitted, generated
            from title + description.
        embedding_text_properties:
          anyOf:
            - type: string
            - type: 'null'
          title: Embedding Text Properties
          description: >-
            Pre-assembled text for properties embedding. If omitted, generated
            from title + properties.
        embedding_text_attributes:
          anyOf:
            - type: string
            - type: 'null'
          title: Embedding Text Attributes
          description: >-
            Pre-assembled text for attributes embedding. If omitted, generated
            from title + attributes.
        sync_hash:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Sync Hash
          description: >-
            Hash of the source data. If unchanged from last sync, skip
            re-embedding.
      type: object
      required:
        - title
        - language
      title: ProductCreate
      description: |-
        Payload for creating/upserting a product.

        If external_id is provided and already exists for this site,
        the product is updated (upsert). Otherwise a new product is created.

        Embedding texts are optional — if provided, they are used directly
        for embedding generation. If omitted, the system generates them
        from title + description/properties/attributes.
    ProductBatchItem:
      properties:
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        id:
          type: string
          title: Id
      type: object
      required:
        - external_id
        - id
      title: ProductBatchItem
      description: One product's ID mapping in a batch response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API-Token aus dem Big-Panda-Admin-UI unter Einstellungen → API-Keys.
        Header: `Authorization: Bearer <token>`.

````