A pwinty api library for Node.JS

Pwinty api for Node.js

Pwinty API for Node.js is a library for communicating with the Pwinty API. It uses standard callbacks, you can easily wrap in a promises/generator library of your choosing.

$ npm install pwinty

Init pwinty with your api credentials and host (sandbox/live):

var pwinty = require('../lib/pwinty')('apiKey', 'merchantId', '');

Then access the pwinty methods:

Create an order

var orderParams = {};
pwinty.createOrder(orderParams, function (errorder) {
    var photo = {
        type: "4x4",
        url: "photourl",
        copies: "2",
        sizing: "ShrinkToExactFit",
        priceToUser: "450"
    pwinty.addPhotoToOrder(, photo, function (errorder) {
        console.log('photo added');