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

# Update an item

> Updates an item's master record in the catalog. This is the only way to change catalog details — item fields sent inside a document apply to that document only.

<Note>
  **Uploading Product Images**

  To upload or update product images, use `multipart/form-data` instead of `application/json`. All the regular JSON fields are supported as form fields, plus:

  * `product_images`: Array of image files (JPEG, PNG, etc.)
  * For complex fields like `custom_columns`, `alternative_units`, and `preferences`, send them as JSON strings
</Note>


## OpenAPI

````yaml put /v2/product
openapi: 3.0.1
info:
  title: SwipeAPI
  version: '2.0'
  description: >-
    The Swipe Partner API — invoicing, payments, and GST compliance for your
    application. Create GST invoices and other documents, manage customers,
    vendors, products and inventory, record payments, and generate e-invoices
    and e-way bills.


    - Docs & guides: https://developers.getswipe.in

    - Quickstart: https://developers.getswipe.in/quickstart

    - Rate limit: 1 request/second per API key

    - All dates are DD-MM-YYYY
servers:
  - url: https://app.getswipe.in/api/partner
security:
  - bearerAuth: []
paths:
  /v2/product:
    put:
      tags:
        - Product V2
      summary: Update an item
      description: >-
        Updates an item's master record in the catalog. This is the only way to
        change catalog details — item fields sent inside a document apply to
        that document only.
      operationId: put_product
      parameters:
        - name: id
          in: query
          description: Unique id for each item
          required: true
          schema:
            type: string
        - name: name
          in: query
          description: Name of the Product
          required: true
          schema:
            type: string
        - name: quantity
          in: query
          description: Opening Quantity
          required: true
          schema:
            type: number
        - name: unit_price
          in: query
          description: Price per item without Tax
          required: true
          schema:
            type: number
        - name: tax_rate
          in: query
          description: Tax percentage for each item
          schema:
            type: number
        - name: price_with_tax
          in: query
          description: Price per item with Tax
          required: true
          schema:
            type: number
        - name: purchase_price_with_tax
          in: query
          description: Purchase Price per item with Tax
          schema:
            type: number
        - name: description
          in: query
          description: Item Description
          schema:
            type: string
        - name: hsn_code
          in: query
          description: HSN Code
          schema:
            type: string
        - name: item_type
          in: query
          description: Product or Service enum
          required: true
          schema:
            type: string
        - name: unit
          in: query
          description: Item quantity unit
          schema:
            type: string
        - name: cess_rate
          in: query
          description: Cess Percent of the Item
          schema:
            type: number
        - name: cess_amount
          in: query
          description: Cess Amount of the Item
          schema:
            type: number
        - name: barcode
          in: query
          description: Barcode
          schema:
            type: string
        - name: category
          in: query
          description: Category
          schema:
            type: string
        - name: alternative_units
          in: query
          description: JSON string of alternative units
          schema:
            type: string
        - name: custom_columns
          in: query
          description: JSON string of custom fields
          schema:
            type: string
        - name: preferences
          in: query
          description: JSON string of product preferences
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                product_images:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: Product images (multiple files supported)
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponseV2'
        '400':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponseV2'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponseV2'
components:
  schemas:
    ProductResponseV2:
      properties:
        success:
          type: boolean
          description: Success flag
          example: true
        message:
          type: string
          description: Response message
          example: Message
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          description: Errors
        data:
          $ref: '#/components/schemas/EmptyData'
      type: object
    EmptyData:
      properties:
        message:
          type: string
          description: Response message
          example: No data found!
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is an API key from the [API
        Integration](https://app.getswipe.in/user?tab=api_integration) section
        of your dashboard. Keys are scoped to the company they are generated in
        — for testing, [add a separate test
        company](https://community.getswipe.in/t/how-to-add-new-company-on-web/1191)
        and generate the key there, so requests never touch your real books.

````