curl --request POST \
--url https://{domain}/api/v2/network/tracker/click \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"affiliate_id": 1,
"offer_id": 1,
"ip": "203.0.113.77",
"link_id": 1,
"source_id": 1,
"creative_id": 1
}
'import requests
url = "https://{domain}/api/v2/network/tracker/click"
payload = {
"affiliate_id": 1,
"offer_id": 1,
"ip": "203.0.113.77",
"link_id": 1,
"source_id": 1,
"creative_id": 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({
affiliate_id: 1,
offer_id: 1,
ip: '203.0.113.77',
link_id: 1,
source_id: 1,
creative_id: 1
})
};
fetch('https://{domain}/api/v2/network/tracker/click', 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/tracker/click",
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([
'affiliate_id' => 1,
'offer_id' => 1,
'ip' => '203.0.113.77',
'link_id' => 1,
'source_id' => 1,
'creative_id' => 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/tracker/click"
payload := strings.NewReader("{\n \"affiliate_id\": 1,\n \"offer_id\": 1,\n \"ip\": \"203.0.113.77\",\n \"link_id\": 1,\n \"source_id\": 1,\n \"creative_id\": 1\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/tracker/click")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"affiliate_id\": 1,\n \"offer_id\": 1,\n \"ip\": \"203.0.113.77\",\n \"link_id\": 1,\n \"source_id\": 1,\n \"creative_id\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/network/tracker/click")
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 \"affiliate_id\": 1,\n \"offer_id\": 1,\n \"ip\": \"203.0.113.77\",\n \"link_id\": 1,\n \"source_id\": 1,\n \"creative_id\": 1\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 200,
"name": "OK",
"message": "Click transaction has been added successfully!",
"info": {
"click_id": "<string>"
}
}{
"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": 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": {}
}
}Create click
Creates a single click transaction via the API. Returns a click_id (UUID) that can be used to attribute conversions.
curl --request POST \
--url https://{domain}/api/v2/network/tracker/click \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"affiliate_id": 1,
"offer_id": 1,
"ip": "203.0.113.77",
"link_id": 1,
"source_id": 1,
"creative_id": 1
}
'import requests
url = "https://{domain}/api/v2/network/tracker/click"
payload = {
"affiliate_id": 1,
"offer_id": 1,
"ip": "203.0.113.77",
"link_id": 1,
"source_id": 1,
"creative_id": 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({
affiliate_id: 1,
offer_id: 1,
ip: '203.0.113.77',
link_id: 1,
source_id: 1,
creative_id: 1
})
};
fetch('https://{domain}/api/v2/network/tracker/click', 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/tracker/click",
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([
'affiliate_id' => 1,
'offer_id' => 1,
'ip' => '203.0.113.77',
'link_id' => 1,
'source_id' => 1,
'creative_id' => 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/tracker/click"
payload := strings.NewReader("{\n \"affiliate_id\": 1,\n \"offer_id\": 1,\n \"ip\": \"203.0.113.77\",\n \"link_id\": 1,\n \"source_id\": 1,\n \"creative_id\": 1\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/tracker/click")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"affiliate_id\": 1,\n \"offer_id\": 1,\n \"ip\": \"203.0.113.77\",\n \"link_id\": 1,\n \"source_id\": 1,\n \"creative_id\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v2/network/tracker/click")
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 \"affiliate_id\": 1,\n \"offer_id\": 1,\n \"ip\": \"203.0.113.77\",\n \"link_id\": 1,\n \"source_id\": 1,\n \"creative_id\": 1\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": 200,
"name": "OK",
"message": "Click transaction has been added successfully!",
"info": {
"click_id": "<string>"
}
}{
"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": 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
Body
Visitor IP address. Both IPv4 and IPv6 are accepted, e.g. 203.0.113.77 or 2001:db8:85a3::8a2e:370:7334. The value is normalised rather than kept verbatim: an ::ffff: prefix is stripped on input, IPv4 is held in IPv6-mapped form, and IPv6 is stored in ClickHouse binary IPv6, so an uppercase or fully expanded address comes back canonical and lowercase. An unparseable value is silently stored as :: with a 200. A truncated copy such as 203.0.xxx.xxx is stored alongside regardless of settings, and while the platform GDPR hide-IP setting is on the full address is replaced with :: and the reporting endpoints return that truncated mask instead. Used for geo-attribution.
Commission plan id. Honoured only when the plan is active, assigned to this affiliate and belongs to this offer; otherwise the plan is auto-selected with no error - first an active plan of this offer assigned to this affiliate, then any active plan of this offer, and if the offer has none, the lowest-id active plan on the platform, which may belong to a different offer. The selected plan is written to the click along with commission_type and traffic_source_id. Forced to 0 on industries that do not use commission plans.
Was this page helpful?