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

# Bulk Upsert Inventories

> Updates inventory for up to 100 products in one call. Each item identifies the product by product_id or product_reference_id and must include inventory_status (IN_STOCK, OUT_OF_STOCK, BACK_ORDER).



## OpenAPI

````yaml post /v1/inventories/bulk
openapi: 3.1.0
info:
  description: Client-facing Open APIs for WizCommerce
  title: WizCommerce Open API's
  termsOfService: https://wizcommerce.com/terms/
  contact:
    name: Tech Support
    url: https://help.wizcommerce.com/
    email: tech@wizcommerce.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: '1.0'
servers:
  - url: https://api.wizcommerce.com
    description: Production BaseURL
  - url: https://api-staging.sourcerer.tech
    description: Staging BaseURL
security: []
paths:
  /v1/inventories/bulk:
    post:
      tags:
        - Inventory
      summary: Bulk Upsert Inventories
      description: >-
        Updates inventory for up to 100 products in one call. Each item
        identifies the product by product_id or product_reference_id and must
        include inventory_status (IN_STOCK, OUT_OF_STOCK, BACK_ORDER).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bulkdto.BulkInventoryRequest'
        description: 1-100 items; body must not exceed 10 MiB
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bulkdto.BulkInventoryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '413':
          description: Request Entity Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    bulkdto.BulkInventoryRequest:
      type: object
      required:
        - data
      properties:
        data:
          description: 1-100 inventory rows. Body must not exceed 10 MiB.
          type: array
          maxItems: 100
          minItems: 1
          items:
            $ref: '#/components/schemas/bulkdto.BulkInventory'
    bulkdto.BulkInventoryResponse:
      type: object
      properties:
        data:
          description: One entry per written inventory row, in request order.
          type: array
          items:
            $ref: '#/components/schemas/bulkdto.BulkInventoryResult'
    errors.HttpError:
      type: object
      properties:
        code:
          type: string
          x-order: '1'
        message:
          type: string
          x-order: '2'
        details:
          type: array
          items:
            $ref: '#/components/schemas/errors.HttpErrorDetails'
          x-order: '3'
    bulkdto.BulkInventory:
      type: object
      required:
        - inventory_status
      properties:
        product_id:
          description: Variant id. Either product_id or product_reference_id is required.
          type: string
          x-order: '1'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        product_reference_id:
          description: >-
            Variant reference id. Either product_id or product_reference_id is
            required.
          type: string
          x-order: '2'
          example: CUSH-RED-18
        sku:
          description: Max 255 characters.
          type: string
          x-order: '3'
          example: CUSH-RED-18
        inventory_status:
          type: string
          enum:
            - IN_STOCK
            - OUT_OF_STOCK
            - BACK_ORDER
          x-order: '4'
          example: IN_STOCK
        available_quantity:
          description: Quantities must be >= 0.
          type: integer
          x-order: '5'
          example: 120
        reserved_quantity:
          type: integer
          x-order: '6'
          example: 5
        in_stock_quantity:
          type: integer
          x-order: '7'
          example: 125
        back_order_quantity:
          type: integer
          x-order: '8'
          example: 0
        back_order_allowed:
          type: boolean
          x-order: '9'
          example: false
        out_of_stock_threshold:
          type: integer
          x-order: '10'
          example: 10
        track_inventory:
          type: boolean
          x-order: '11'
          example: true
        on_order_details:
          type: array
          items:
            $ref: '#/components/schemas/bulkdto.BulkInventoryDetail'
          x-order: '12'
        in_transit_details:
          type: array
          items:
            $ref: '#/components/schemas/bulkdto.BulkInventoryDetail'
          x-order: '13'
        dynamic_details:
          description: A JSON object, sent as a string.
          type: string
          x-order: '14'
          example: '{"warehouse":"SF-1"}'
        notes:
          type: string
          x-order: '15'
          example: Restock expected in December
    bulkdto.BulkInventoryResult:
      type: object
      properties:
        id:
          description: Inventory row id.
          type: string
          x-order: '1'
          example: 4a5b6c7d-8e9f-4a0b-b1c2-d3e4f5a6b7c8
        product_id:
          type: string
          x-order: '2'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        product_reference_id:
          type: string
          x-order: '3'
          example: CUSH-RED-18
        sku:
          type: string
          x-order: '4'
          example: CUSH-RED-18
        action:
          type: string
          enum:
            - create
            - update
          x-order: '5'
          example: update
    errors.HttpErrorDetails:
      type: object
      properties:
        field:
          type: string
          x-order: '1'
        reason:
          type: string
          x-order: '2'
    bulkdto.BulkInventoryDetail:
      type: object
      required:
        - date
        - quantity
      properties:
        quantity:
          type: integer
          x-order: '1'
          example: 50
        date:
          type: string
          x-order: '2'
          example: '2026-12-01'
        identifier:
          type: string
          x-order: '3'
          example: PO-4471
  securitySchemes:
    ApiKeyAuth:
      description: API Key for authentication
      type: apiKey
      name: X-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.