Skip to main content
POST
/
networks
/
affiliates
/
{affiliateId}
/
trackingdomains
Create Affiliate Tracking Domain
curl --request POST \
  --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,
  "is_apply_all_offers": false,
  "network_offer_ids": [
    1,
    25
  ]
}
'
import requests

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

payload = {
"network_affiliate_id": 7,
"network_tracking_domain_id": 1,
"is_apply_all_offers": False,
"network_offer_ids": [1, 25]
}
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({
network_affiliate_id: 7,
network_tracking_domain_id: 1,
is_apply_all_offers: false,
network_offer_ids: [1, 25]
})
};

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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'network_affiliate_id' => 7,
'network_tracking_domain_id' => 1,
'is_apply_all_offers' => false,
'network_offer_ids' => [
1,
25
]
]),
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 \"is_apply_all_offers\": false,\n \"network_offer_ids\": [\n 1,\n 25\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/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 \"is_apply_all_offers\": false,\n \"network_offer_ids\": [\n 1,\n 25\n ]\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::Post.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 \"is_apply_all_offers\": false,\n \"network_offer_ids\": [\n 1,\n 25\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "tracking_domains": [
    {
      "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"
        }
      }
    },
    {
      "network_affiliate_tracking_domain_id": 5,
      "network_id": 1,
      "network_affiliate_id": 7,
      "network_tracking_domain_id": 1,
      "is_apply_all_offers": false,
      "network_offer_id": 25,
      "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": 25,
          "network_id": 1,
          "network_advertiser_id": 13,
          "network_offer_group_id": 0,
          "name": "Travel Daily",
          "offer_status": "active",
          "network_tracking_domain_id": 1,
          "visibility": "private",
          "currency_id": "USD"
        }
      }
    }
  ]
}
Assign a tracking domain to an affiliate. You can apply the domain to all offers or specify individual offer IDs. Note: If is_apply_all_offers is set to true but network_offer_ids contains offer IDs, the backend will override is_apply_all_offers to false and create one assignment per offer ID.

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.

is_apply_all_offers
boolean
required

Whether to apply this tracking domain to all offers.

network_offer_ids
integer[]
required

List of offer IDs to apply this tracking domain to.

Response

200 - application/json
tracking_domains
object[]

List of created affiliate tracking domain assignments.