📢 Printful API 2.0.0 is still in beta (documentation). This SDK will be 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.
- Printful API Token (documentation)
# Npm
npm install printful-sdk-js-v2
# Yarn
yarn add printful-sdk-js-v2
# Pnpm
pnpm add printful-sdk-js-v2
For security purposes, this is intended only for server-side use only
// getCountries.ts
import { PrintfulClient, Country } from 'printful-sdk-js-v2';
// const { PrintfulClient } = require('printful-sdk-js-v2'); // CommonJS
const printful = new PrintfulClient({
TOKEN: '<PRINTFUL_API_TOKEN>',
});
(async () => {
const response = await printful.countriesV2.getCountries();
const countries: Country[] = response.data;
console.log(countries);
})();
- JavaScript: examples/javascript
- TypeScript: examples/typescript
View the site here: spencerlepine.github.io/printful-sdk-js-v2
Pull requests welcome! If you're interested in contributing to this project, please read the CONTRIBUTING.md file to get started.
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.