Product Variants

All endpoints related to Product Variants

Because we are dealing with 2 IDs, we will be using id for the product ID and vid for the variant ID

Supported Endpoints

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

  • getVariant(id, vid): Gets listing by the entered ID.

  • createProductVariant(id, fields): Create Listing.

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

  • deleteProductVariant(id, vid): Deletes a listing by the entered ID.


getAllVariants()

Parameters
Type
Required
Description

id

string

✔️

ID of a Product

limit

integer

Limit the number of products returned

page

integer

The page number you are attempting to access.

with_trashed

boolean

Include deleted products in the results

only_trash

boolean

Limit the results to only deleted products

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

API.variants.getAllVariants().then((res) => {
    console.log(res)
});

getVariant()

Parameters
Type
Required
Description

id

string

✔️

ID of a Product

vid

string

✔️

ID of the Variant

Usage


createProductVariant()

Parameters
Type
Required
Description

id

string

✔️

ID of the product

fields

object

✔️

Product's field

Usage

updateProductVariant()

Parameters
Type
Required
Description

id

string

✔️

ID of the product you want to update

fields

object

✔️

Product's field

Usage

deleteProductVariant()

Parameters
Type
Required
Description

vid

string

✔️

ID of a Variant

Usage

Last updated