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 siteapikey
- 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