NodeJs App Integration
This is SDK for connecting with Recommend, Inc. platform. If you need any support contact firstname.lastname@example.org
First, you need to obtain your API key here. When you have obtained your API key, you can use our SDK, either built from source here (from master branch) or using NPM package. We have other integration options too - for details, please check our other options.
When you have added package reference, you can initialize the SDK like this:
const rcmnd = require("@recommendworld/rpd-npm-sdk")
You can test connection to our platform like this:
var r = await rcmnd.testApiConnection();
To send us referral information, when conversion occurs, send it like this:
var conversion = await rcmnd.referralCheck("d49c3395-6e14-4a28-a9e7-3330508d77ed", "", "");
Parameters for conversion are referral code, email (optional), phone number (optional), order number (optional) and cart total (optional).
Conversion can be approved or rejected using API:
var approveResult = await rcmnd.approveConversion(conversionIdYouReceivedFromReferralCheck);
var rejectResult = await rcmnd.rejectConversion(conversionIdYouReceivedFromReferralCheck);