Skip to main content
PUT
/
v2
/
product
Update an Item
curl --request PUT \
  --url https://app.getswipe.in/api/partner/v2/product \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form id=ITEM123 \
  --form 'name=Updated Product Name' \
  --form item_type=Product \
  --form quantity=15 \
  --form unit_price=120 \
  --form tax_rate=18 \
  --form price_with_tax=141.6 \
  --form 'description=Updated product description' \
  --form 'custom_columns=[{"label":"Updated Label","value":"Updated Value"}]' \
  --form 'product_images[0]=<binary_image_file_1>' \
  --form 'product_images[1]=<binary_image_file_2>' \
  --form product_images.items='@example-file'
{
  "success": true,
  "message": "Message",
  "error_code": "",
  "errors": {},
  "data": {
    "message": "No data found!"
  }
}
Uploading Product ImagesTo 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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Body

Product/Item object for form data requests. Use this format when uploading product images.

id
string
required

Unique id for each item.

Example:

"ITEM123"

name
string
required

Name of the Product

Example:

"Item Name"

quantity
number
required

Opening Quantity

Example:

1

unit_price
number
required

Price per item without Tax

Example:

100

price_with_tax
number
required

Price per item with Tax

Example:

118

item_type
enum<string>
required

Product or Service enum

Available options:
Product,
Service
Example:

"Product"

tax_rate
number

Tax percentage for each item . Only valid tax rates are accepted

Example:

18

purchase_price_with_tax
number

Purchase Price per item with Tax

Example:

118

description
string

Item Description

Example:

"Item Description"

hsn_code
string

HSN Code

Example:

"1234"

unit
string

Item quantity unit. You can find the GST-approved units in the UQC Codes section at: https://einvoice1.gst.gov.in/Others/MasterCodes.

Example:

"kg"

cess_rate
number
default:0

Cess Percent of the Item

Required range: x <= 100
Example:

0

cess_amount
number
default:0

Cess Amount of the Item

Example:

0

barcode
string

Barcode

Example:

"2273546838467"

category
string

Category

Example:

"Electronics"

custom_columns
string

Custom Fields as JSON string for form data. Example - [{"label":"Custom Label","value":"Custom Value"}]

Example:

"[{\"label\":\"Custom Label\",\"value\":\"Custom Value\"}]"

alternative_units
string

Alternative Units as JSON string for form data. Example - [{"alternative_unit":"g","conversion_rate":1000}]

Example:

"[{\"alternative_unit\":\"g\",\"conversion_rate\":1000}]"

preferences
string

Product Preferences as JSON string for form data. Example - {"not_for_sale":false}

Example:

"{\"not_for_sale\":false}"

visibility
integer

If set to 1, the product will be visible to all branches. If set to 0, the product will be visible only to the branch it was created in.

Example:

1

product_images
file[]

Product images to upload. Each image should be sent as a file in the form data.

Image file (JPEG, PNG, etc.)

Response

Success

success
boolean

Success flag

Example:

true

message
string

Response message

Example:

"Message"

error_code
string

Error Code

Example:

""

errors
object

Errors

data
object