Get current promoter
curl --request GET \
--url https://api.firstpromoter.com/api/v2/affiliate/promoters/current \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/affiliate/promoters/current"
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Account-ID': '<account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.firstpromoter.com/api/v2/affiliate/promoters/current', 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://api.firstpromoter.com/api/v2/affiliate/promoters/current",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>"
],
]);
$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://api.firstpromoter.com/api/v2/affiliate/promoters/current"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firstpromoter.com/api/v2/affiliate/promoters/current")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/affiliate/promoters/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"email": "<string>",
"name": "<string>",
"stats": {
"clicks_count": 123,
"referrals_count": 123,
"sales_count": 123,
"customers_count": 123,
"revenue_amount": 123,
"active_customers_count": 123
},
"balances": {},
"custom_fields": {},
"first_event_at": "2023-11-07T05:31:56Z",
"invoice_details_status": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"selected_payout_method": "<string>",
"pending_contract_documents": [
"<string>"
],
"profile": {
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"website": "<string>",
"company_name": "<string>",
"phone_number": "<string>",
"vat_id": "<string>",
"country": "<string>",
"address": "<string>",
"avatar": "<string>",
"instagram_url": "<string>",
"youtube_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"twitter_url": "<string>",
"twitch_url": "<string>",
"tiktok_url": "<string>"
},
"promoter_campaigns": [
{
"id": 123,
"campaign_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"campaign": {
"id": 123,
"name": "<string>",
"color": "<string>"
},
"state": "<string>",
"promoter_id": 123,
"stats": {
"clicks_count": 123,
"referrals_count": 123,
"sales_count": 123,
"customers_count": 123,
"revenue_amount": 123
},
"ref_token": "<string>",
"ref_link": "<string>",
"has_monetary_rewards": true
}
],
"is_confirmed": true
}{}{
"message": "<string>",
"code": "<string>"
}Affiliate Promoters
Get current promoter
GET
/
promoters
/
current
Get current promoter
curl --request GET \
--url https://api.firstpromoter.com/api/v2/affiliate/promoters/current \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.firstpromoter.com/api/v2/affiliate/promoters/current"
headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Account-ID': '<account-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.firstpromoter.com/api/v2/affiliate/promoters/current', 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://api.firstpromoter.com/api/v2/affiliate/promoters/current",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"Authorization: Bearer <token>"
],
]);
$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://api.firstpromoter.com/api/v2/affiliate/promoters/current"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Account-ID", "<account-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firstpromoter.com/api/v2/affiliate/promoters/current")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstpromoter.com/api/v2/affiliate/promoters/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"email": "<string>",
"name": "<string>",
"stats": {
"clicks_count": 123,
"referrals_count": 123,
"sales_count": 123,
"customers_count": 123,
"revenue_amount": 123,
"active_customers_count": 123
},
"balances": {},
"custom_fields": {},
"first_event_at": "2023-11-07T05:31:56Z",
"invoice_details_status": "<string>",
"joined_at": "2023-11-07T05:31:56Z",
"selected_payout_method": "<string>",
"pending_contract_documents": [
"<string>"
],
"profile": {
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"website": "<string>",
"company_name": "<string>",
"phone_number": "<string>",
"vat_id": "<string>",
"country": "<string>",
"address": "<string>",
"avatar": "<string>",
"instagram_url": "<string>",
"youtube_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"twitter_url": "<string>",
"twitch_url": "<string>",
"tiktok_url": "<string>"
},
"promoter_campaigns": [
{
"id": 123,
"campaign_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"campaign": {
"id": 123,
"name": "<string>",
"color": "<string>"
},
"state": "<string>",
"promoter_id": 123,
"stats": {
"clicks_count": 123,
"referrals_count": 123,
"sales_count": 123,
"customers_count": 123,
"revenue_amount": 123
},
"ref_token": "<string>",
"ref_link": "<string>",
"has_monetary_rewards": true
}
],
"is_confirmed": true
}{}{
"message": "<string>",
"code": "<string>"
}Authorizations
Access token passed as a Bearer token in the Authorization header
Headers
Account identifier that specifies which account is making the request
Example:
"acc_123456"
Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I