Skip to main content
PUT
/
networks
/
affiliatetiers
/
{affiliateTierId}
Update Affiliate Tier
curl --request PUT \
  --url https://api.eflow.team/v1/networks/affiliatetiers/{affiliateTierId} \
  --header 'Content-Type: application/json' \
  --header 'X-Eflow-Api-Key: <api-key>' \
  --data '
{
  "name": "Platinum10",
  "status": "active",
  "description": "Example tier",
  "network_affiliate_ids": [
    1
  ],
  "payout_margin": 10,
  "is_default_tier": false,
  "labels": [
    "platinum",
    "premium"
  ]
}
'
import requests

url = "https://api.eflow.team/v1/networks/affiliatetiers/{affiliateTierId}"

payload = {
    "name": "Platinum10",
    "status": "active",
    "description": "Example tier",
    "network_affiliate_ids": [1],
    "payout_margin": 10,
    "is_default_tier": False,
    "labels": ["platinum", "premium"]
}
headers = {
    "X-Eflow-Api-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PUT',
  headers: {'X-Eflow-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: 'Platinum10',
    status: 'active',
    description: 'Example tier',
    network_affiliate_ids: [1],
    payout_margin: 10,
    is_default_tier: false,
    labels: ['platinum', 'premium']
  })
};

fetch('https://api.eflow.team/v1/networks/affiliatetiers/{affiliateTierId}', 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/{affiliateTierId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'Platinum10',
    'status' => 'active',
    'description' => 'Example tier',
    'network_affiliate_ids' => [
        1
    ],
    'payout_margin' => 10,
    'is_default_tier' => false,
    'labels' => [
        'platinum',
        '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/{affiliateTierId}"

	payload := strings.NewReader("{\n  \"name\": \"Platinum10\",\n  \"status\": \"active\",\n  \"description\": \"Example tier\",\n  \"network_affiliate_ids\": [\n    1\n  ],\n  \"payout_margin\": 10,\n  \"is_default_tier\": false,\n  \"labels\": [\n    \"platinum\",\n    \"premium\"\n  ]\n}")

	req, _ := http.NewRequest("PUT", 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.put("https://api.eflow.team/v1/networks/affiliatetiers/{affiliateTierId}")
  .header("X-Eflow-Api-Key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Platinum10\",\n  \"status\": \"active\",\n  \"description\": \"Example tier\",\n  \"network_affiliate_ids\": [\n    1\n  ],\n  \"payout_margin\": 10,\n  \"is_default_tier\": false,\n  \"labels\": [\n    \"platinum\",\n    \"premium\"\n  ]\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.eflow.team/v1/networks/affiliatetiers/{affiliateTierId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-Eflow-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Platinum10\",\n  \"status\": \"active\",\n  \"description\": \"Example tier\",\n  \"network_affiliate_ids\": [\n    1\n  ],\n  \"payout_margin\": 10,\n  \"is_default_tier\": false,\n  \"labels\": [\n    \"platinum\",\n    \"premium\"\n  ]\n}"

response = http.request(request)
puts response.read_body
{
  "network_affiliate_tier_id": 1,
  "network_id": 1,
  "name": "Platinum10",
  "status": "active",
  "description": "Example tier",
  "network_affiliate_ids": [
    1
  ],
  "payout_margin": 10,
  "is_default_tier": false,
  "time_created": 1774620660,
  "time_saved": 1774620995
}
Update an existing affiliate tier. You must specify all the fields, not only the ones you wish to update. If you omit a field that is not marked as required, its default value will be used.

Authorizations

X-Eflow-Api-Key
string
header
required

The Everflow API key generated from the Control Center > Security.

Path Parameters

affiliateTierId
integer
required

The ID of the affiliate tier you want to update.

Body

application/json
name
string
required

The name of the affiliate tier.

status
enum<string>
required

Status of the affiliate tier. Can be one of the following values - active, paused or deleted.

Available options:
active,
paused,
deleted
payout_margin
number
required

The payout margin percentage applied to affiliates in this tier.

is_default_tier
boolean
required

Whether or not the affiliate tier will be automatically tied to all new partners.

description
string

Optional description of the affiliate tier.

network_affiliate_ids
integer[] | null

IDs of the affiliates to assign to this tier.

labels
string[]

List of labels to associate with the affiliate tier.

Response

network_affiliate_tier_id
integer

The unique ID of the affiliate tier.

network_id
integer

The ID of the network this tier belongs to.

name
string

The name of the affiliate tier.

status
enum<string>

Status of the affiliate tier. Can be one of the following values - active, paused or deleted.

Available options:
active,
paused,
deleted
description
string

Optional description of the affiliate tier.

network_affiliate_ids
integer[] | null

IDs of the affiliates assigned to this tier.

payout_margin
number

The affiliate's payout margin.

is_default_tier
boolean

Whether or not the affiliate tier will be automatically tied to all new partners.

time_created
integer

Unix timestamp of creation.

Example:

1734455015

time_saved
integer

Unix timestamp of last update.

Example:

1734455015

relationship
object

Related data for this affiliate tier. Populate by passing the relationship query parameter (e.g. ?relationship=all).