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.
npm install --save zoined_api
const zoinedAPI = require(zoined_api)
zoinedAPI.init('myzoinedapikey')
....
zoinedAPI.dataPost(JSON.stringify(myData), 'dataType')
.then(response => {
..
})
.catch(error => {
...
});
- sales
- suppliers
- campaigns
- campaignproducts
- departments
- budgets
- products
- customers
- organisations
- salesperson
- currencyrates
- inventorysnapshots
- inventorytransactions
- flathierarchies
- producthierachies
- rebatecodes
- salesorders
- salessummary
- visitors
- visitordemographics
- idmapping
{
"status": "OK",
"msg": "1 entity added"
}
{
"errorSupplierID":"",
"errorField":"supplier_id",
"errorReason":"Missing Required Property"
}
- request: Simplified HTTP request client.
- request-promise: The simplified HTTP request client 'request' with Promise support. Powered by Bluebird.
- 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
MIT © Dave Grix - Pavers LTD