# bold-api

> Node.js wrapper for Bold API

Latest version **0.0.1** (published 2016-03-08) · 0 weekly downloads

## Install

```sh
npm install bold-api
pnpm add bold-api
yarn add bold-api
bun add bold-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-03-08 |
| First published | 2016-03-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.2.3 |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | betterview |

## Links

- npm: https://www.npmjs.com/package/bold-api
- Repository: https://github.com/bettervu/bold
- Homepage: https://github.com/bettervu/bold#readme
- Issues: https://github.com/bettervu/bold/issues
- npm.io page: https://npm.io/package/bold-api

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.69.0

## Recent versions

- 0.0.1 (latest) — 2016-03-08

## README

# Bold API [![Circle CI](https://circleci.com/gh/bettervu/bold.svg?style=svg)](https://circleci.com/gh/bettervu/bold)

## NPM

```
npm install bold-api
```

## Using the API

```js
const Bold = require('bold-api');
const bold = new Bold({
  key: '{your-key}'
});
```
For post requests, include a data object that follows this pattern

```js
const data = {
  recipient_id: '54c03ccb5172cc5f1285889e',
  wallet_id: '54daac295c15ac2b1144ab2f',
  amount: 475.89,
  currency: 'USD',
  ref_id: 'ID-from-your-system-to-prevent-duplicates'
}
bold.v1.createTransfer(data, (err, response) => {})
```

Methods available on bold.v1:

```js
  //Get single reference
  bold.v1.getReference({country: 'US', type: 'individual'}, callback);

  //Get all recipients
  bold.v1.getRecipients(callback);

  //Create simple recipient
  bold.v1.createRecipient(data, callback);

  //Create KYC recipient
  bold.v1.createKYCRecipient(data, callback);

  //Get single recipient
  bold.v1.getRecipient({id: recipient_id}, callback);

  //Update recipient
  bold.v1.getRecipient({id: recipient_id, data: {}}, callback);

  //Delete recipient
  bold.v1.deleteRecipient({id: recipient_id}, callback);

  //Get all wallets
  bold.v1.getAllWallets(callback)

  //Create wallet
  bold.v1.createWallet(data, callback);

  //Get single wallet
  bold.v1.getWallet({id: wallet_id}, callback);

  //Update wallet
  bold.v1.updateWallet({id: wallet_id}, callback);

  //Create transfer
  bold.v1.createTransfer(data, callback);

  //Get all transfers
  bold.v1.getAllTransfers(callback);

  //Get single transfer
  bold.v1.getTransfer({id: transfer_id}, callback)
```

### Sandbox

To set your API into sandbox mode, pass `sandbox: true` in the bold options.

```js
const Bold = require('bold-api');
const bold = new Bold({
  key: '{your-key}',
  sandbox: true
});
```

## API

For full documentation, check out the official [Bold API docs](https://gobold.com/docs/#introduction)

---
_Source: https://npm.io/package/bold-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
