Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Printful

Scalekit connector
Open markdown

The Printful connector lets your AI agent act in each user's Printful account. Each user connects their own Printful access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 28 tools.

Tools
28
What they doRead · write · destructive
18 · 7 · 318 read7 write3 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Printful connection

    In AgentKit > Connections, create a Printful connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'printful'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Printful:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'printful_catalog_products_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Printful credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • printful_catalog_product_getGet one catalog product with all its variants.Read-only

    Get Catalog Product

    Get one catalog product with all its variants. Returns result.product (title, brand, techniques, files and options) and result.variants[] with id, size, color, price and in_stock. Use printful_catalog_product_get to find variant IDs for orders and sync products.

    Inputs

    idintegerrequired
    ID of the catalog product. Example: 71
  • printful_catalog_product_size_guide_getGet the size guide tables for a catalog product.Read-only

    Get Product Size Guide

    Get the size guide tables for a catalog product. Returns result with available_sizes and size_tables (measurements per size in inches or cm). Use printful_catalog_product_size_guide_get to answer sizing questions.

    Inputs

    idintegerrequired
    ID of the catalog product. Example: 71
    unitstring
    Comma-separated units for the size tables: inches, cm, or inches,cm. Defaults by locale. Example: inches,cm
  • printful_catalog_products_listList products in the Printful catalog (blank products you can print on), optionally by category.Read-only

    List Catalog Products

    List products in the Printful catalog (blank products you can print on), optionally by category. Returns result[] with id, type, title, brand, model, image, variant_count and techniques. Use printful_catalog_products_list to browse what Printful can make. Use printful_catalog_product_get for its variants.

    Inputs

    category_idstring
    Comma-separated catalog category IDs to filter by (see printful_categories_list). Example: 24,32
  • printful_catalog_variant_getGet one catalog variant and its product.Read-only

    Get Catalog Variant

    Get one catalog variant and its product. Returns result.variant (size, color, price, in_stock, availability by region) and result.product. Use printful_catalog_variant_get to check a variant's price and stock.

    Inputs

    idintegerrequired
    ID of the catalog variant. Example: 4012
  • printful_categories_listList all catalog categories.Read-only

    List Catalog Categories

    List all catalog categories. Returns result.categories[] with id, parent_id, title, image_url and catalog_position. Use printful_categories_list to get category IDs for printful_catalog_products_list.

    Inputs

    This tool takes no inputs.

  • printful_countries_listList the countries and states Printful ships to, with their codes.Read-only

    List Countries

    List the countries and states Printful ships to, with their codes. Returns result[] with code, name and states[] (code, name). Use printful_countries_list to get valid country_code and state_code values for recipients.

    Inputs

    This tool takes no inputs.

  • printful_file_getGet one File Library file.Read-only

    Get File

    Get one File Library file. Returns status (ok, waiting or failed), url, filename, mime_type, size, width, height, dpi, thumbnail_url and preview_url. Use printful_file_get after printful_file_add to wait until the file is processed.

    Inputs

    idintegerrequired
    ID of the file. Example: 10
    store_idstring
    Printful store ID, sent as the X-PF-Store-Id header. Needed only with an account-level token; store-level tokens already belong to one store. Get IDs from printful_stores_list. Example: 1234567
  • printful_order_costs_estimateCalculate the Printful and retail costs of an order without creating it.Read-only

    Estimate Order Costs

    Calculate the Printful and retail costs of an order without creating it. Returns result.costs (subtotal, discount, shipping, digitization, tax, vat, total) and result.retail_costs. Use printful_order_costs_estimate to quote an order. Use printful_order_create to place it.

    Inputs

    itemsarrayrequired
    Order items. Each identifies a product by sync_variant_id, external_variant_id, warehouse_product_variant_id, or a catalog variant_id with files (print files as [{"url": ...}]); add quantity, retail_price, name and options as needed. Example: [{"variant_id": 4012, "quantity": 1, "files": [{"url": "https://www.example.com/files/tshirts/example.png"}]}]
    recipientobjectrequired
    Recipient address: name, address1, city, state_code (required for US, CA and AU), country_code, zip, and optionally company, address2, phone, email, tax_number. Example: {"name": "John Smith", "address1": "19749 Dearborn St", "city": "Chatsworth", "state_code": "CA", "country_code": "US", "zip": "91311", "email": "john@example.com"}
    retail_costsobject
    Retail costs to show on the packing slip, such as currency, subtotal, discount, shipping and tax. Example: {"currency": "USD", "subtotal": "10.00", "shipping": "5.00"}
    shippingstring
    Shipping method ID from printful_shipping_rates_calculate. Defaults to STANDARD. Example: STANDARD
    store_idstring
    Printful store ID, sent as the X-PF-Store-Id header. Needed only with an account-level token; store-level tokens already belong to one store. Get IDs from printful_stores_list. Example: 1234567