Skip to main content

Catalog API

Catalog API allows receiving data for a substantial catalog of blank Products and Variants.

PrintfulStoreClient.catalog

Printful API Reference

Source


Get Products

Printful API Reference

Returns list of blank Products available in the Printful Catalog.

Method

PrintfulStoreClient.catalog.getAllProducts(category_id?: string)

Arguments

category_id - A comma-separated list of Category IDs of the Products that are to be returned

Example Usage:

import {createPrintfulStoreClient} from "printful-sdk-js";

// ASYNC BLOCK
const client = createPrintfulStoreClient("STORE_TOKEN");
const {result: products, error} = await client.catalog.getAllProducts();
// ASYNC BLOCK

if(error){
console.error(error);
}else{
console.table(products);
}

Get Variant

Printful API Reference

Returns information about a specific Variant and its Product.

Method

PrintfulStoreClient.catalog.getVariant(id: number)

Arguments

id - Product ID.

Example Usage:

import {createPrintfulStoreClient} from "printful-sdk-js";

// ASYNC BLOCK
const client = createPrintfulStoreClient("STORE_TOKEN");
const {result: variant, error} = await client.catalog.getVariant(4018);
// ASYNC BLOCK

if(error){
console.error(error);
}else{
console.log(variant);
}

Get Product

Printful API Reference

Returns information about a specific product and a list of variants for this product.

Method

PrintfulStoreClient.catalog.getProduct(id: number)

Arguments

id - Product ID.

Example Usage:

import {createPrintfulStoreClient} from "printful-sdk-js";

// ASYNC BLOCK
const client = createPrintfulStoreClient("STORE_TOKEN");
const {result: product, error} = await client.catalog.getProduct(71);
// ASYNC BLOCK

if(error){
console.error(error);
}else{
console.log(product);
}

Get Product Size Guide

Printful API Reference

Returns information about the size guide for a specific product.

Method

PrintfulStoreClient.catalog.getSize()

Arguments

id - Product ID.

Example Usage:

import {createPrintfulStoreClient} from "printful-sdk-js";

// ASYNC BLOCK
const client = createPrintfulStoreClient("STORE_TOKEN");
const {result: sizeGuide, error} = await client.catalog.getSize(71);
// ASYNC BLOCK

if(error){
console.error(error);
}else{
console.log(sizeGuide);
}

Get Categories

Printful API Reference

Returns list of Catalog Categories available in the Printful.

Method

PrintfulStoreClient.catalog.getAllCategories()

Arguments

None

Example Usage:

import {createPrintfulStoreClient} from "printful-sdk-js";

// ASYNC BLOCK
const client = createPrintfulStoreClient("STORE_TOKEN");
const {result: categories, error} = await client.catalog.getCategories();
// ASYNC BLOCK

if(error){
console.error(error);
}else{
console.log(categories);
}

Get Category

Printful API Reference

Returns information about a specific category.

Method

PrintfulStoreClient.catalog.getCategory(id: number)

Arguments

id - Category ID

Example Usage:

import {createPrintfulStoreClient} from "printful-sdk-js";

// ASYNC BLOCK
const client = createPrintfulStoreClient("STORE_TOKEN");
const {result: category, error} = await client.catalog.getCategory();
// ASYNC BLOCK

if(error){
console.error(error);
}else{
console.log(category);
}