Emarsys API Wrapper
Promise-based wrapper for the Emarsys API in NodeJS. Emarsys API Documentation.
Installation
$ npm i node-emarsys
const Emarsys = ; const api = 'username' 'password';
Passing your username and password will generate the WSSE header for your requests automatically.
Usage
This library will JSON stringify your data object and include the necessary headers. It will also prepend the standard https://api.emarsys.net/api/v2
uri so you only need to include the specific endpoint.
Making a Request
- Request Type
[method]
- get, post, put - uri
[string]
- emarsys endpoint path AFTER /api/v2 - data
[object]
- data to send to endpoint - @returns
[promise]
- returns a promise, rejecting if a request fails
apirequest typeuri data
Example
api)