Update Affiliate
curl --request PUT \
--url https://api.eflow.team/v1/networks/affiliates/{affiliateId} \
--header 'Content-Type: application/json' \
--header 'X-Eflow-Api-Key: <api-key>' \
--data '
{
"name": "Updated Affiliate Name",
"account_status": "active",
"network_employee_id": 2,
"default_currency_id": "USD",
"internal_notes": "Updated notes",
"enable_media_cost_tracking_links": true,
"is_contact_address_enabled": true,
"network_affiliate_tier_id": 1,
"contact_address": {
"address_1": "456 Oak Ave",
"address_2": "Floor 3",
"city": "San Francisco",
"region_code": "CA",
"country_code": "US",
"zip_postal_code": "94102"
},
"labels": [
"premium",
"media-buyer"
],
"billing": {
"billing_frequency": "monthly",
"payment_type": "none",
"details": {
"day_of_month": 1
},
"billing": {}
}
}
'import requests
url = "https://api.eflow.team/v1/networks/affiliates/{affiliateId}"
payload = {
"name": "Updated Affiliate Name",
"account_status": "active",
"network_employee_id": 2,
"default_currency_id": "USD",
"internal_notes": "Updated notes",
"enable_media_cost_tracking_links": True,
"is_contact_address_enabled": True,
"network_affiliate_tier_id": 1,
"contact_address": {
"address_1": "456 Oak Ave",
"address_2": "Floor 3",
"city": "San Francisco",
"region_code": "CA",
"country_code": "US",
"zip_postal_code": "94102"
},
"labels": ["premium", "media-buyer"],
"billing": {
"billing_frequency": "monthly",
"payment_type": "none",
"details": { "day_of_month": 1 },
"billing": {}
}
}
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: 'Updated Affiliate Name',
account_status: 'active',
network_employee_id: 2,
default_currency_id: 'USD',
internal_notes: 'Updated notes',
enable_media_cost_tracking_links: true,
is_contact_address_enabled: true,
network_affiliate_tier_id: 1,
contact_address: {
address_1: '456 Oak Ave',
address_2: 'Floor 3',
city: 'San Francisco',
region_code: 'CA',
country_code: 'US',
zip_postal_code: '94102'
},
labels: ['premium', 'media-buyer'],
billing: {
billing_frequency: 'monthly',
payment_type: 'none',
details: {day_of_month: 1},
billing: {}
}
})
};
fetch('https://api.eflow.team/v1/networks/affiliates/{affiliateId}', 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}",
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' => 'Updated Affiliate Name',
'account_status' => 'active',
'network_employee_id' => 2,
'default_currency_id' => 'USD',
'internal_notes' => 'Updated notes',
'enable_media_cost_tracking_links' => true,
'is_contact_address_enabled' => true,
'network_affiliate_tier_id' => 1,
'contact_address' => [
'address_1' => '456 Oak Ave',
'address_2' => 'Floor 3',
'city' => 'San Francisco',
'region_code' => 'CA',
'country_code' => 'US',
'zip_postal_code' => '94102'
],
'labels' => [
'premium',
'media-buyer'
],
'billing' => [
'billing_frequency' => 'monthly',
'payment_type' => 'none',
'details' => [
'day_of_month' => 1
],
'billing' => [
]
]
]),
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}"
payload := strings.NewReader("{\n \"name\": \"Updated Affiliate Name\",\n \"account_status\": \"active\",\n \"network_employee_id\": 2,\n \"default_currency_id\": \"USD\",\n \"internal_notes\": \"Updated notes\",\n \"enable_media_cost_tracking_links\": true,\n \"is_contact_address_enabled\": true,\n \"network_affiliate_tier_id\": 1,\n \"contact_address\": {\n \"address_1\": \"456 Oak Ave\",\n \"address_2\": \"Floor 3\",\n \"city\": \"San Francisco\",\n \"region_code\": \"CA\",\n \"country_code\": \"US\",\n \"zip_postal_code\": \"94102\"\n },\n \"labels\": [\n \"premium\",\n \"media-buyer\"\n ],\n \"billing\": {\n \"billing_frequency\": \"monthly\",\n \"payment_type\": \"none\",\n \"details\": {\n \"day_of_month\": 1\n },\n \"billing\": {}\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/affiliates/{affiliateId}")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Affiliate Name\",\n \"account_status\": \"active\",\n \"network_employee_id\": 2,\n \"default_currency_id\": \"USD\",\n \"internal_notes\": \"Updated notes\",\n \"enable_media_cost_tracking_links\": true,\n \"is_contact_address_enabled\": true,\n \"network_affiliate_tier_id\": 1,\n \"contact_address\": {\n \"address_1\": \"456 Oak Ave\",\n \"address_2\": \"Floor 3\",\n \"city\": \"San Francisco\",\n \"region_code\": \"CA\",\n \"country_code\": \"US\",\n \"zip_postal_code\": \"94102\"\n },\n \"labels\": [\n \"premium\",\n \"media-buyer\"\n ],\n \"billing\": {\n \"billing_frequency\": \"monthly\",\n \"payment_type\": \"none\",\n \"details\": {\n \"day_of_month\": 1\n },\n \"billing\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eflow.team/v1/networks/affiliates/{affiliateId}")
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\": \"Updated Affiliate Name\",\n \"account_status\": \"active\",\n \"network_employee_id\": 2,\n \"default_currency_id\": \"USD\",\n \"internal_notes\": \"Updated notes\",\n \"enable_media_cost_tracking_links\": true,\n \"is_contact_address_enabled\": true,\n \"network_affiliate_tier_id\": 1,\n \"contact_address\": {\n \"address_1\": \"456 Oak Ave\",\n \"address_2\": \"Floor 3\",\n \"city\": \"San Francisco\",\n \"region_code\": \"CA\",\n \"country_code\": \"US\",\n \"zip_postal_code\": \"94102\"\n },\n \"labels\": [\n \"premium\",\n \"media-buyer\"\n ],\n \"billing\": {\n \"billing_frequency\": \"monthly\",\n \"payment_type\": \"none\",\n \"details\": {\n \"day_of_month\": 1\n },\n \"billing\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"network_affiliate_id": 123,
"network_id": 123,
"name": "<string>",
"account_status": "active",
"network_employee_id": 123,
"internal_notes": "<string>",
"default_currency_id": "<string>",
"enable_media_cost_tracking_links": true,
"is_contact_address_enabled": true,
"has_notifications": true,
"network_traffic_source_id": 123,
"account_executive_id": 123,
"adress_id": 123,
"address_id": 123,
"referrer_id": 123,
"time_created": 1734455015,
"time_saved": 1734455015,
"relationship": {
"labels": {
"total": 123,
"entries": [
"<string>"
]
},
"account_manager": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"work_phone": "<string>",
"cell_phone": "<string>",
"instant_messaging_id": 123,
"instant_messaging_identifier": "<string>"
},
"encoded_value": "<string>",
"ios_app_sources": {
"total": 123,
"entries": [
{}
]
},
"users": {
"total": 123,
"entries": [
{}
]
},
"overrides": {
"total": 123,
"entries": [
{
"is_visible": true,
"variable": "adv1"
}
]
}
}
}Affiliates
Update Affiliate
PUT
/
networks
/
affiliates
/
{affiliateId}
Update Affiliate
curl --request PUT \
--url https://api.eflow.team/v1/networks/affiliates/{affiliateId} \
--header 'Content-Type: application/json' \
--header 'X-Eflow-Api-Key: <api-key>' \
--data '
{
"name": "Updated Affiliate Name",
"account_status": "active",
"network_employee_id": 2,
"default_currency_id": "USD",
"internal_notes": "Updated notes",
"enable_media_cost_tracking_links": true,
"is_contact_address_enabled": true,
"network_affiliate_tier_id": 1,
"contact_address": {
"address_1": "456 Oak Ave",
"address_2": "Floor 3",
"city": "San Francisco",
"region_code": "CA",
"country_code": "US",
"zip_postal_code": "94102"
},
"labels": [
"premium",
"media-buyer"
],
"billing": {
"billing_frequency": "monthly",
"payment_type": "none",
"details": {
"day_of_month": 1
},
"billing": {}
}
}
'import requests
url = "https://api.eflow.team/v1/networks/affiliates/{affiliateId}"
payload = {
"name": "Updated Affiliate Name",
"account_status": "active",
"network_employee_id": 2,
"default_currency_id": "USD",
"internal_notes": "Updated notes",
"enable_media_cost_tracking_links": True,
"is_contact_address_enabled": True,
"network_affiliate_tier_id": 1,
"contact_address": {
"address_1": "456 Oak Ave",
"address_2": "Floor 3",
"city": "San Francisco",
"region_code": "CA",
"country_code": "US",
"zip_postal_code": "94102"
},
"labels": ["premium", "media-buyer"],
"billing": {
"billing_frequency": "monthly",
"payment_type": "none",
"details": { "day_of_month": 1 },
"billing": {}
}
}
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: 'Updated Affiliate Name',
account_status: 'active',
network_employee_id: 2,
default_currency_id: 'USD',
internal_notes: 'Updated notes',
enable_media_cost_tracking_links: true,
is_contact_address_enabled: true,
network_affiliate_tier_id: 1,
contact_address: {
address_1: '456 Oak Ave',
address_2: 'Floor 3',
city: 'San Francisco',
region_code: 'CA',
country_code: 'US',
zip_postal_code: '94102'
},
labels: ['premium', 'media-buyer'],
billing: {
billing_frequency: 'monthly',
payment_type: 'none',
details: {day_of_month: 1},
billing: {}
}
})
};
fetch('https://api.eflow.team/v1/networks/affiliates/{affiliateId}', 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}",
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' => 'Updated Affiliate Name',
'account_status' => 'active',
'network_employee_id' => 2,
'default_currency_id' => 'USD',
'internal_notes' => 'Updated notes',
'enable_media_cost_tracking_links' => true,
'is_contact_address_enabled' => true,
'network_affiliate_tier_id' => 1,
'contact_address' => [
'address_1' => '456 Oak Ave',
'address_2' => 'Floor 3',
'city' => 'San Francisco',
'region_code' => 'CA',
'country_code' => 'US',
'zip_postal_code' => '94102'
],
'labels' => [
'premium',
'media-buyer'
],
'billing' => [
'billing_frequency' => 'monthly',
'payment_type' => 'none',
'details' => [
'day_of_month' => 1
],
'billing' => [
]
]
]),
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}"
payload := strings.NewReader("{\n \"name\": \"Updated Affiliate Name\",\n \"account_status\": \"active\",\n \"network_employee_id\": 2,\n \"default_currency_id\": \"USD\",\n \"internal_notes\": \"Updated notes\",\n \"enable_media_cost_tracking_links\": true,\n \"is_contact_address_enabled\": true,\n \"network_affiliate_tier_id\": 1,\n \"contact_address\": {\n \"address_1\": \"456 Oak Ave\",\n \"address_2\": \"Floor 3\",\n \"city\": \"San Francisco\",\n \"region_code\": \"CA\",\n \"country_code\": \"US\",\n \"zip_postal_code\": \"94102\"\n },\n \"labels\": [\n \"premium\",\n \"media-buyer\"\n ],\n \"billing\": {\n \"billing_frequency\": \"monthly\",\n \"payment_type\": \"none\",\n \"details\": {\n \"day_of_month\": 1\n },\n \"billing\": {}\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/affiliates/{affiliateId}")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Affiliate Name\",\n \"account_status\": \"active\",\n \"network_employee_id\": 2,\n \"default_currency_id\": \"USD\",\n \"internal_notes\": \"Updated notes\",\n \"enable_media_cost_tracking_links\": true,\n \"is_contact_address_enabled\": true,\n \"network_affiliate_tier_id\": 1,\n \"contact_address\": {\n \"address_1\": \"456 Oak Ave\",\n \"address_2\": \"Floor 3\",\n \"city\": \"San Francisco\",\n \"region_code\": \"CA\",\n \"country_code\": \"US\",\n \"zip_postal_code\": \"94102\"\n },\n \"labels\": [\n \"premium\",\n \"media-buyer\"\n ],\n \"billing\": {\n \"billing_frequency\": \"monthly\",\n \"payment_type\": \"none\",\n \"details\": {\n \"day_of_month\": 1\n },\n \"billing\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eflow.team/v1/networks/affiliates/{affiliateId}")
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\": \"Updated Affiliate Name\",\n \"account_status\": \"active\",\n \"network_employee_id\": 2,\n \"default_currency_id\": \"USD\",\n \"internal_notes\": \"Updated notes\",\n \"enable_media_cost_tracking_links\": true,\n \"is_contact_address_enabled\": true,\n \"network_affiliate_tier_id\": 1,\n \"contact_address\": {\n \"address_1\": \"456 Oak Ave\",\n \"address_2\": \"Floor 3\",\n \"city\": \"San Francisco\",\n \"region_code\": \"CA\",\n \"country_code\": \"US\",\n \"zip_postal_code\": \"94102\"\n },\n \"labels\": [\n \"premium\",\n \"media-buyer\"\n ],\n \"billing\": {\n \"billing_frequency\": \"monthly\",\n \"payment_type\": \"none\",\n \"details\": {\n \"day_of_month\": 1\n },\n \"billing\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"network_affiliate_id": 123,
"network_id": 123,
"name": "<string>",
"account_status": "active",
"network_employee_id": 123,
"internal_notes": "<string>",
"default_currency_id": "<string>",
"enable_media_cost_tracking_links": true,
"is_contact_address_enabled": true,
"has_notifications": true,
"network_traffic_source_id": 123,
"account_executive_id": 123,
"adress_id": 123,
"address_id": 123,
"referrer_id": 123,
"time_created": 1734455015,
"time_saved": 1734455015,
"relationship": {
"labels": {
"total": 123,
"entries": [
"<string>"
]
},
"account_manager": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"work_phone": "<string>",
"cell_phone": "<string>",
"instant_messaging_id": 123,
"instant_messaging_identifier": "<string>"
},
"encoded_value": "<string>",
"ios_app_sources": {
"total": 123,
"entries": [
{}
]
},
"users": {
"total": 123,
"entries": [
{}
]
},
"overrides": {
"total": 123,
"entries": [
{
"is_visible": true,
"variable": "adv1"
}
]
}
}
}Update an existing affiliate. Any omitted non-required fields will be reset to their defaults. Use the Bulk Edit endpoint if you only need to change specific fields. Note: you cannot add or update users when updating an affiliate. Use the Affiliate User endpoints instead.
Authorizations
Body
application/json
Response
Affiliate updated successfully.
An affiliate (partner) account in the network.
Was this page helpful?
