InSales
InSales module that allows you to communicate with the InSales API from node.js
Installation
npm install insales --save
Usage
// 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);
});
API limits
insales.getAccount({
token: 'token for shop',
url: 'shop-test.myinsales.ru'
}).then(output => {
console.info(output.callLimits); // { remaining: 498, current: 2, max: 500 } }
})
Methods
Account
Charge
createCharge
getCharge
listCharge
removeCharge
Collection
createCollection
editCollection
getCollection
listCollection
removeCollection
Coupon
createCoupon
editCoupon
getCoupon
listCoupon
removeCoupon
File
getFile
listFile
removeFile
uploadFile
JsTag
createJsTag
editJsTag
getJsTag
listJsTag
removeJsTag
Price Kind
createPriceKind
editPriceKind
getPriceKind
listPriceKind
removePriceKind
Product
createProduct
getProduct
listProduct
countProduct
Recurring
addRecurringFreeDays
createRecurring
getRecurring
removeRecurring
Token
Blog
createBlog
editBlog
getBlog
listBlog
removeBlog
Article
createArticle
editArticle
getArticle
listArticle
removeArticle
Page
createPage
editPage
getPage
listPage
removePage
Menu
createMenu
editMenu
getMenu
listMenu
removeMenu
Menu Item
createMenuItem
editMenuItem
getMenuItem
listMenuItem
removeMenuItem
Redirect
createRedirect
getRedirect
listRedirect
removeRedirect
Review
createReview
editReview
getReview
listReview
removeReview
Product Image
createProductImage
editProductImage
getProductImage
listProductImage
removeProductImage
Variant
createVariant
editVariant
editVariantGroup
getVariant
listVariant
removeVariant
Category
createCategory
editCategory
getCategory
listCategory
removeCategory
Property
createProperty
editProperty
getProperty
listProperty
removeProperty
Characteristic
createCharacteristic
editCharacteristic
getCharacteristic
listCharacteristic
removeCharacteristic
Option Name
createOptionName
editOptionName
getOptionName
listOptionName
removeOptionName
Option Value
createOptionValue
editOptionValue
getOptionValue
getOptionValueDestroyStatus
listAllOptionValue
listOptionValue
removeOptionValue
removeOptionValueImage
Similar
createSimilar
listSimilar
removeSimilar
Supplementary
createSupplementary
listSupplementary
removeSupplementary
Accessory
createAccessory
editAccessory
getAccessory
listAccessory
removeAccessory
Accessory Value
createAccessoryValue
editAccessoryValue
getAccessoryValue
listAccessoryValue
removeAccessoryValue
createAccessoryLink
listAccessoryLink
removeAccessoryLink
Collect
createCollect
editCollect
listCollect
removeCollect
Collection Filter
createCollectionFilter
editCollectionFilter
getCollectionFilter
listCollectionFilter
removeCollectionFilter
Collection Field
createCollectionField
editCollectionField
getCollectionField
listCollectionField
removeCollectionField
Collection Field Value
editCollectionFieldValue
getCollectionFieldValue
listCollectionFieldValue
Product Field
createProductField
editProductField
getProductField
listProductField
removeProductField
Product Field Value
createProductFieldValue
editProductFieldValue
getProductFieldValue
listProductFieldValue
removeProductFieldValue
Variant Field
createVariantField
editVariantField
getVariantField
listVariantField
removeVariantField
Variant Field Value
createVariantFieldValue
editVariantFieldValue
getVariantFieldValue
listVariantFieldValue
removeVariantFieldValue
Warehouse
createWarehouse
editWarehouse
getWarehouse
listWarehouse
removeWarehouse
Stock Currency
createStockCurrency
editStockCurrency
getStockCurrency
listStockCurrency
Unit
Sales Channel
createSalesChannel
getSalesChannel
listSalesChannel
removeSalesChannel
Order
countOrder
createOrder
editOrder
getOrder
listOrder
Custom Status
createCustomStatus
editCustomStatus
getCustomStatus
listCustomStatus
removeCustomStatus
External Discount
createExternalDiscount
editExternalDiscount
getExternalDiscount
listExternalDiscount
removeExternalDiscount
Client
createClient
editClient
getClient
listClient
removeClient
Client Group
createClientGroup
editClientGroup
getClientGroup
listClientGroup
removeClientGroup
Bonus Transaction
createBonusTransaction
getBonusTransaction
listBonusTransaction
listClientBonusTransaction
Field
createField
editField
getField
listField
removeField
Delivery Variant
createDeliveryVariant
editDeliveryVariant
getDeliveryVariant
listDeliveryVariant
removeDeliveryVariant
Payment Gateway
createPaymentGateway
editPaymentGateway
getPaymentGateway
listPaymentGateway
removePaymentGateway
Outlet
createOutlet
editOutlet
getOutlet
listOutlet
removeOutlet
Domain
createDomain
editDomain
getDomain
listDomain
removeDomain
User Task
createUserTask
editUserTask
getUserTask
listUserTask
removeUserTask
Marketplace
createMarketplace
editMarketplace
getMarketplace
listMarketplace
removeMarketplace
Application Action
createApplicationAction
editApplicationAction
getApplicationAction
listApplicationAction
removeApplicationAction
Application Widget
createApplicationWidget
editApplicationWidget
getApplicationWidget
listApplicationWidget
removeApplicationWidget
Webhook
createWebhook
editWebhook
getWebhook
listWebhook
removeWebhook
OAuth App
createOAuthApp
editOAuthApp
getOAuthApp
listOAuthApp
removeOAuthApp
Provider Token
TODO
Add other APIs

