Groups

All endpoints related to Groups

Supported Endpoints

  • getAllGroups(): Returns a list of all the groups created.

  • getGroup(id): Retrieves a group by the entered ID.

  • createGroup(type, data, description): Creates a group and returns the created group.

  • updateGroup(id, type, data, description): Updates a group by the entered ID.

  • deleteGroup(id): Deletes a group by the entered ID.

  • addProductToGroup(id): Add a product to a group.

  • removeProductInGroup(id): Remove a product from a group.

  • getProductInGroup(id): Get product in a group.


getAllGroups()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.groups.getAllGroups().then((res) => {
    console.log(res)
});

getGroup()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.groups.getGroup("666").then((res) => {
    console.log(res)
})


createGroup()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.groups.createGroup({
    "title":"Rat race",
    "order":1,
    "unlisted":false
}).then((res) => {
    console.log(res);
});

updateGroup()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.groups.updateGroup("666", {
    "title":"Rat race",
    "order": 1,
    "unlisted": true
}).then((res) => {
    console.log(res); 
});

deleteGroup()

Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.groups.deleteGroup("666").then((res) => {
    console.log(res)
})

Last updated