Skip to content

Print-one/moneybird-js

Repository files navigation

Moneybird.js

npm package Build Status Issues Semantic Release

A wrapper for the Moneybird API.

Currently supported endpoints

  • Administration
  • Contact*
  • Sales invoice*
  • Tax rates
  • Custom Fields
  • Ledger accounts*
  • Workflows

*not all endpoints are yet implemented

Usage

const moneybird = require("@print-one/moneybird-js");

// Set API token for the Moneybird instance
moneybird.instance.setOptions({
  api_token: 'XXXXX',
});

// Alternatively you can create an new instance
const instance = new moneybird.Moneybird(
  'https://moneybird.com/api/',
  'v2',
  'XXXXX'
);

// Get all administrations
instance.administrations().then(async (administration) => {
  const contacts = await administration.contacts();
  console.log(contacts);
});