Get affiliate profile
curl --request GET \
--url https://{domain}/api/v2/affiliate/profile \
--header 'X-API-Key: <api-key>'import requests
url = "https://{domain}/api/v2/affiliate/profile"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://{domain}/api/v2/affiliate/profile', 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://{domain}/api/v2/affiliate/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://{domain}/api/v2/affiliate/profile"
req, _ := http.NewRequest("GET", 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.get("https://{domain}/api/v2/affiliate/profile")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/affiliate/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 200,
"name": "OK",
"message": "<string>",
"info": {
"profile": {
"id": 123,
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"image": "<string>",
"contacts": "<string>",
"status": 123,
"api_status": 123,
"api_key": "<string>",
"api_whitelist": "203.0.113.10, 203.0.113.0/24",
"number_format_id": 123,
"date_format_id": 123,
"phone": "<string>",
"timezone": "<string>",
"role": "<string>",
"twoFA_enabled": 123,
"company_name": "<string>",
"payment_details": "<string>",
"custom_fields": "<string>",
"country": 123,
"region": "<string>",
"city": "<string>",
"address": "<string>",
"postal_code": "<string>",
"managers_assigned": "<string>"
}
}
}{
"message": "Request could not be parsed.",
"success": false,
"info": {
"errors": {}
}
}{
"message": "API key is invalid or missing.",
"success": false
}{
"message": "This endpoint is not available for your role.",
"success": false
}{
"message": "Resource not found.",
"success": false
}{
"message": "An unexpected error occurred.",
"success": false,
"info": {
"errors": {}
}
}Profile
Get affiliate profile
Returns the full profile of the authenticated affiliate.
GET
/
api
/
v2
/
affiliate
/
profile
Get affiliate profile
curl --request GET \
--url https://{domain}/api/v2/affiliate/profile \
--header 'X-API-Key: <api-key>'import requests
url = "https://{domain}/api/v2/affiliate/profile"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://{domain}/api/v2/affiliate/profile', 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://{domain}/api/v2/affiliate/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://{domain}/api/v2/affiliate/profile"
req, _ := http.NewRequest("GET", 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.get("https://{domain}/api/v2/affiliate/profile")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/affiliate/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 200,
"name": "OK",
"message": "<string>",
"info": {
"profile": {
"id": 123,
"email": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"image": "<string>",
"contacts": "<string>",
"status": 123,
"api_status": 123,
"api_key": "<string>",
"api_whitelist": "203.0.113.10, 203.0.113.0/24",
"number_format_id": 123,
"date_format_id": 123,
"phone": "<string>",
"timezone": "<string>",
"role": "<string>",
"twoFA_enabled": 123,
"company_name": "<string>",
"payment_details": "<string>",
"custom_fields": "<string>",
"country": 123,
"region": "<string>",
"city": "<string>",
"address": "<string>",
"postal_code": "<string>",
"managers_assigned": "<string>"
}
}
}{
"message": "Request could not be parsed.",
"success": false,
"info": {
"errors": {}
}
}{
"message": "API key is invalid or missing.",
"success": false
}{
"message": "This endpoint is not available for your role.",
"success": false
}{
"message": "Resource not found.",
"success": false
}{
"message": "An unexpected error occurred.",
"success": false,
"info": {
"errors": {}
}
}Authorizations
ApiKeyHeaderAuthApiKeyAuth
Preferred authentication method. Pass the API key in the X-API-Key HTTP request header. The user account must have api_status enabled.
Was this page helpful?
⌘I