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()

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

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

getGroup()

Type
Required
Description

id

string

✔️

ID of a group

chevron-rightUsagehashtag


createGroup()

Parameters
Type
Required
Description

id

string

✔️

ID of a group

title

string

✔️

The group title.

order

integer

✔️

The order rank of the group.

unlisted

boolean

✔️

Whether the group is unlisted or not. If set to true, the group will only be accessible via a direct link.

image

object/null

The image belonging to the group.

section_id

integer/null

The ID of the section this group belongs to.

section_order

integer/null

The order rank of the group within the section it belongs to.

chevron-rightUsagehashtag

updateGroup()

Parameters
Type
Required
Description

id

string

✔️

ID of a group

title

string

The group title.

order

integer

The order rank of the group.

unlisted

boolean

Whether the group is unlisted or not. If set to true, the group will only be accessible via a direct link.

image

object/null

The image belonging to the group.

section_id

integer/null

The ID of the section this group belongs to.

section_order

integer/null

The order rank of the group within the section it belongs to.

chevron-rightUsagehashtag

deleteGroup()

Parameters
Type
Required
Description

id

string

✔️

ID of a Group

chevron-rightUsagehashtag

Last updated