curl --request PUT \
--url https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": 1,
"start_date": "2026-01-01",
"end_date": "",
"affiliates": "",
"conditions": [
{
"type": 2,
"permission": 2,
"conditions": [
1,
2
]
}
],
"parameters": [
{
"type": 9,
"cap_type": null,
"goal_id": "",
"parameter": "https://example.com/trafficback"
}
]
}
'import requests
url = "https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id}"
payload = {
"status": 1,
"start_date": "2026-01-01",
"end_date": "",
"affiliates": "",
"conditions": [
{
"type": 2,
"permission": 2,
"conditions": [1, 2]
}
],
"parameters": [
{
"type": 9,
"cap_type": None,
"goal_id": "",
"parameter": "https://example.com/trafficback"
}
]
}
headers = {
"X-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-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 1,
start_date: '2026-01-01',
end_date: '',
affiliates: '',
conditions: [{type: 2, permission: 2, conditions: [1, 2]}],
parameters: [
{
type: 9,
cap_type: null,
goal_id: '',
parameter: 'https://example.com/trafficback'
}
]
})
};
fetch('https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id}', 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/offers/{offer_id}/custom-params/{id}",
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([
'status' => 1,
'start_date' => '2026-01-01',
'end_date' => '',
'affiliates' => '',
'conditions' => [
[
'type' => 2,
'permission' => 2,
'conditions' => [
1,
2
]
]
],
'parameters' => [
[
'type' => 9,
'cap_type' => null,
'goal_id' => '',
'parameter' => 'https://example.com/trafficback'
]
]
]),
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/offers/{offer_id}/custom-params/{id}"
payload := strings.NewReader("{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"\",\n \"affiliates\": \"\",\n \"conditions\": [\n {\n \"type\": 2,\n \"permission\": 2,\n \"conditions\": [\n 1,\n 2\n ]\n }\n ],\n \"parameters\": [\n {\n \"type\": 9,\n \"cap_type\": null,\n \"goal_id\": \"\",\n \"parameter\": \"https://example.com/trafficback\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"\",\n \"affiliates\": \"\",\n \"conditions\": [\n {\n \"type\": 2,\n \"permission\": 2,\n \"conditions\": [\n 1,\n 2\n ]\n }\n ],\n \"parameters\": [\n {\n \"type\": 9,\n \"cap_type\": null,\n \"goal_id\": \"\",\n \"parameter\": \"https://example.com/trafficback\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"\",\n \"affiliates\": \"\",\n \"conditions\": [\n {\n \"type\": 2,\n \"permission\": 2,\n \"conditions\": [\n 1,\n 2\n ]\n }\n ],\n \"parameters\": [\n {\n \"type\": 9,\n \"cap_type\": null,\n \"goal_id\": \"\",\n \"parameter\": \"https://example.com/trafficback\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 200,
"name": "OK",
"message": "<string>",
"info": {
"custom-param": {
"id": 123,
"status": 123,
"affiliates": [
{
"id": 123,
"title": "<string>"
}
],
"start_date": "<string>",
"end_date": "<string>",
"conditions": [
{
"type": 123,
"permission": 123,
"conditions": [
{}
]
}
],
"parameters": [
{
"type": 123,
"parameter": "<string>",
"cap_type": 123,
"goal_id": {
"id": 123
}
}
],
"created": 123,
"updated": 123
}
}
}{
"status": "error",
"code": 400,
"name": "Bad Request",
"message": "Request could not be parsed.",
"info": {
"errors": {}
}
}{
"status": "error",
"code": 401,
"name": "Unauthorized",
"message": "API key is invalid or missing."
}{
"status": "error",
"code": 403,
"name": "Forbidden",
"message": "This endpoint is not available for your role."
}{
"status": "error",
"code": 404,
"name": "Not Found",
"message": "Resource not found."
}{
"status": "error",
"code": 422,
"name": "Unprocessable entity",
"message": "Validation error",
"info": {
"errors": {
"email": [
"Email cannot be blank."
],
"currency": [
"Currency must be a valid ISO code."
]
}
}
}{
"status": "error",
"code": 500,
"name": "Internal Server Error",
"message": "An unexpected error occurred.",
"info": {
"errors": {}
}
}Update custom param
Replaces an existing custom parameter rule. conditions and parameters are overwritten as a whole — send the complete arrays, not a partial patch.
curl --request PUT \
--url https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": 1,
"start_date": "2026-01-01",
"end_date": "",
"affiliates": "",
"conditions": [
{
"type": 2,
"permission": 2,
"conditions": [
1,
2
]
}
],
"parameters": [
{
"type": 9,
"cap_type": null,
"goal_id": "",
"parameter": "https://example.com/trafficback"
}
]
}
'import requests
url = "https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id}"
payload = {
"status": 1,
"start_date": "2026-01-01",
"end_date": "",
"affiliates": "",
"conditions": [
{
"type": 2,
"permission": 2,
"conditions": [1, 2]
}
],
"parameters": [
{
"type": 9,
"cap_type": None,
"goal_id": "",
"parameter": "https://example.com/trafficback"
}
]
}
headers = {
"X-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-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 1,
start_date: '2026-01-01',
end_date: '',
affiliates: '',
conditions: [{type: 2, permission: 2, conditions: [1, 2]}],
parameters: [
{
type: 9,
cap_type: null,
goal_id: '',
parameter: 'https://example.com/trafficback'
}
]
})
};
fetch('https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id}', 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/offers/{offer_id}/custom-params/{id}",
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([
'status' => 1,
'start_date' => '2026-01-01',
'end_date' => '',
'affiliates' => '',
'conditions' => [
[
'type' => 2,
'permission' => 2,
'conditions' => [
1,
2
]
]
],
'parameters' => [
[
'type' => 9,
'cap_type' => null,
'goal_id' => '',
'parameter' => 'https://example.com/trafficback'
]
]
]),
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/offers/{offer_id}/custom-params/{id}"
payload := strings.NewReader("{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"\",\n \"affiliates\": \"\",\n \"conditions\": [\n {\n \"type\": 2,\n \"permission\": 2,\n \"conditions\": [\n 1,\n 2\n ]\n }\n ],\n \"parameters\": [\n {\n \"type\": 9,\n \"cap_type\": null,\n \"goal_id\": \"\",\n \"parameter\": \"https://example.com/trafficback\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"\",\n \"affiliates\": \"\",\n \"conditions\": [\n {\n \"type\": 2,\n \"permission\": 2,\n \"conditions\": [\n 1,\n 2\n ]\n }\n ],\n \"parameters\": [\n {\n \"type\": 9,\n \"cap_type\": null,\n \"goal_id\": \"\",\n \"parameter\": \"https://example.com/trafficback\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/network/offers/{offer_id}/custom-params/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": 1,\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"\",\n \"affiliates\": \"\",\n \"conditions\": [\n {\n \"type\": 2,\n \"permission\": 2,\n \"conditions\": [\n 1,\n 2\n ]\n }\n ],\n \"parameters\": [\n {\n \"type\": 9,\n \"cap_type\": null,\n \"goal_id\": \"\",\n \"parameter\": \"https://example.com/trafficback\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 200,
"name": "OK",
"message": "<string>",
"info": {
"custom-param": {
"id": 123,
"status": 123,
"affiliates": [
{
"id": 123,
"title": "<string>"
}
],
"start_date": "<string>",
"end_date": "<string>",
"conditions": [
{
"type": 123,
"permission": 123,
"conditions": [
{}
]
}
],
"parameters": [
{
"type": 123,
"parameter": "<string>",
"cap_type": 123,
"goal_id": {
"id": 123
}
}
],
"created": 123,
"updated": 123
}
}
}{
"status": "error",
"code": 400,
"name": "Bad Request",
"message": "Request could not be parsed.",
"info": {
"errors": {}
}
}{
"status": "error",
"code": 401,
"name": "Unauthorized",
"message": "API key is invalid or missing."
}{
"status": "error",
"code": 403,
"name": "Forbidden",
"message": "This endpoint is not available for your role."
}{
"status": "error",
"code": 404,
"name": "Not Found",
"message": "Resource not found."
}{
"status": "error",
"code": 422,
"name": "Unprocessable entity",
"message": "Validation error",
"info": {
"errors": {
"email": [
"Email cannot be blank."
],
"currency": [
"Currency must be a valid ISO code."
]
}
}
}{
"status": "error",
"code": 500,
"name": "Internal Server Error",
"message": "An unexpected error occurred.",
"info": {
"errors": {}
}
}Authorizations
Preferred authentication method. Pass the API key in the X-API-Key HTTP request header. The user account must have api_status enabled.
Body
Custom parameter status to set: 1=active, 3=inactive.
Start date (YYYY-MM-DD format).
End date (YYYY-MM-DD format), or an empty string to drop the end date.
Comma-separated affiliate IDs the rule is limited to (an array of ids is also accepted). Leave empty to apply the rule to every affiliate of the offer.
Targeting conditions, AND-ed together. Send an empty array to apply the rule to all traffic of the selected affiliates.
Show child attributes
Show child attributes
The overrides applied when the rule matches — one entry per action.
Show child attributes
Show child attributes
Was this page helpful?