# node-tripletex

> A Connector Crystallize and Tripletex API

Latest version **1.0.0** (published 2020-12-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install node-tripletex
pnpm add node-tripletex
yarn add node-tripletex
bun add node-tripletex
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-12-07 |
| First published | 2020-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Crystallize Admin |
| Maintainers | crystallize-admin |
| Keywords | tripletex, crystallize, api, module |

## Links

- npm: https://www.npmjs.com/package/node-tripletex
- Repository: https://github.com/CrystallizeAPI/node-tripletex
- Homepage: https://github.com/CrystallizeAPI/node-tripletex#readme
- Issues: https://github.com/CrystallizeAPI/node-tripletex/issues
- npm.io page: https://npm.io/package/node-tripletex

## Dependencies (4)

- [ow](https://npm.io/package/ow.md) ^0.18.0
- [type-fest](https://npm.io/package/type-fest.md) ^0.17.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [cross-fetch](https://npm.io/package/cross-fetch.md) ^3.0.6

## Recent versions

- 1.0.0 (latest) — 2020-12-07

## README

# node-tripletex

Node Tripletex SDK for easy Tripletex integration in Node.JS. Generic Tripletex Node integration with specific support for the [Crystallize headless ecommerce serce](https://crystallize.com/).

Crystallize enables you to build your next-gen e-commerce business by the help of [Fast GraphQL API Service](https://crystallize.com/product/graphql-commerce-api) backed by super structured [Product Information Management (PIM)](https://crystallize.com/product/product-information-management)

You can view the required body models documented in [Tripletex documentation](https://tripletex.no/v2-docs/#/)

## Install

```
yarn add @crystallize/node-tripletex
```

## Usage

### Initiate the client<br/>

```
const client = new TripletexClient({
    testDrive: true,
    consumerToken: "MY_TRIPLETEX_CONSUMER_TOKEN",
    employeeToken: "MY_TRIPLETEX_EMPOLOYEE_TOKEN"
  });
```

### Create an Access Token<br/>

```
await client.getAccessToken();
```

### Fetch all Inventories<br/>

```
await client.getInventories();
```

### Get all VAT Types<br/>

```
await client.getVatTypes();
```

### Create an Order<br/>

```
await client.createOrder(cartData);
```

### Create an OrderLine<br/>

```
await client.createOrderLine(orderLineData);
```

### Create a Customer<br/>

```
await client.createCustomer(customerData);
```

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