
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
avadaio-node
Advanced tools
AVADA Email Marketing API bindings for NodeJS to make it easier for developer to connect with AVADA Marketing Automation platform.
npm install --save avadaio-node
Our API documentation is located at: AVADA API Documentation. You can see our API for more reference.
const AVADA = require('avadaio-node');
const avadaio = new AVADA({
appId: '[YOUR_APP_ID]',
apiKey: '[YOUR_API_KEY]'
});
This module exports a constructor function which takes an options object.
AVADA(options)
Creates a new AVADA
instance.
options
- Required - A plain JavaScript object that contains the
configuration options.appId
- RequiredapiKey
- RequiredYou can obtain your appId
and apiKey
after creating an account with AVADA and go to the Manage Keys page
A AVADA
instance.
Throws an Error
exception if the required options are missing.
Every resource is accessed via your avadaio
instance:
const avadaio = new AVADA({
appId: '[YOUR_APP_ID]',
apiKey: '[YOUR_API_KEY]'
});
// avadaio.<resource_name>.<method_name>
Each method returns a Promise
that resolves with the result of:
success
- booleandata
- any - optionalmessage
- string(async () => {
try {
const resp = await avadaio.contact.create({
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
email: 'johndoe@example.com',
firstName: 'John',
isSubscriber: true,
lastName: 'Doe',
phoneNumber: '+16194892038',
phoneNumberCountry: 'US',
source: 'shopify',
orderCount: 0,
totalSpent: 0,
country: 'United States',
countryCode: 'US',
city: '',
address: '',
tags: 'Email Marketing'
});
console.log(resp);
} catch (err) {
console.error(err);
}
})();
The JSON return from the API is like this:
{"success": true, "message": "Hook create/update customers complete"}
This behavior is the same for all resources.
const resp = await avadaio.connection.test();
if (resp.success) {
console.log('Connection established');
}
More examples can be found in the __test__
folder in the project source code.
test()
Test the connection using your apiKey
and appId
list()
Get a list of inline forms to integrate AVADA Forms into your page buildercreate(data)
Create a new contact in your AVADA adminupdate(data)
Update an existing contact in your AVADA adminbulk(data)
Create new contacts in your AVADA admin in bulkadd(data)
Add a new contact to your contact list as a subscriber. Trigger the New Subscriber automation event.submit(data)
Trigger the submit of a new review on your store. Trigger On new review automation event.create(data)
Trigger a new checkout event to AVADA, which will be used for the Abandoned Cart Automation.update(data)
Trigger a update to a checkout event to AVADA. For example, update checkout email so that the cart will be qualified for Abandoned Cart Email.remove(id)
Remove a checkout.create(data)
Trigger a new order event to AVADA. Trigger New Order automation event.update(data)
Update an existing order.complete(data)
Complete an order. Trigger Cross-sell, Up-sell automation events.bulk(data)
Sync your orders to AVADA using bulk order inserts.refund(data)
Trigger a refund event to AVADAinvoice(data)
Trigger a fulfillment event to AVADAship(data)
Trigger a shipping event to AVADAThe detailed data param for each resource already defined in the index.d.ts
file which allow suggestion during development process in IDE
Trigger an custom event to send automation emails
avada.trigger(eventKey, {
email:'johnsmith@email.com',
customer: {
firstName: 'John',
lastName: 'Smith',
orderCount: 2,
totalSpent: 150,
country: 'US',
phoneNumber: '12986038xxx',
//...more
},
//...more
});
If you need any support, you can reach to us within our customer chat support inside your app
FAQs
AVADA Email Marketing API bindings for Node.js
The npm package avadaio-node receives a total of 2,923 weekly downloads. As such, avadaio-node popularity was classified as popular.
We found that avadaio-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.