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

# Bulk upsert products

> Create or update many products in Retailgrid in a single request, ideal for syncing large product catalogs from external systems.



## OpenAPI

````yaml POST /v1/products/bulk
openapi: 3.1.0
info:
  title: Retailgrid Public API
  version: v1
servers: []
security: []
paths:
  /v1/products/bulk:
    post:
      tags:
        - products
      summary: Bulk Upsert Products
      operationId: bulk_upsert_products_v1_products_bulk_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductBulkRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ProductBulkRequest:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ProductBulkItem'
          type: array
          title: Items
      additionalProperties: false
      type: object
      title: ProductBulkRequest
    BulkResponse:
      properties:
        results:
          items:
            oneOf:
              - $ref: '#/components/schemas/BulkItemSuccess'
              - $ref: '#/components/schemas/BulkItemError'
            discriminator:
              propertyName: ok
              mapping:
                'False':
                  $ref: '#/components/schemas/BulkItemError'
                'True':
                  $ref: '#/components/schemas/BulkItemSuccess'
          type: array
          title: Results
      additionalProperties: false
      type: object
      title: BulkResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProductBulkItem:
      properties:
        product_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Id
        product_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Name
        product_group:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Group
        manufacturer:
          anyOf:
            - type: string
            - type: 'null'
          title: Manufacturer
        brand:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        product_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Type
        barcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Barcode
        stock_on_hand:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Stock On Hand
        category_1:
          anyOf:
            - type: string
            - type: 'null'
          title: Category 1
        category_2:
          anyOf:
            - type: string
            - type: 'null'
          title: Category 2
        category_3:
          anyOf:
            - type: string
            - type: 'null'
          title: Category 3
        category_4:
          anyOf:
            - type: string
            - type: 'null'
          title: Category 4
        category_5:
          anyOf:
            - type: string
            - type: 'null'
          title: Category 5
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        product_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Url
        rrp:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Rrp
        regular_price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Regular Price
        product_created_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Product Created Date
        price_effective_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Price Effective Date
        cost_effective_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Cost Effective Date
        size:
          anyOf:
            - type: string
            - type: 'null'
          title: Size
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
        uom:
          anyOf:
            - type: string
            - type: 'null'
          title: Uom
        tax_rate:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Tax Rate
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Id
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
        sku_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku Name
        current_price:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Current Price
        unit_cost:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Unit Cost
      additionalProperties: false
      type: object
      title: ProductBulkItem
    BulkItemSuccess:
      properties:
        index:
          type: integer
          title: Index
        ok:
          type: boolean
          const: true
          title: Ok
        id:
          anyOf:
            - type: string
              format: uuid
            - type: integer
          title: Id
      additionalProperties: false
      type: object
      required:
        - index
        - ok
        - id
      title: BulkItemSuccess
    BulkItemError:
      properties:
        index:
          type: integer
          title: Index
        ok:
          type: boolean
          const: false
          title: Ok
        code:
          type: string
          enum:
            - validation_error
            - conflict
          title: Code
        message:
          type: string
          title: Message
      additionalProperties: false
      type: object
      required:
        - index
        - ok
        - code
        - message
      title: BulkItemError
    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

````