Skip to main content
Documentation Coming Soon - Comprehensive Node.js SDK documentation is being prepared. In the meantime, use the API Reference and code examples throughout the guides.

Quick Start

Installation

npm install intelliprint

Basic Usage

import Intelliprint from 'intelliprint';

const ip = Intelliprint('your-api-key');

const printJob = await ip.prints.create({
  testmode: true,
  content: '<h1>Hello World!</h1>',
  recipients: [{
    address: {
      name: 'John Doe',
      line: '123 Main St, London',
      postcode: 'SW1A 1AA',
      country: 'GB'
    }
  }],
  confirmed: true
});

console.log('Print job created:', printJob.id);

Resources

The Node.js SDK provides access to all API resources:
  • ip.prints - Print jobs
  • ip.backgrounds - Letterheads and templates
  • ip.mailingLists - Recipient lists
  • ip.mailingListRecipients - Individual recipients

Guides & Examples

While the complete SDK reference is being prepared, explore these guides with Node.js examples:

Configuration

const ip = Intelliprint('your-api-key', {
  timeout: 10000,        // Request timeout (ms) - default 30000
  maxRetries: 3,         // Auto-retry failed requests - default 0
  apiVersion: 'v1'       // API version - default 'v1'
});

TypeScript Support

The SDK includes full TypeScript definitions:
import Intelliprint, { PrintJob, PrintJobCreateParams } from 'intelliprint';

const ip = Intelliprint('your-api-key');

const params: PrintJobCreateParams = {
  testmode: true,
  content: '<h1>Hello</h1>',
  recipients: [{
    address: {
      name: 'John Doe',
      line: '123 Main St',
      postcode: 'SW1A 1AA',
      country: 'GB'
    }
  }]
};

const printJob: PrintJob = await ip.prints.create(params);

Error Handling

try {
  await ip.prints.create(params);
} catch (error) {
  console.error('Error type:', error.type);
  console.error('Message:', error.message);
  console.error('Code:', error.code);
  console.error('Status:', error.statusCode);
  
  if (error.type === 'invalid_request_error') {
    // Handle validation errors
  } else if (error.type === 'authentication_error') {
    // Handle auth errors
  }
}

Need Help?