Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

billiving

1.0.3 • Public • Published

Billiving

Build Status Dependencies NPM version

Node.js wrapper for billiving.com API

Installation

npm install billiving

Usage

// Import a module
const billiving = require('billiving')({
  token: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
});
 
// or
 
// Import a module
import Billiving from 'billiving';
// Create an instance with your API credentials
const billiving = Billiving({
  token: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
});
 
// To obtain your token log into your billiving.com account
// Then go to Settings > API Integration
 

Examples

Create Client

billiving.client.create({
  "OrganizationName": "BILLIVING",
  "TaxId": "123456ABC",
  "Address1": "847 Washington Blvd.",
  "Address2": "Apt #1",
  "City": "Los Angeles",
  "State": "CA",
  "ZipCode": "90064",
  "Website": "http://www.john-smith.com",
  "ContactName": "John Smith",
  "Email": "john.smith@email.com", //the only mandatory field
  "Telephone1": "555-555-555",
  "Telephone2": "555-555-555",
  "Cell": "555-555-555",
  "Fax": "555-555-555",
  "InternalNotes": "some notes here..",
  "Contacts": [
    {
      "Email": "contact@email.com"
    }
  ]
})
.then((output) => {
  console.info(output.data);
})
.catch((error) => {
  console.error(error);
})

Create Invoice

billiving.invoice.create({
  "ClientId": "1", //ClientId returned when creating the client
  "ReferenceNumber": "xyz",
  "Discount": 5.0,
  "Shipping": 150.0,
  "Due": 1,
  "ClientNotes": "Thank you for your payment",
  "InternalNotes": "Some internal notes..",
  "DocItems": [
    {
      "ItemId": "XBR-65X950B",
      "ItemDescription": "Flagship 4K Ultra HD TV",
      "ItemPrice": 6999.0,
      "ItemQuantity": 1.0,
      "TaxId1": 1,
      "DiscountType": 0,
      "DiscountValue": 10.0
    }
  ]
})
.then((output) => {
  console.info(output.data);
})
.catch((error) => {
  console.error(error);
})
 

Methods

Account

  • create
  • get

Client

  • create
  • delete
  • client
  • list
  • update

Estimate

  • clone
  • create
  • delete
  • get
  • list
  • send
  • update

Invoice

  • clone
  • create
  • delete
  • get
  • list
  • send
  • update

Product

  • create
  • delete
  • get
  • list
  • update

Receipt

  • create
  • delete
  • get
  • list
  • send
  • update

For product information please visit our site at https://www.billiving.com

install

npm i billiving

Downloadsweekly downloads

6

version

1.0.3

license

MIT

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability