Printful SDK for TypeScript (Node.js)
![Project Status: WIP](https://www.repostatus.org/badges/latest/wip.svg)
📢 Printful API 2.0.0 is in beta [documentation]. This SDK is in development until the official 2.0.0 release (by 2025)
Printful SDK for Node.js. A basic TypeScript wrapper for the Printful REST API (v2). Guidelines and source endpoints can be found here:
developers.printful.com/.
Getting started
Prerequisites
- Printful API Token (documentation)
Installation
npm install printful-sdk-js-v2
yarn add printful-sdk-js-v2
pnpm add printful-sdk-js-v2
Usage
⚠️ For security purposes, this is intended only for server-side use only
import { CountriesV2Api, Country } from 'printful-sdk-js-v2';
const apiKey = process.env.PRINTFUL_API_TOKEN || 'YOUR_PRINTFUL_API_TOKEN';
const countriesApi = new CountriesV2Api({ accessToken: apiKey });
(async () => {
try {
const countries: Country[] = await countriesApi.getCountries();
console.log('List of countries:', countries);
} catch (error) {
console.error('Error fetching countries:', error);
}
})();
API
For the full documentation, please see spencerlepine.github.io/printful-sdk-js-v2
Examples
To get started quickly, check out the JavaScript/TypeScript example code in the examples
folder.
Contributing
We welcome contributions from the community! If you're interested in contributing to this project, please read the CONTRIBUTING.md file to get started.
Disclaimer
This SDK is a third-party library and is not officially endorsed or maintained by Printful. It is provided "as is" without warranty of any kind. For official information and
guidelines on using the Printful API, please refer to the Printful Developer Documentation.
License
MIT