A complete NodeJS wrapper for the Sellix.io API.
The purpose of this wrapper is to easily implement the Sellix API into your project and retrieve realtime data about your shop, restock and modify your products, view and reply to queries, and more.
In order to use the API calls, you need your API Key from the Sellix.io website. Find your key on the security page.
npm i sellix-api-wrapper
const Sellix = require('sellix-api-wrapper');
const API = new Sellix.API('YOUR_API_KEY')
API.getAllOrders().then(res=>{
console.log(res);
});
API.createCoupon("COUPON15OFF",15,-1,{"69571749194","695317319"}).then(res=>{
console.log(res);
});
API.editProduct("demo65ab9133",{"Serials":["L1IELQ5","39131031"]}).then(res=>{
console.log(res);
});
Fetches all orders sorted by creation date.
Fetches a specific order by ID.
Fetches all products sorted by creation date.
Fetches a specific product by ID.
Creates a product with the given fields. Use fields to declare non-required fields.
See Sellix Documentation on Product Fields
API.createProduct("Product Title","New Product Desc",10.99,["STRIPE","BITCOIN"],"serials",0.0,{"crypto_confirmations_needed":2,"delivery_text":"Enjoy your product"}).then(res=>{
console.log(res);
});
Edits a specific product by ID. Use fields to declare the fields to edit.
See Sellix Documentation on Product Fields
API.editProduct("95619023",{"Title":"New Title","Price":25.99,"Serials":["AU9103PQE","GQOU3QLWE"]}).then(res=>{
console.log(res);
})
Deletes a specific product by ID.
Fetches all queries sorted by creation date.
Fetches a specific query by ID.
Replies to a specific query by ID.
API.replyQuery("demo2ab29431","Have you tried reinstalling?").then(res=>{
console.log(res);
});
Closes a specific query by ID.
Reopens a specific query by ID.
Fetches all coupons sorted by creation date.
Fetches a specific coupon by ID.
Creates a coupon with the given fields.
API.createCoupon("COUPON15",15,-1,{"695841804","695841805"}).then(res=>{
console.log(res);
});
Edits a coupon by ID. Use fields to declare the fields to edit.
See Sellix Documentation on Coupon Fields
API.editCoupon("demo6a3b178",{"code":"COUPON5","discount_value":5,"max_uses":5}).then(res=>{
console.log(res);
});
Deletes a specific coupon by ID.
Fetches all feedback sorted by creation date.
Fetches a specific feedback by ID.
Replies to a specific feedback by ID.
API.replyFeedback("demo1a83b7","Thanks for the feedback!").then(res=>{
console.log(res);
});
Fetches all blacklist sorted by creation date.
Fetches a specific blacklist by ID.
Creates a blacklist using the given fields. Type must be 'email', 'ip', or 'country'. Data is blocked data. Note is optional.
API.createBlacklist("email","demoCustomer@gmail.com","Banned from shop").then(res=>{
console.log(res);
});
Updates a specific blacklist by ID. See above for fields.
API.updateBlacklist("demo6abc1f4","ip","273.314.1.31").then(res=>{
console.log(res);
});
Deletes a specific blacklist by ID.
Creates a payment with the given fields. Use custom_fields to declare non-required fields.
Visit Sellix Documentation on Creating Payments
Deletes a payment by id.