curl --request POST \
--url https://{domain}/api/v2/network/commission-plan \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "string",
"product": 1,
"status": 1,
"currency": "USD",
"traffic_source_ids": [
1
],
"traffic_approaches_ids": [
1
],
"assigned_to": [
1
]
}
'import requests
url = "https://{domain}/api/v2/network/commission-plan"
payload = {
"title": "string",
"product": 1,
"status": 1,
"currency": "USD",
"traffic_source_ids": [1],
"traffic_approaches_ids": [1],
"assigned_to": [1]
}
headers = {
"X-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-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'string',
product: 1,
status: 1,
currency: 'USD',
traffic_source_ids: [1],
traffic_approaches_ids: [1],
assigned_to: [1]
})
};
fetch('https://{domain}/api/v2/network/commission-plan', 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://{domain}/api/v2/network/commission-plan",
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([
'title' => 'string',
'product' => 1,
'status' => 1,
'currency' => 'USD',
'traffic_source_ids' => [
1
],
'traffic_approaches_ids' => [
1
],
'assigned_to' => [
1
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://{domain}/api/v2/network/commission-plan"
payload := strings.NewReader("{\n \"title\": \"string\",\n \"product\": 1,\n \"status\": 1,\n \"currency\": \"USD\",\n \"traffic_source_ids\": [\n 1\n ],\n \"traffic_approaches_ids\": [\n 1\n ],\n \"assigned_to\": [\n 1\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://{domain}/api/v2/network/commission-plan")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"string\",\n \"product\": 1,\n \"status\": 1,\n \"currency\": \"USD\",\n \"traffic_source_ids\": [\n 1\n ],\n \"traffic_approaches_ids\": [\n 1\n ],\n \"assigned_to\": [\n 1\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/network/commission-plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"string\",\n \"product\": 1,\n \"status\": 1,\n \"currency\": \"USD\",\n \"traffic_source_ids\": [\n 1\n ],\n \"traffic_approaches_ids\": [\n 1\n ],\n \"assigned_to\": [\n 1\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 200,
"name": "OK",
"message": "<string>",
"info": {}
}{
"status": "error",
"code": 422,
"name": "Unprocessable Entity",
"message": "<string>",
"info": {
"errors": {}
}
}Create commission plan
Creates a new commission plan with CPA, RevShare, CPL, CPC, FlatFee, and/or LotBasedFee entities.
Each commission block (cpa, rev_share, cpl, cpc) requires enabled: true to activate, type to select the calculation method, and commission with the format matching the type. The flat_fee block has its own structure with commission, period, and start_date. Past dates are accepted for flat_fee.commission.start_date.
Commission types disabled in company settings cannot be submitted. Dependent features are validated independently: cpa.hold_period follows the CPA hold-period setting, cpl.hold_period follows the CPL hold-period setting, cap follows the CPA cap setting, and high_roller_policy_* follows the RevShare setting.
Deleted affiliates in assigned_to are ignored instead of triggering validation errors.
Important: product is the offer ID. Do NOT use the format {payout, revenue, currency} — it creates a plan with empty (null) commission data. Always use {enabled, type, commission} format.
curl --request POST \
--url https://{domain}/api/v2/network/commission-plan \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "string",
"product": 1,
"status": 1,
"currency": "USD",
"traffic_source_ids": [
1
],
"traffic_approaches_ids": [
1
],
"assigned_to": [
1
]
}
'import requests
url = "https://{domain}/api/v2/network/commission-plan"
payload = {
"title": "string",
"product": 1,
"status": 1,
"currency": "USD",
"traffic_source_ids": [1],
"traffic_approaches_ids": [1],
"assigned_to": [1]
}
headers = {
"X-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-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'string',
product: 1,
status: 1,
currency: 'USD',
traffic_source_ids: [1],
traffic_approaches_ids: [1],
assigned_to: [1]
})
};
fetch('https://{domain}/api/v2/network/commission-plan', 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://{domain}/api/v2/network/commission-plan",
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([
'title' => 'string',
'product' => 1,
'status' => 1,
'currency' => 'USD',
'traffic_source_ids' => [
1
],
'traffic_approaches_ids' => [
1
],
'assigned_to' => [
1
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://{domain}/api/v2/network/commission-plan"
payload := strings.NewReader("{\n \"title\": \"string\",\n \"product\": 1,\n \"status\": 1,\n \"currency\": \"USD\",\n \"traffic_source_ids\": [\n 1\n ],\n \"traffic_approaches_ids\": [\n 1\n ],\n \"assigned_to\": [\n 1\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://{domain}/api/v2/network/commission-plan")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"string\",\n \"product\": 1,\n \"status\": 1,\n \"currency\": \"USD\",\n \"traffic_source_ids\": [\n 1\n ],\n \"traffic_approaches_ids\": [\n 1\n ],\n \"assigned_to\": [\n 1\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/network/commission-plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"string\",\n \"product\": 1,\n \"status\": 1,\n \"currency\": \"USD\",\n \"traffic_source_ids\": [\n 1\n ],\n \"traffic_approaches_ids\": [\n 1\n ],\n \"assigned_to\": [\n 1\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 200,
"name": "OK",
"message": "<string>",
"info": {}
}{
"status": "error",
"code": 422,
"name": "Unprocessable Entity",
"message": "<string>",
"info": {
"errors": {}
}
}Authorizations
Body
Was this page helpful?