Skip to main content
POST
/
api
/
v2
/
network
/
commission-plan
Create commission plan
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

X-API-Key
string
header
required

Preferred authentication method. Pass the API key in the X-API-Key HTTP request header. The user account must have api_status enabled.

Body

application/json
title
string
required

Commission plan name.

product
integer
required

Offer ID.

status
integer

Status ID (e.g. 1=active).

currency
string | null

Currency code (e.g. USD, EUR). Only accepted when native_currency_commissions global setting is ON. Null or omitted = Brand Currency.

traffic_source_ids
integer[] | null

Traffic source IDs. Multi-select. null is accepted and treated as an empty array.

traffic_approaches_ids
integer[] | null

Traffic approaches IDs. null is accepted and treated as an empty array.

assigned_to
integer[]

Affiliate IDs. Deleted affiliates are ignored during validation and are not persisted.

is_default
boolean

Whether this is the default commission plan for the offer.

is_exclusive
boolean

Whether this plan is exclusive to assigned affiliates.

internal_notes
string

Internal notes for this commission plan.

assign_to_landing_page
integer

1=all, 2=specific.

landing_pages
integer[]

Offer URL IDs.

available_on_marketplace
boolean
geo
object
cpa
object
rev_share
object
cpl
object
cpc
object
flat_fee
object

Fixed recurring or one-time fee. Does NOT use type — always the same structure.

lot_based_fee
object
risk_management
object

Response

Commission plan created.

status
string
Example:

"success"

code
integer
Example:

200

name
string
Example:

"OK"

message
string
info
object

Created commission plan details.