Sell.App API Wrapper
  • Guides
    • Introduction
  • Endpoints
    • Blacklists
    • Coupons
    • Feedback
    • Groups
    • Invoices
      • Invoice v1
      • Invoice v2
    • Products
      • Products v1
      • Products v2
      • Product Variants
Powered by GitBook
On this page
  1. Endpoints
  2. Products

Products v2

All endpoints related to Products v2

PreviousProducts v1NextProduct Variants

Last updated 1 year ago

CtrlK
  • Supported Endpoints
  • Products v2
  • getAllProducts()
  • getProduct()
  • createProduct()
  • updateProduct()
  • deleteProduct()

Products v2 is pretty much the same functionality as products v1 with the acceptation to extra fields.

Supported Endpoints

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

  • getListing(id): Gets listing by the entered ID.

  • createProduct(fields): Create Listing.

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

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


Products v2

getAllProducts()

Parameters
Type
Required
Description

limit

integer

❌

Limit the number of products returned

page

integer

❌

The page number you are attempting to access.

with_trashed

boolean

❌

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

API.products.getAllProducts().then((res) => {
    

getProduct()

Parameters
Type
Required
Description

id

string

✔️

ID of a Product

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

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


createProduct()

Parameters
Type
Required
Description
Fields' Values
Type
Required
Description
Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.products.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()

Parameters
Type
Required
Description
Fields' Values
Type
Required
Description
Usage
const Sellapp = require("sellapp-node");
const API = new Sellapp.API("YOUR_API_KEY");

API.products.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()

Parameters
Type
Required
Description

id

string

✔️

ID of a Product

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

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

An image binary which will be visible when someone views your product.

order

int/null

❌

The product's order in which it is sorted on your storefront.

visibility

string

✔️

Either "PUBLIC", "HIDDEN", or "PRIVATE" - depending on whether you want this product to be visible.

deliverable

object

✔️

The product's deliverable which will be sent to the customer. Consists of three pieces of nested data, being "delivery_text", "type", and "data"

price

object

✔️

The product's price in nested format. Consists of two variables "PRICE" (in cents) and "CURRENCY".

humble

boolean

❌

Whether you want to allow the customer to pay more than the product's price. ( ͡° ͜ʖ ͡°)

payment_methods

array of string

✔️

Items Enum: "COINBASE" "PAYDASH" "PAYPAL" "STRIPE". The product's payment methods in array format.

additional_information

array

❌

Additional info that can be requested from the customer during the checkout process.

bulk_discount

array

❌

An array of discounts when a customer purchases more than a specified quantity.

minimum_purchase_quantity

int

✔️

The minimum amount a customer is able to purchase.

maximum_purchase_quantity

int/null

❌

The maximum amount a customer is able to purchase.

webhook

string/null

❌

A webhook URL that will receive updates when orders are placed.

warranty

object/null

❌

The warranty time in which a customer is able to request a refund.

locked

boolean

❌

Whether this product is locked by the admins or moderators.

section

int/null

❌

The ID of a section to associate with this product. Use null to disassociate a section.

label

object/null

❌

The name of the additional information input. Examples: TEXT,NUMBER,HIDDEN ,TEXTAREA ,

An image binary which will be visible when someone views your product.

order

int/null

❌

The product's order in which it is sorted on your storefront.

visibility

string

✔️

Either "PUBLIC", "HIDDEN", or "PRIVATE" - depending on whether you want this product to be visible.

deliverable

object

✔️

The product's deliverable which will be sent to the customer. Consists of three pieces of nested data, being "delivery_text", "type", and "data"

price

object

✔️

The product's price in nested format. Consists of two variables "PRICE" (in cents) and "CURRENCY".

humble

boolean

❌

Whether you want to allow the customer to pay more than the product's price. ( ͡° ͜ʖ ͡°)

payment_methods

array of string

✔️

Items Enum: "COINBASE" "PAYDASH" "PAYPAL" "STRIPE". The product's payment methods in array format.

additional_information

array

❌

Additional info that can be requested from the customer during the checkout process.

bulk_discount

array

❌

An array of discounts when a customer purchases more than a specified quantity.

minimum_purchase_quantity

int

✔️

The minimum amount a customer is able to purchase.

maximum_purchase_quantity

int/null

❌

The maximum amount a customer is able to purchase.

webhook

string/null

❌

A webhook URL that will receive updates when orders are placed.

warranty

object/null

❌

The warranty time in which a customer is able to request a refund.

locked

boolean

❌

Whether this product is locked by the admins or moderators.

section

int/null

❌

The ID of a section to associate with this product. Use null to disassociate a section.

console
.log
(res)
});

Include deleted products in the results

only_trash

boolean

❌

Limit the results to only deleted products

fields

object

✔️

Product's field

title

string

✔️

The product's title.

description

string

✔️

The product's description.

image

object/null

id

string

✔️

ID of the product you want to update

fields

object

✔️

Product's field

title

string

✔️

The product's title.

description

string

✔️

The product's description.

image

object/null

❌

❌