node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


Docparse Save Bill

Save new a docparse bill in the database with given data

Build Status Dependency Status Dependency tracking by David


var saveBill = require('docparse-save-bill');
var moment = require('moment');
var mongoose = require('mongoose');
var ObjectId = mongoose.Types.ObjectId;
var data = {
  supplierID: new ObjectId(),
  customerID: new ObjectId(),
  loginID: new ObjectId(),
  hash: 'foo hash',
  supplierCode: 'FGS',
  billNumber: 'foo bill number',
  dataType: 'pdf',
  billDate: moment(),
  accountNumber: 'foo account number',
  textPages: ['foo page 1 text', 'bar page 2 text']
saveBill(queryParams, function(err, bill) {
  if (err) {
    inspect(err, 'error saveing bill')
  if (!bill) {
    inspect('no bill found');
    return cb();
  inspect(bill.toObject(), 'found bill');


npm install docparse-save-bill

Example Installation

npm install docparse-save-bill mongoose moment eyespect