Products v1

All endpoints related to Products v1

Products v1 endpoints are depreciated but do still work, it is HIGHLY recommended to update your applications to the v2 endpoints

Products v1 support will be depreciated from the wrapper at some point.

Supported Endpoints

  • getAllProducts(): Returns a list of all the listings created.

  • getProduct(id): Retrieves a listing by the entered ID.

  • createProduct(fields): Creates a listing and returns the created listing.

  • updateProduct(id, fields): Updates a listing by the entered ID.

  • deleteProduct(id): Deletes a listing by the entered ID.


Products v1

Products v1 endpoints are depreciated but do still work, it is HIGHLY recommended to update your applications to the v2 endpoints

Products v1 support will be depreciated from the wrapper at some point.

getAllProducts()

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

API.productsv1.getAllProducts().then((res) => {
    console.log(res)
});

getProduct()

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

API.productsv1.getProduct("6666").then((res) => {
    console.log(res)
})


createProduct()

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

API.productsv1.createProduct({
	"title": "Millions of gold pieces",
	"description": "Get rich, buy this.",
	"deliverable": {
		"delivery_text": "Meet me in world 5",
		"type": "MANUAL",
		"data": {
			"stock": 666,
			"comment": "Thanks"
		}
	},
	"price": {
		"price": 50,
		"currency": "USD"
	},
	"payment_methods": ["PAYPAL"],
	"minimum_purchase_quantity": 1,
	"visibility": "HIDDEN"
}).then((res) => {
    console.log(res);
}).catch((err) => {
    console.log(err);
});

updateProduct()

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

API.productsv1.updateProduct("6666, {
	"title": "Millions of gold pieces EXTRA",
	"slug": "millions-of-gold-pieces",
	"description": "Get rich, buy this.",
	"visibility": "PUBLIC",
	"deliverable": {
		"delivery_text": "Meet me in world 1000!!",
		"type": "MANUAL",
		"data": {
			"stock": 666,
			"comment": "Thanks broski (scammed, real)"
		}
	},
	"price": {
		"price": 1000, // ( ͡° ͜ʖ ͡°)
		"currency": "USD"
	},
	"humble": true,
	"payment_methods": ["PAYPAL"],
	"minimum_purchase_quantity": 1,
	"maximum_purchase_quantity": 20
}).then((res) => {
    console.log(res); 
}).catch((err) => {
    console.log(err);
});

deleteProduct()

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

API.productsv1.deleteProduct("6666").then((res) => {
    console.log(res)
})

Last updated