https://github.com/crystallizeapi/node-tripletex
A connector Package to the Tripletex API
https://github.com/crystallizeapi/node-tripletex
Last synced: 3 months ago
JSON representation
A connector Package to the Tripletex API
- Host: GitHub
- URL: https://github.com/crystallizeapi/node-tripletex
- Owner: CrystallizeAPI
- License: mit
- Created: 2020-10-12T11:12:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-22T23:24:23.000Z (over 4 years ago)
- Last Synced: 2025-02-20T17:49:48.598Z (4 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 6
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```
const client = new TripletexClient({
testDrive: true,
consumerToken: "MY_TRIPLETEX_CONSUMER_TOKEN",
employeeToken: "MY_TRIPLETEX_EMPOLOYEE_TOKEN"
});
```### Create an Access Token
```
await client.getAccessToken();
```### Fetch all Inventories
```
await client.getInventories();
```### Get all VAT Types
```
await client.getVatTypes();
```### Create an Order
```
await client.createOrder(cartData);
```### Create an OrderLine
```
await client.createOrderLine(orderLineData);
```### Create a Customer
```
await client.createCustomer(customerData);
```