Update
curl --request PATCH \
--url https://{defaultHost}/v1/affiliation_protocol \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"affiliation_protocol": {
"enabled": false,
"commission_structure": {
"percent_commission": 33.33
}
}
}
'import requests
url = "https://{defaultHost}/v1/affiliation_protocol"
payload = { "affiliation_protocol": {
"enabled": False,
"commission_structure": { "percent_commission": 33.33 }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
affiliation_protocol: {enabled: false, commission_structure: {percent_commission: 33.33}}
})
};
fetch('https://{defaultHost}/v1/affiliation_protocol', 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://{defaultHost}/v1/affiliation_protocol",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'affiliation_protocol' => [
'enabled' => false,
'commission_structure' => [
'percent_commission' => 33.33
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{defaultHost}/v1/affiliation_protocol"
payload := strings.NewReader("{\n \"affiliation_protocol\": {\n \"enabled\": false,\n \"commission_structure\": {\n \"percent_commission\": 33.33\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://{defaultHost}/v1/affiliation_protocol")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"affiliation_protocol\": {\n \"enabled\": false,\n \"commission_structure\": {\n \"percent_commission\": 33.33\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/affiliation_protocol")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"affiliation_protocol\": {\n \"enabled\": false,\n \"commission_structure\": {\n \"percent_commission\": 33.33\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "ea739734-1a97-4f32-90bd-533b8a7e17c7",
"object": "affiliation_protocol",
"affiliation_request_bio_label": null,
"affiliation_request_payout_email_enabled": false,
"auto_approve_affiliations": false,
"auto_approve_referrals": false,
"description": null,
"enabled": false,
"external_portal_enabled": false,
"external_portal_url": null,
"payout_description": null,
"portal_back_url": null,
"portal_heading": "Affiliate Portal",
"portal_description": "View your referrals, clicks, payout history, and manage your affiliate account.",
"referral_urls": [],
"referrer_type": "last",
"terms_url": null,
"tracking_length_days": 30,
"wordpress_plugin_tracking_enabled": true,
"zero_commission_amount_referrals_enabled": true,
"commission_structure": "2283e665-cd92-4c37-8ed8-5fc05557e1b7",
"created_at": 1796063912,
"updated_at": 1796063912
}Affiliation Protocols
Update
Updates the current account’s affiliation protocol.
PATCH
/
v1
/
affiliation_protocol
Update
curl --request PATCH \
--url https://{defaultHost}/v1/affiliation_protocol \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"affiliation_protocol": {
"enabled": false,
"commission_structure": {
"percent_commission": 33.33
}
}
}
'import requests
url = "https://{defaultHost}/v1/affiliation_protocol"
payload = { "affiliation_protocol": {
"enabled": False,
"commission_structure": { "percent_commission": 33.33 }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
affiliation_protocol: {enabled: false, commission_structure: {percent_commission: 33.33}}
})
};
fetch('https://{defaultHost}/v1/affiliation_protocol', 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://{defaultHost}/v1/affiliation_protocol",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'affiliation_protocol' => [
'enabled' => false,
'commission_structure' => [
'percent_commission' => 33.33
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{defaultHost}/v1/affiliation_protocol"
payload := strings.NewReader("{\n \"affiliation_protocol\": {\n \"enabled\": false,\n \"commission_structure\": {\n \"percent_commission\": 33.33\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://{defaultHost}/v1/affiliation_protocol")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"affiliation_protocol\": {\n \"enabled\": false,\n \"commission_structure\": {\n \"percent_commission\": 33.33\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/affiliation_protocol")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"affiliation_protocol\": {\n \"enabled\": false,\n \"commission_structure\": {\n \"percent_commission\": 33.33\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "ea739734-1a97-4f32-90bd-533b8a7e17c7",
"object": "affiliation_protocol",
"affiliation_request_bio_label": null,
"affiliation_request_payout_email_enabled": false,
"auto_approve_affiliations": false,
"auto_approve_referrals": false,
"description": null,
"enabled": false,
"external_portal_enabled": false,
"external_portal_url": null,
"payout_description": null,
"portal_back_url": null,
"portal_heading": "Affiliate Portal",
"portal_description": "View your referrals, clicks, payout history, and manage your affiliate account.",
"referral_urls": [],
"referrer_type": "last",
"terms_url": null,
"tracking_length_days": 30,
"wordpress_plugin_tracking_enabled": true,
"zero_commission_amount_referrals_enabled": true,
"commission_structure": "2283e665-cd92-4c37-8ed8-5fc05557e1b7",
"created_at": 1796063912,
"updated_at": 1796063912
}Authorizations
Response
200 - application/json
Success
Was this page helpful?