InSales module that allows you to communicate with the InSales API from node.js
npm install insales --save
// Import a module
import InSales from 'insales';
// Create an instance with your API credentials
const insales = InSales({
id: 'your app id',
secret: 'your app secret'
});
// Get things done
insales.getAccount({
token: 'token for shop',
url: 'shop-test.myinsales.ru'
}).then(output => {
console.info(output.data);
}).catch(err => {
console.error(err);
});
insales.getAccount({
token: 'token for shop',
url: 'shop-test.myinsales.ru'
}).then(output => {
console.info(output.callLimits); // { remaining: 498, current: 2, max: 500 } }
})
createCharge
getCharge
listCharge
removeCharge
createCoupon
editCoupon
getCoupon
listCoupon
removeCoupon
createFile
getFile
removeFile
uploadFile
createPriceKind
editPriceKind
getPriceKind
listPriceKind
removePriceKind
createProduct
getProduct
listProduct
createRecurring
getRecurring
removeRecurring
Add other APIs