Skip to main content
PUT
/
networks
/
affiliates
/
{affiliateId}
/
trackingdomains
Update Affiliate Tracking Domain
curl --request PUT \
  --url https://api.eflow.team/v1/networks/affiliates/{affiliateId}/trackingdomains \
  --header 'Content-Type: application/json' \
  --header 'X-Eflow-Api-Key: <api-key>' \
  --data '
{
  "network_affiliate_id": 7,
  "network_tracking_domain_id": 1,
  "network_affiliate_tracking_domain_id": 4,
  "is_apply_all_offers": false,
  "network_offer_id": 1
}
'
import requests

url = "https://api.eflow.team/v1/networks/affiliates/{affiliateId}/trackingdomains"

payload = {
    "network_affiliate_id": 7,
    "network_tracking_domain_id": 1,
    "network_affiliate_tracking_domain_id": 4,
    "is_apply_all_offers": False,
    "network_offer_id": 1
}
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({
    network_affiliate_id: 7,
    network_tracking_domain_id: 1,
    network_affiliate_tracking_domain_id: 4,
    is_apply_all_offers: false,
    network_offer_id: 1
  })
};

fetch('https://api.eflow.team/v1/networks/affiliates/{affiliateId}/trackingdomains', 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/affiliates/{affiliateId}/trackingdomains",
  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([
    'network_affiliate_id' => 7,
    'network_tracking_domain_id' => 1,
    'network_affiliate_tracking_domain_id' => 4,
    'is_apply_all_offers' => false,
    'network_offer_id' => 1
  ]),
  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/affiliates/{affiliateId}/trackingdomains"

	payload := strings.NewReader("{\n  \"network_affiliate_id\": 7,\n  \"network_tracking_domain_id\": 1,\n  \"network_affiliate_tracking_domain_id\": 4,\n  \"is_apply_all_offers\": false,\n  \"network_offer_id\": 1\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/affiliates/{affiliateId}/trackingdomains")
  .header("X-Eflow-Api-Key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"network_affiliate_id\": 7,\n  \"network_tracking_domain_id\": 1,\n  \"network_affiliate_tracking_domain_id\": 4,\n  \"is_apply_all_offers\": false,\n  \"network_offer_id\": 1\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.eflow.team/v1/networks/affiliates/{affiliateId}/trackingdomains")

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  \"network_affiliate_id\": 7,\n  \"network_tracking_domain_id\": 1,\n  \"network_affiliate_tracking_domain_id\": 4,\n  \"is_apply_all_offers\": false,\n  \"network_offer_id\": 1\n}"

response = http.request(request)
puts response.read_body
{
  "network_affiliate_tracking_domain_id": 4,
  "network_id": 1,
  "network_affiliate_id": 7,
  "network_tracking_domain_id": 1,
  "is_apply_all_offers": false,
  "network_offer_id": 1,
  "relationship": {
    "affiliate": {
      "network_affiliate_id": 7,
      "network_id": 1,
      "name": "Partner A",
      "account_status": "active",
      "network_traffic_source_id": 0
    },
    "tracking_domain": {
      "network_tracking_domain_id": 1,
      "network_id": 1,
      "url": "www.testtracking.com",
      "is_primary_domain": true,
      "domain_status": "active",
      "is_unassignable": false,
      "ownership": "internal",
      "is_ssl_enabled": false,
      "html_static_redirect": "",
      "url_redirect": "",
      "public_notes": "",
      "time_created": 1774296114,
      "time_saved": 1774296114
    },
    "offer": {
      "network_offer_id": 1,
      "network_id": 1,
      "network_advertiser_id": 13,
      "network_offer_group_id": 0,
      "name": "Auto Game",
      "offer_status": "active",
      "network_tracking_domain_id": 1,
      "visibility": "public",
      "currency_id": "USD"
    }
  }
}
Update an existing affiliate tracking domain assignment. This is a full object replacement. Note: If is_apply_all_offers is set to true but a specific network_offer_id is provided, the backend will override is_apply_all_offers to false.

Authorizations

X-Eflow-Api-Key
string
header
required

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

Path Parameters

affiliateId
integer
required

The unique affiliate ID.

Body

application/json
network_affiliate_id
integer
required

The affiliate ID.

network_tracking_domain_id
integer
required

The tracking domain ID to assign.

network_affiliate_tracking_domain_id
integer
required

The ID of the affiliate tracking domain assignment to update.

is_apply_all_offers
boolean
required

Whether to apply this tracking domain to all offers.

network_offer_id
integer
required

The offer ID to apply this tracking domain to.

Response

200 - application/json
network_affiliate_tracking_domain_id
integer

Unique affiliate tracking domain assignment ID.

network_id
integer

Network ID.

network_affiliate_id
integer

Affiliate ID.

network_tracking_domain_id
integer

Tracking domain ID.

is_apply_all_offers
boolean

Whether this tracking domain applies to all offers.

network_offer_id
integer

The specific offer ID this domain is applied to.

relationship
object

Related data for this affiliate tracking domain assignment. Includes affiliate, tracking domain, and optionally offer details.