zoined_api v1.3.16
zoined_api
Description
Allows easy validation and posting to the Zoined api. Each line is validated against the api docs and returns an error with the cause and position if fails. If a null value is sent for a non required field then a default is used.
Installation
npm install --save zoined_api
Usage
const zoinedAPI = require(zoined_api)
zoinedAPI.init('myzoinedapikey')
....
zoinedAPI.dataPost(JSON.stringify(myData), 'dataType')
.then(response => {
..
})
.catch(error => {
...
});
Available dataTypes
- sales
- suppliers
- campaigns
- campaignproducts
- departments
- budgets
- products
- customers
- organisations
- salesperson
- currencyrates
- inventorysnapshots
- inventorytransactions
- flathierarchies
- producthierachies
- rebatecodes
- salesorders
- salessummary
- visitors
- visitordemographics
- idmapping
Example Success Response
{
"status": "OK",
"msg": "1 entity added"
}
Example Error Response
{
"errorSupplierID":"",
"errorField":"supplier_id",
"errorReason":"Missing Required Property"
}
Dependencies
- request: Simplified HTTP request client.
- request-promise: The simplified HTTP request client 'request' with Promise support. Powered by Bluebird.
Dev Dependencies
- babel-preset-env: A Babel preset for each environment.
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- mocha: simple, flexible, fun test framework
- mos: A pluggable module that injects content into your markdown files via hidden JavaScript snippets
- nyc: the Istanbul command line interface
License
MIT © Dave Grix - Pavers LTD
4 years ago
4 years ago
4 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago