Create Affiliate Tier
curl --request POST \
--url https://api.eflow.team/v1/networks/affiliatetiers \
--header 'Content-Type: application/json' \
--header 'X-Eflow-Api-Key: <api-key>' \
--data '
{
"name": "Gold10",
"status": "active",
"description": "Top performing partners",
"network_affiliate_ids": [
14,
21,
35
],
"payout_margin": 10,
"is_default_tier": false,
"labels": [
"gold",
"premium"
]
}
'import requests
url = "https://api.eflow.team/v1/networks/affiliatetiers"
payload = {
"name": "Gold10",
"status": "active",
"description": "Top performing partners",
"network_affiliate_ids": [14, 21, 35],
"payout_margin": 10,
"is_default_tier": False,
"labels": ["gold", "premium"]
}
headers = {
"X-Eflow-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Eflow-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Gold10',
status: 'active',
description: 'Top performing partners',
network_affiliate_ids: [14, 21, 35],
payout_margin: 10,
is_default_tier: false,
labels: ['gold', 'premium']
})
};
fetch('https://api.eflow.team/v1/networks/affiliatetiers', 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.eflow.team/v1/networks/affiliatetiers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Gold10',
'status' => 'active',
'description' => 'Top performing partners',
'network_affiliate_ids' => [
14,
21,
35
],
'payout_margin' => 10,
'is_default_tier' => false,
'labels' => [
'gold',
'premium'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Eflow-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eflow.team/v1/networks/affiliatetiers"
payload := strings.NewReader("{\n \"name\": \"Gold10\",\n \"status\": \"active\",\n \"description\": \"Top performing partners\",\n \"network_affiliate_ids\": [\n 14,\n 21,\n 35\n ],\n \"payout_margin\": 10,\n \"is_default_tier\": false,\n \"labels\": [\n \"gold\",\n \"premium\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Eflow-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eflow.team/v1/networks/affiliatetiers")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Gold10\",\n \"status\": \"active\",\n \"description\": \"Top performing partners\",\n \"network_affiliate_ids\": [\n 14,\n 21,\n 35\n ],\n \"payout_margin\": 10,\n \"is_default_tier\": false,\n \"labels\": [\n \"gold\",\n \"premium\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eflow.team/v1/networks/affiliatetiers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Eflow-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Gold10\",\n \"status\": \"active\",\n \"description\": \"Top performing partners\",\n \"network_affiliate_ids\": [\n 14,\n 21,\n 35\n ],\n \"payout_margin\": 10,\n \"is_default_tier\": false,\n \"labels\": [\n \"gold\",\n \"premium\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"network_affiliate_tier_id": 2,
"network_id": 1,
"name": "Gold10",
"status": "active",
"description": "Top performing partners",
"network_affiliate_ids": [
14,
21,
35
],
"payout_margin": 10,
"is_default_tier": false,
"time_created": 1774620705,
"time_saved": 1774620705
}Affiliate Tiers
Create Affiliate Tier
POST
/
networks
/
affiliatetiers
Create Affiliate Tier
curl --request POST \
--url https://api.eflow.team/v1/networks/affiliatetiers \
--header 'Content-Type: application/json' \
--header 'X-Eflow-Api-Key: <api-key>' \
--data '
{
"name": "Gold10",
"status": "active",
"description": "Top performing partners",
"network_affiliate_ids": [
14,
21,
35
],
"payout_margin": 10,
"is_default_tier": false,
"labels": [
"gold",
"premium"
]
}
'import requests
url = "https://api.eflow.team/v1/networks/affiliatetiers"
payload = {
"name": "Gold10",
"status": "active",
"description": "Top performing partners",
"network_affiliate_ids": [14, 21, 35],
"payout_margin": 10,
"is_default_tier": False,
"labels": ["gold", "premium"]
}
headers = {
"X-Eflow-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Eflow-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Gold10',
status: 'active',
description: 'Top performing partners',
network_affiliate_ids: [14, 21, 35],
payout_margin: 10,
is_default_tier: false,
labels: ['gold', 'premium']
})
};
fetch('https://api.eflow.team/v1/networks/affiliatetiers', 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.eflow.team/v1/networks/affiliatetiers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Gold10',
'status' => 'active',
'description' => 'Top performing partners',
'network_affiliate_ids' => [
14,
21,
35
],
'payout_margin' => 10,
'is_default_tier' => false,
'labels' => [
'gold',
'premium'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Eflow-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eflow.team/v1/networks/affiliatetiers"
payload := strings.NewReader("{\n \"name\": \"Gold10\",\n \"status\": \"active\",\n \"description\": \"Top performing partners\",\n \"network_affiliate_ids\": [\n 14,\n 21,\n 35\n ],\n \"payout_margin\": 10,\n \"is_default_tier\": false,\n \"labels\": [\n \"gold\",\n \"premium\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Eflow-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eflow.team/v1/networks/affiliatetiers")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Gold10\",\n \"status\": \"active\",\n \"description\": \"Top performing partners\",\n \"network_affiliate_ids\": [\n 14,\n 21,\n 35\n ],\n \"payout_margin\": 10,\n \"is_default_tier\": false,\n \"labels\": [\n \"gold\",\n \"premium\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eflow.team/v1/networks/affiliatetiers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Eflow-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Gold10\",\n \"status\": \"active\",\n \"description\": \"Top performing partners\",\n \"network_affiliate_ids\": [\n 14,\n 21,\n 35\n ],\n \"payout_margin\": 10,\n \"is_default_tier\": false,\n \"labels\": [\n \"gold\",\n \"premium\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"network_affiliate_tier_id": 2,
"network_id": 1,
"name": "Gold10",
"status": "active",
"description": "Top performing partners",
"network_affiliate_ids": [
14,
21,
35
],
"payout_margin": 10,
"is_default_tier": false,
"time_created": 1774620705,
"time_saved": 1774620705
}Create a new affiliate tier. Tiers allow you to group affiliates and apply different payout margins based on performance or relationship level.
Authorizations
Body
application/json
Response
200 - application/json
Was this page helpful?
