cURL
curl --request POST \
--url https://firstpromoter.com/api/v1/promoters/move_to_campaign \
--header 'X-API-KEY: <api-key>'import requests
url = "https://firstpromoter.com/api/v1/promoters/move_to_campaign"
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://firstpromoter.com/api/v1/promoters/move_to_campaign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://firstpromoter.com/api/v1/promoters/move_to_campaign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://firstpromoter.com/api/v1/promoters/move_to_campaign"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://firstpromoter.com/api/v1/promoters/move_to_campaign")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://firstpromoter.com/api/v1/promoters/move_to_campaign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 6481069,
"status": "active",
"cust_id": "",
"email": "jiba@mailinator.com",
"created_at": "2023-08-16T14:22:50.157Z",
"temp_password": null,
"default_promotion_id": 10122438,
"pref": "2uvc08x",
"default_ref_id": "tvo16",
"note": null,
"w8_form_url": null,
"w9_form_url": null,
"parent_promoter_id": null,
"earnings_balance": null,
"current_balance": null,
"paid_balance": null,
"auth_token": "xMx1xEzDAs_GPAxyBEMCGbEs1wGJsUzR",
"profile": {
"id": 6518856,
"first_name": "Macaulay",
"last_name": null,
"website": null,
"company_name": null,
"phone_number": null,
"address": null,
"vat_id": null,
"country": null,
"paypal_email": null,
"avatar_url": null,
"description": null,
"social_accounts": {}
},
"promotions": [
{
"id": 10122438,
"status": "offer_running",
"ref_id": "tvo16",
"promo_code": null,
"customer_promo_code": null,
"target_reached_at": null,
"promoter_id": 6481069,
"campaign_id": 26127,
"referral_link": "https://lastechworld.com?fpr=tvo16",
"current_offer": {
"id": 140358,
"name": "1 free subscription months",
"amount": 1,
"unit": "free_months",
"default_promo_code": ""
},
"current_referral_reward": {
"id": 140359,
"amount": 1,
"type": "per_referral",
"unit": "free_months",
"name": "1 free subscription months",
"per_of_sale": 0,
"default_promo_code": ""
},
"current_promotion_reward": null,
"current_target_reward": null,
"campaign_name": "Make Campaign",
"hidden": false,
"visitors_count": 0,
"leads_count": 0,
"customers_count": 0,
"refunds_count": 0,
"cancellations_count": 0,
"sales_count": 0,
"sales_total": 0,
"refunds_total": 0,
"active_customers_count": 0
},
{
"id": 7061492,
"status": "offer_inactive",
"ref_id": "2hpqscnv",
"promo_code": null,
"customer_promo_code": null,
"target_reached_at": null,
"promoter_id": 6481069,
"campaign_id": 18747,
"referral_link": "https://lastechworld.com?fpr=2hpqscnv",
"current_offer": null,
"current_referral_reward": {
"id": 94230,
"amount": 0,
"type": "per_referral",
"unit": "cash",
"name": "20% recurring commission",
"per_of_sale": 20,
"default_promo_code": ""
},
"current_promotion_reward": null,
"current_target_reward": null,
"campaign_name": "Publishers & marketing Partners",
"hidden": true,
"visitors_count": 0,
"leads_count": 1,
"customers_count": 1,
"refunds_count": 2,
"cancellations_count": 3,
"sales_count": 2,
"sales_total": 72400,
"refunds_total": -72400,
"active_customers_count": 0
}
]
}"Bad credentials"{
"error": "Promoter not found."
}{
"error": "You need to find the promoter either by id, cust_id, auth_token, ref_id or promoter_email"
}Promoters
Move/switch a promoter from one campaign to another
This endpoint will change the promoter’s campaign to another one, keeping the referral ID the same (the affiliate won’t need to update the referral link). It serves the same function as moving the promoter to another campaign from the UI.More details on how it works can be found here.
You can identify promoters by: id, cust_id, auth_token, promoter_email or ref_id(referral id).
HTTP Request
POST https://firstpromoter.com/api/v1/promoters/move_to_campaign POST
/
move_to_campaign
cURL
curl --request POST \
--url https://firstpromoter.com/api/v1/promoters/move_to_campaign \
--header 'X-API-KEY: <api-key>'import requests
url = "https://firstpromoter.com/api/v1/promoters/move_to_campaign"
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://firstpromoter.com/api/v1/promoters/move_to_campaign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://firstpromoter.com/api/v1/promoters/move_to_campaign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://firstpromoter.com/api/v1/promoters/move_to_campaign"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://firstpromoter.com/api/v1/promoters/move_to_campaign")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://firstpromoter.com/api/v1/promoters/move_to_campaign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 6481069,
"status": "active",
"cust_id": "",
"email": "jiba@mailinator.com",
"created_at": "2023-08-16T14:22:50.157Z",
"temp_password": null,
"default_promotion_id": 10122438,
"pref": "2uvc08x",
"default_ref_id": "tvo16",
"note": null,
"w8_form_url": null,
"w9_form_url": null,
"parent_promoter_id": null,
"earnings_balance": null,
"current_balance": null,
"paid_balance": null,
"auth_token": "xMx1xEzDAs_GPAxyBEMCGbEs1wGJsUzR",
"profile": {
"id": 6518856,
"first_name": "Macaulay",
"last_name": null,
"website": null,
"company_name": null,
"phone_number": null,
"address": null,
"vat_id": null,
"country": null,
"paypal_email": null,
"avatar_url": null,
"description": null,
"social_accounts": {}
},
"promotions": [
{
"id": 10122438,
"status": "offer_running",
"ref_id": "tvo16",
"promo_code": null,
"customer_promo_code": null,
"target_reached_at": null,
"promoter_id": 6481069,
"campaign_id": 26127,
"referral_link": "https://lastechworld.com?fpr=tvo16",
"current_offer": {
"id": 140358,
"name": "1 free subscription months",
"amount": 1,
"unit": "free_months",
"default_promo_code": ""
},
"current_referral_reward": {
"id": 140359,
"amount": 1,
"type": "per_referral",
"unit": "free_months",
"name": "1 free subscription months",
"per_of_sale": 0,
"default_promo_code": ""
},
"current_promotion_reward": null,
"current_target_reward": null,
"campaign_name": "Make Campaign",
"hidden": false,
"visitors_count": 0,
"leads_count": 0,
"customers_count": 0,
"refunds_count": 0,
"cancellations_count": 0,
"sales_count": 0,
"sales_total": 0,
"refunds_total": 0,
"active_customers_count": 0
},
{
"id": 7061492,
"status": "offer_inactive",
"ref_id": "2hpqscnv",
"promo_code": null,
"customer_promo_code": null,
"target_reached_at": null,
"promoter_id": 6481069,
"campaign_id": 18747,
"referral_link": "https://lastechworld.com?fpr=2hpqscnv",
"current_offer": null,
"current_referral_reward": {
"id": 94230,
"amount": 0,
"type": "per_referral",
"unit": "cash",
"name": "20% recurring commission",
"per_of_sale": 20,
"default_promo_code": ""
},
"current_promotion_reward": null,
"current_target_reward": null,
"campaign_name": "Publishers & marketing Partners",
"hidden": true,
"visitors_count": 0,
"leads_count": 1,
"customers_count": 1,
"refunds_count": 2,
"cancellations_count": 3,
"sales_count": 2,
"sales_total": 72400,
"refunds_total": -72400,
"active_customers_count": 0
}
]
}"Bad credentials"{
"error": "Promoter not found."
}{
"error": "You need to find the promoter either by id, cust_id, auth_token, ref_id or promoter_email"
}Query Parameters
Response
Success response