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

# Bulk Update Inventory

> API to bulk update inventory fields (availableQuantity, continueSellingOutOfStock, trackInventory) for multiple prices



## OpenAPI

````yaml /api-reference/products/openapi.json post /products/bulk-update/inventory
openapi: 3.0.0
info:
  title: Products API
  description: Documentation for products API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Products
    description: Documentation for products API
  - name: Prices
    description: Documentation for products API
  - name: Store
    description: Documentation for products API
  - name: Collections
    description: Documentation for products API
  - name: Reviews
    description: Documentation for products API
paths:
  /products/bulk-update/inventory:
    post:
      tags:
        - Products
      summary: Bulk Update Inventory
      description: >-
        API to bulk update inventory fields (availableQuantity,
        continueSellingOutOfStock, trackInventory) for multiple prices
      operationId: updateInventory
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InventoryUpdateDto'
      responses:
        '201':
          description: Inventory updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryUpdateResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - Location-Access: []
components:
  schemas:
    InventoryUpdateDto:
      type: object
      properties:
        altId:
          type: string
          description: Location Id or Agency Id
          example: 6578278e879ad2646715ba9c
        altType:
          type: string
          enum:
            - location
        priceIds:
          example:
            - 5f8d0d55b54764421b7156c1
            - 5f8d0d55b54764421b7156c2
          description: Array of price IDs to update
          type: array
          items:
            type: string
        availableQuantity:
          $ref: '#/components/schemas/InventoryQuantityUpdateField'
        allowOutOfStockPurchases:
          type: boolean
          description: Continue selling when out of stock
        trackInventory:
          type: boolean
          description: Track inventory for this product
      required:
        - altId
        - altType
        - priceIds
    InventoryUpdateResponseDto:
      type: object
      properties:
        status:
          type: boolean
          description: Status of api action
          example: true
        message:
          type: string
          description: Success message
          example: Successfully created
        updatedCount:
          type: number
          example: 25
          description: Number of prices updated
        fieldsUpdated:
          example:
            - availableQuantity
            - trackInventory
          description: Fields that were updated
          type: array
          items:
            type: string
      required:
        - status
        - updatedCount
        - fieldsUpdated
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error
    InventoryQuantityUpdateField:
      type: object
      properties:
        type:
          type: string
          enum:
            - ADD_QUANTITY
            - SET_QUANTITY
          description: Type of inventory quantity update
          example: ADD_QUANTITY
        value:
          type: number
          example: 50
          description: Quantity value to add or set based on type
          minimum: 0
      required:
        - type
        - value

````