> ## 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 Edit Products and Prices

> API to bulk edit products and their associated prices (max 30 entities)



## OpenAPI

````yaml /api-reference/products/openapi.json post /products/bulk-update/edit
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/edit:
    post:
      tags:
        - Products
      summary: Bulk Edit Products and Prices
      description: API to bulk edit products and their associated prices (max 30 entities)
      operationId: bulkEdit
      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/BulkEditRequestDto'
      responses:
        '201':
          description: Products and prices updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkEditResponseDto'
        '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'
components:
  schemas:
    BulkEditRequestDto:
      type: object
      properties:
        altId:
          type: string
          description: Location Id or Agency Id
          example: 6578278e879ad2646715ba9c
        altType:
          type: string
          enum:
            - location
        products:
          description: >-
            Array of products to update. Note: The total count includes all
            prices within each product.
          type: array
          items:
            $ref: '#/components/schemas/BulkEditProductDto'
      required:
        - altId
        - altType
        - products
    BulkEditResponseDto:
      type: object
      properties:
        message:
          type: string
          example: Products updated successfully
          description: Success message
        status:
          type: boolean
          example: true
          description: Operation status
        updatedCount:
          type: number
          example: 5
          description: Number of products updated
      required:
        - message
        - status
        - updatedCount
    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
    BulkEditProductDto:
      type: object
      properties:
        _id:
          type: string
          description: Product ID
          example: 64a1b2c3d4e5f67890123456
        name:
          type: string
          description: Product name
          example: Premium Product
        description:
          type: string
          description: Product description
          example: >-
            A high-quality premium product with excellent features and
            durability
        image:
          type: string
          description: Product image
          example: https://example.com/product-image.jpg
        availableInStore:
          type: boolean
          description: Product availability in store
          example: true
        prices:
          description: Array of price variants for the product
          type: array
          items:
            $ref: '#/components/schemas/BulkEditPriceDto'
        collectionIds:
          description: Collection IDs
          example:
            - 64a1b2c3d4e5f67890123458
            - 64a1b2c3d4e5f67890123459
          type: array
          items:
            type: string
        isLabelEnabled:
          type: boolean
          description: Enable product label
          example: true
        isTaxesEnabled:
          type: boolean
          description: Enable taxes
          example: true
        seo:
          $ref: '#/components/schemas/ProductSEODto'
        slug:
          type: string
          description: Product URL slug
          example: premium-product
        automaticTaxCategoryId:
          type: string
          description: Automatic tax category ID
          example: 64a1b2c3d4e5f67890123460
        taxInclusive:
          type: boolean
          description: Tax inclusive pricing
          example: false
        taxes:
          description: Product taxes
          type: array
          items:
            type: object
        medias:
          description: Product media
          type: array
          items:
            type: object
        label:
          type: object
          description: Product label
      required:
        - _id
    BulkEditPriceDto:
      type: object
      properties:
        _id:
          type: string
          description: Price ID
          example: 64a1b2c3d4e5f67890123456
        name:
          type: string
          description: Price name
          example: Standard Plan
        amount:
          type: number
          description: Price amount
          example: 99.99
        currency:
          type: string
          description: Price currency
          example: USD
        compareAtPrice:
          type: number
          description: Compare at price
          example: 129.99
        availableQuantity:
          type: number
          description: Available quantity
          example: 100
        trackInventory:
          type: boolean
          description: Track inventory
          example: true
        allowOutOfStockPurchases:
          type: boolean
          description: Allow out of stock purchases
          example: false
        sku:
          type: string
          description: SKU
          example: SKU-001
        trialPeriod:
          type: number
          description: Trial period in days
          example: 7
        totalCycles:
          type: number
          description: Total billing cycles
          example: 12
        setupFee:
          type: number
          description: Setup fee
          example: 25
        shippingOptions:
          $ref: '#/components/schemas/ShippingOptionsDto'
        recurring:
          $ref: '#/components/schemas/RecurringDto'
      required:
        - _id
    ProductSEODto:
      type: object
      properties:
        title:
          type: string
          description: SEO title
          example: Best Product - Buy Now
        description:
          type: string
          description: SEO description
          example: >-
            This is the best product you can buy online with amazing features
            and great value
    ShippingOptionsDto:
      type: object
      properties:
        weight:
          $ref: '#/components/schemas/WeightOptionsDto'
        dimensions:
          $ref: '#/components/schemas/PriceDimensionsDto'
    RecurringDto:
      type: object
      properties:
        interval:
          type: string
          description: The interval at which the recurring event occurs.
          example: day
          enum:
            - day
            - month
            - week
            - year
        intervalCount:
          type: number
          description: The number of intervals between each occurrence of the event.
          example: 1
      required:
        - interval
        - intervalCount
    WeightOptionsDto:
      type: object
      properties:
        value:
          type: number
          description: Actual weight of the product
          example: 10
        unit:
          type: string
          description: Weight unit of the product
          example: kg
          enum:
            - kg
            - lb
            - g
            - oz
      required:
        - value
        - unit
    PriceDimensionsDto:
      type: object
      properties:
        height:
          type: number
          description: Height of the price
          example: 10
        width:
          type: number
          description: Width of the price
          example: 10
        length:
          type: number
          description: Length of the price
          example: 10
        unit:
          type: string
          description: Unit of the price dimensions
          example: cm
          enum:
            - cm
            - in
            - m
      required:
        - height
        - width
        - length
        - unit

````