0.0.2 • Published 8 years ago

neto v0.0.2

Weekly downloads
136
License
MIT
Repository
-
Last release
8 years ago

node-neto

This is a basic API wrapper for the Neto API (https://www.neto.com.au/api). Since this package use the JSON transport, you must be using Neto v5.4 and above.

Usage Example

This is a complete example to create an order.

var Neto = require('neto');
var api = new Neto({ uri: 'https://www.yournetosite.com.au', apiKey: '<Your Neto API Secure Key>'});

var order = {
	"Order": [{
		"OrderID": "A123",
		"Email": "davidh@dynamicmethods.com.au",
		"Username": "username",
		"BillFirstName": "David",
		"BillLastName": "Howell",
		"BillCompany": "Dynamic Methods Pty Ltd",
		"BillStreet1": "122 Sturt street",
		"BillStreet2": "",
		"BillCity": "Adelaide",
		"BillState": "SA",
		"BillPostCode": "5000",
		"BillCountry": "Australia",
		"ShipFirstName": "John",
		"ShipLastName": "Doe",
		"ShipCompany": "",
		"ShipStreet1": "1 Smith Street",
		"ShipStreet2": "",
		"ShipCity": "Adelaide",
		"ShipState": "SA",
		"ShipPostCode": "5000",
		"ShipCountry": "Australia",
		"ShippingMethod": "Standard Delivery",
		"DateRequired": "2016-02-14"
	}]
};

api.addOrder(order, function(err, res) {
	if(err) console.log(err);

	console.log(res);
});

Installation

$ npm install neto

Usage

Initialisation

var Neto = require('neto');
var api = new Neto({ uri: 'https://www.yournetosite.com.au', apiKey: '<Your Neto API Secure Key>'});
  • uri - The website URL of your Neto site
  • apikey - The API Key generated within the CPanel of your Neto website

Methods

All methods follow the documentation at https://www.neto.com.au/api/. All methods take two arguments:

  • data: The JSON object specified in the request (e.g. order, payment, product, category, warehouse, customer, filter)
  • callback: The callback with an err and response arguments

Orders / Invoices

Payments

Products

Categories

Warehouses

Content

Customers

0.0.2

8 years ago

0.0.1

8 years ago