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: application/json' \
  --data '
{
  "id": "ITEM123",
  "name": "Item Name",
  "quantity": 1,
  "unit_price": 100,
  "price_with_tax": 118,
  "item_type": "Product",
  "tax_rate": 18,
  "purchase_price_with_tax": 118,
  "description": "Item Description",
  "hsn_code": "1234",
  "unit": "kg",
  "cess_rate": 0,
  "cess_amount": 0,
  "barcode": "2273546838467",
  "category": "Electronics",
  "custom_columns": [
    {
      "label": "Custom Label",
      "value": "Custom Value"
    }
  ],
  "alternative_units": [
    {
      "alternative_unit": "g",
      "conversion_rate": 1000
    }
  ],
  "preferences": {
    "not_for_sale": false,
    "low_stock_alert": 0,
    "show_online": false,
    "discount_percent": 10
  },
  "visibility": 1
}
'
{
  "success": true,
  "message": "Message",
  "error_code": "",
  "errors": {},
  "data": {
    "message": "No data found!"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
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
object[]

Custom Fields

Example:
[
{
"label": "Custom Label",
"value": "Custom Value"
}
]
alternative_units
object[]

Alternative Units

Example:
[
{
"alternative_unit": "g",
"conversion_rate": 1000
}
]
preferences
object

Product Preferences

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

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