curl --request PUT \
--url https://app.getswipe.in/api/partner/v1/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"
}
'import requests
url = "https://app.getswipe.in/api/partner/v1/product"
payload = {
"id": "ITEM123",
"name": "Item Name",
"quantity": 1,
"unit_price": 100,
"price_with_tax": 118,
"item_type": "Product"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'ITEM123',
name: 'Item Name',
quantity: 1,
unit_price: 100,
price_with_tax: 118,
item_type: 'Product'
})
};
fetch('https://app.getswipe.in/api/partner/v1/product', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Product added successfully"
}{
"success": false,
"error_code": "INVALID_PRODUCT_ID",
"message": "Error Message",
"errors": "List of errors"
}{
"success": false,
"error_code": "INVALID_PRODUCT_ID",
"message": "Error Message",
"errors": "List of errors"
}Update an item
v1 is deprecated — use the v2 endpoint instead. 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.
curl --request PUT \
--url https://app.getswipe.in/api/partner/v1/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"
}
'import requests
url = "https://app.getswipe.in/api/partner/v1/product"
payload = {
"id": "ITEM123",
"name": "Item Name",
"quantity": 1,
"unit_price": 100,
"price_with_tax": 118,
"item_type": "Product"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'ITEM123',
name: 'Item Name',
quantity: 1,
unit_price: 100,
price_with_tax: 118,
item_type: 'Product'
})
};
fetch('https://app.getswipe.in/api/partner/v1/product', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Product added successfully"
}{
"success": false,
"error_code": "INVALID_PRODUCT_ID",
"message": "Error Message",
"errors": "List of errors"
}{
"success": false,
"error_code": "INVALID_PRODUCT_ID",
"message": "Error Message",
"errors": "List of errors"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is an API key from the API Integration section of your dashboard. Keys are scoped to the company they are generated in — for testing, add a separate test company and generate the key there, so requests never touch your real books.
Body
Unique id for each item.
"ITEM123"
Name of the Product
"Item Name"
Opening Quantity
1
Price per item without Tax
100
Price per item with Tax
118
Product or Service enum
"Product"
Tax percentage for each item . Only valid tax rates are accepted
18
Default Discount Percent
10
Item Description
"Item Description"
HSN Code
"1234"
Item quantity unit. You can find the GST-approved units in the UQC Codes section at: https://einvoice1.gst.gov.in/Others/MasterCodes.
"kg"
Category
"Electronics"
Status of the Item
"Active"

