curl --request PUT \
--url https://app.getswipe.in/api/partner/v2/vendor \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vendor_id": "123",
"name": "TATA RATAN"
}
'import requests
url = "https://app.getswipe.in/api/partner/v2/vendor"
payload = {
"vendor_id": "123",
"name": "TATA RATAN"
}
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({vendor_id: '123', name: 'TATA RATAN'})
};
fetch('https://app.getswipe.in/api/partner/v2/vendor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "",
"error_code": "",
"errors": {},
"data": {
"message": "No data found!"
}
}{
"success": true,
"message": "",
"error_code": "",
"errors": {},
"data": {
"message": "No data found!"
}
}{
"success": true,
"message": "",
"error_code": "",
"errors": {},
"data": {
"message": "No data found!"
}
}Update a vendor
Updates an existing vendor’s details. Changes propagate to the documents linked to this vendor.
curl --request PUT \
--url https://app.getswipe.in/api/partner/v2/vendor \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vendor_id": "123",
"name": "TATA RATAN"
}
'import requests
url = "https://app.getswipe.in/api/partner/v2/vendor"
payload = {
"vendor_id": "123",
"name": "TATA RATAN"
}
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({vendor_id: '123', name: 'TATA RATAN'})
};
fetch('https://app.getswipe.in/api/partner/v2/vendor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "",
"error_code": "",
"errors": {},
"data": {
"message": "No data found!"
}
}{
"success": true,
"message": "",
"error_code": "",
"errors": {},
"data": {
"message": "No data found!"
}
}{
"success": true,
"message": "",
"error_code": "",
"errors": {},
"data": {
"message": "No data found!"
}
}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
Your Vendor ID
"123"
Vendor name
"TATA RATAN"
Phone number
1234567890
Email address
"reddi@reddi.reddi"
Discount
10
GSTIN
^(|[0-9A-Z]{15})$"27AARCS7202C1ZD"
Company name
"GSTN"
Opening balance
"1245"
Credit limit
200
Show child attributes
Show child attributes
Credit[0] / Debit[1]
1
Dial code
"91"
Profile image URL
""
PAN
"ABCD1234F"
Notes
"Testing api"
CC email addresses
"reddi@reddi.reddi,acb.a@bcd.con"
Status
"Active"
List of tags
Vendor Custom Fields. Custom fields should already be added in Swipe Portal.
Show child attributes
Show child attributes
[
{
"label": "Custom Field 1",
"value": "Value 1"
}
]
Vendor visibility status: If the value is 1, the vendor will be visible to all branches; otherwise, it will only be visible in the main branch.
1

