0.0.4 • Published 5 years ago

clover-rest-api v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

clover-rest-api

Clover Rest API for Node.js

It is NOT official NPM package from Clover. For official documentation, please read Clover V3 API Documentation

npm version npm.io issues starts License

const CloverRestful = require('clover-rest-api')
const CloverClient = CloverRestful.client('https://apisandbox.dev.clover.com')

const cloverToken = 'xxxxxxxxxxxxxxxxxxxxx'
const merchantId = 'merchantIdXXXX'
const cloverInventories = (await CloverClient.inventory.getAllInventoryItems(
        cloverToken,
        merchantId,
        {
          limit: 1000,
          expand: 'categories'
        }
      )).elements

Installation

$ npm install clover-rest-api
or
$ yarn add clover-rest-api

Features

The project under developing now, so it just implements some APIs

Inventory

getAllInventoryItems (token, merchantId, parameters) read more parameters: filter, expand, limit, offset

getAllCategories (token, merchantId, parameters) read more parameters: filter, expand, limit, offset

Orders

createAnOrder (token, merchantId, body) read more

getASingleOrder (token, merchantId, orderId, expand)

deleteAnOrder (token, merchantId, orderId, body)

getAllLineItemsForAnOrder (token, merchantId, orderId, parameters) parameters: expand, limit, offset

createAnOrder (token, merchantId, body) read more

License

MIT