Manage and track your ambassador, influencer and affiliate marketing programs with ease.
Create a new document in a collection of your choice. See the docs here
Get information about an affiliate. You can get an affiliate's information using their ID or code. See the docs here
Allows you to manually credit an affiliate with any commission amount. See the docs here
Refersion is a powerful affiliate tracking platform that streamlines the process of managing, tracking, and growing your affiliate network. Through its API, you can automate affiliate registrations, commission tracking, and payout processes. Pipedream's serverless platform allows you to connect Refersion with hundreds of other apps to automate workflows, sync data across platforms, and respond to events in real time.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
refersion: {
type: "app",
app: "refersion",
}
},
async run({steps, $}) {
const data = {
"limit": `3`,
"page": `1`,
}
return await axios($, {
method: "post",
url: `https://api.refersion.com/v2/affiliate/list`,
headers: {
"Accept": `application/json`,
"Content-Type": `application/json`,
"Refersion-Public-Key": `{{custom_fields.api_key}}`,
"Refersion-Secret-Key": `{{custom_fields.secret}}`,
},
data,
})
},
})
The MongoDB API provides powerful capabilities to interact with a MongoDB database, allowing you to perform CRUD (Create, Read, Update, Delete) operations, manage databases, and execute sophisticated queries. With Pipedream, you can harness these abilities to automate tasks, sync data across various apps, and react to events in real-time. It’s a combo that’s particularly potent for managing data workflows, syncing application states, or triggering actions based on changes to your data.
import mongodb from 'mongodb'
export default defineComponent({
props: {
mongodb: {
type: "app",
app: "mongodb",
},
collection: {
type: "string"
},
filter: {
type: "object"
}
},
async run({steps, $}) {
const MongoClient = mongodb.MongoClient
const {
database,
hostname,
username,
password,
} = this.mongodb.$auth
const url = `mongodb+srv://${username}:${password}@${hostname}/test?retryWrites=true&w=majority`
const client = await MongoClient.connect(url, {
useNewUrlParser: true,
useUnifiedTopology: true
})
const db = client.db(database)
const results = await db.collection(this.collection).find(this.filter).toArray();
$.export('results', results);
await client.close()
},
})