Variants Quickstart

Using the Appollo Variants methods

Getting started with variants

A commonly used API is the Variants API. A variant is a particular version of a product within a store. For example the product could be "Summer dress" and a variant would be the "Red Summer Dress".

If your app interacts with a merchant's variants, you can use our various methods to create, read, update and delete variants.

When creating a variant, you should use the variant object structure

The methods you can use for variants are the following:

const Appollo = require("appollo");
const appollo = new Appollo(apiKey, apiSecret);

appollo.getVariants(merchantId, productId, limit, page)
.then(res => console.log(res))
// Get a list of variants from a merchants store

appollo.getVariant(merchantId, productId, variantId)
.then(res => console.log(res))
// Get a particular variant from a merchant store

appollo.createVariant(merchantId, variant, productId)
.then(res => console.log(res))
// Create a variant of a product in a merchant store

appollo.updateVariant(merchantId, variant, productId, variantId)
.then(res => console.log(res))
// Update a variant within a merchant store

appollo.deleteVariant(merchantId, productId, variantId)
.then(res => console.log(res))
// Delete a variant of a product within a merchant store

Did this page help you?