Update inventory stock
curl --request POST \
--url https://app.getswipe.in/api/partner/v2/inventory/stock \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "123456",
"quantity": 1,
"warehouse_id": -1,
"action": "in"
}
'import requests
url = "https://app.getswipe.in/api/partner/v2/inventory/stock"
payload = {
"product_id": "123456",
"quantity": 1,
"warehouse_id": -1,
"action": "in"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: '123456', quantity: 1, warehouse_id: -1, action: 'in'})
};
fetch('https://app.getswipe.in/api/partner/v2/inventory/stock', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": false,
"errors": {},
"error_code": "",
"message": ""
}{
"success": false,
"errors": {},
"error_code": "",
"message": ""
}{
"success": false,
"errors": {},
"error_code": "",
"message": ""
}Inventory
Update inventory stock
Records a manual stock movement for a product — in adds stock, out removes it. Use warehouse_id -1 for the default warehouse and record_date to backdate the movement. Sales and purchase documents also move stock automatically.
POST
/
v2
/
inventory
/
stock
Update inventory stock
curl --request POST \
--url https://app.getswipe.in/api/partner/v2/inventory/stock \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "123456",
"quantity": 1,
"warehouse_id": -1,
"action": "in"
}
'import requests
url = "https://app.getswipe.in/api/partner/v2/inventory/stock"
payload = {
"product_id": "123456",
"quantity": 1,
"warehouse_id": -1,
"action": "in"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: '123456', quantity: 1, warehouse_id: -1, action: 'in'})
};
fetch('https://app.getswipe.in/api/partner/v2/inventory/stock', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": false,
"errors": {},
"error_code": "",
"message": ""
}{
"success": false,
"errors": {},
"error_code": "",
"message": ""
}{
"success": false,
"errors": {},
"error_code": "",
"message": ""
}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
application/json
Product ID
Example:
"123456"
Opening Quantity
Example:
1
Warehouse ID
Example:
-1
Stock in or stock out
Available options:
in, out Example:
"in"
Remarks
Example:
"Remarks"
Record Date (DD-MM-YYYY)
Example:
"06-05-2025"

