1.1.3 • Published 10 years ago

newgistics v1.1.3

Weekly downloads
-
License
BSD
Repository
-
Last release
10 years ago

newgistics

node.js wrapper for making calls to the Newgistics Fulfillment API

Installation

npm install newgistics

XML conversion

XML attributes are marked with the @ tag, while body attributes are marked with the # tag. For example,

<Name id="12345">Lou</Name>

would convert to

{
	Name: {
		'@': { id: '12345' },
		'#': 'Lou'
	}
}

All requests/responses are JS objects.

Usage

Important note: The outermost collection identifier is not required. Your API key provided by Newgistics is required. Environment options are 'production' and 'staging'.

var newgistics = require('newgistics');

var gateway = newgistics.connect({
    environment: newgistics.Environments.staging,
    apiKey: '12421412121255115221512521'
});

Posting a new shipment

var orderData =  {
    Order: {
    	   '@': { orderID: '12345' },
	   	CustomerInfo: {
			FirstName: 'Lou',
			LastName: 'Seal',
			Address1: '24 Willie Mays Plaza',
			City: 'San Francisco',
			State: 'CA',
			Zip: '94107',
			Country: 'USA',
			Email: 'louseal@sfgiants.com'
		},
		OrderDate: '11/10/2013',
		Items: {
			Item: [
				{
					SKU: '1000',
					Qty: '1'
			    }
			 ]
		}
	}
}

gateway.shipments.post(orderData, function(err, res) {
	// ...
});

Searching for an existing shipment

gateway.shipments.search({ id: 100001 }, function(err, res) {
			   // ...
});

TODO - add support for remaining Newgistics API routes

Licensed under the BSD license.

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.4

11 years ago

1.0.3

11 years ago

1.0.2

12 years ago

1.0.1

12 years ago

1.0.0

12 years ago

0.0.1

12 years ago

0.0.0

12 years ago