Blacklists

All endpoints related to Blacklists

Supported Endpoints

  • getAllBlacklists(): Returns a list of all the blacklists created.

  • getBlacklist(id): Retrieves a blacklist by the entered ID.

  • createBlacklist(type, data, description): Creates a blacklist and returns the created blacklist.

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

  • deleteBlacklist(id): Deletes a blacklist by the entered ID.


getAllBlacklists()

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

API.blacklists.getAllBlacklists().then((res) => {
    console.log(res)
});

getBlacklist()

TypeRequiredDescription

id

string

✔️

ID of a Blacklist

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

API.blacklists.getBlacklist("666").then((res) => {
    console.log(res)
})


createBlacklist()

ParametersTypeRequiredDescription

type

string

✔️

can be one of the following - "email", "ip", "country"

data

string

✔️

Depending on the type you chose, you can enter an IP address, email address, or country code here.

description

string

✔️

A description that will help you remember why this Blacklist rule was created.

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

API.blacklists.createBlacklist("email", "hi@example.com", "evil user").then((res) => {
    console.log(res); // blacklisting the said user with the string "evil user" as description
});

updateBlacklist()

ParametersTypeRequiredDescription

id

string

✔️

ID of the Blacklist you want to update

type

string

✔️

Can be one of the following - "email", "ip", "country"

data

string

✔️

Depending on the type you chose, you can enter an IP address, email address, or country code here.

description

string

✔️

A description that will help you remember why this Blacklist rule was created.

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

API.blacklists.updateBlacklist("666", "email", "hi@example.com", "Super evil user").then((res) => {
    console.log(res); 
});

deleteBlacklist()

ParametersTypeRequiredDescription

id

string

✔️

ID of a Blacklist

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

API.blacklists.deleteBlacklist("666").then((res) => {
    console.log(res)
})

Last updated