Atualizar comissão de afiliados em lote
curl --request PATCH \
--url https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch \
--header 'Content-Type: application/json' \
--header 'X-Api-Client-Token: <api-key>' \
--data '
{
"affiliates": [
{
"user_id": "XXWBD7UOKM1756304064",
"commission_percentage": 15
}
]
}
'import requests
url = "https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch"
payload = { "affiliates": [
{
"user_id": "XXWBD7UOKM1756304064",
"commission_percentage": 15
}
] }
headers = {
"X-Api-Client-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Client-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({affiliates: [{user_id: 'XXWBD7UOKM1756304064', commission_percentage: 15}]})
};
fetch('https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch', 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://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch",
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([
'affiliates' => [
[
'user_id' => 'XXWBD7UOKM1756304064',
'commission_percentage' => 15
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Client-Token: <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://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch"
payload := strings.NewReader("{\n \"affiliates\": [\n {\n \"user_id\": \"XXWBD7UOKM1756304064\",\n \"commission_percentage\": 15\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Client-Token", "<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.patch("https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch")
.header("X-Api-Client-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"affiliates\": [\n {\n \"user_id\": \"XXWBD7UOKM1756304064\",\n \"commission_percentage\": 15\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Client-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"affiliates\": [\n {\n \"user_id\": \"XXWBD7UOKM1756304064\",\n \"commission_percentage\": 15\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Operação em lote iniciada com sucesso",
"data": {
"batch_id": "batch_abc123",
"status": "queued"
}
}Produtos
Atualizar comissão de afiliados em lote
Atualiza o percentual de comissão de múltiplos afiliados de um produto. Cada afiliado na lista pode receber um percentual individual. Aceita até 5.000 afiliados por requisição.
PATCH
/
products
/
{product_hash}
/
affiliates
/
batch
Atualizar comissão de afiliados em lote
curl --request PATCH \
--url https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch \
--header 'Content-Type: application/json' \
--header 'X-Api-Client-Token: <api-key>' \
--data '
{
"affiliates": [
{
"user_id": "XXWBD7UOKM1756304064",
"commission_percentage": 15
}
]
}
'import requests
url = "https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch"
payload = { "affiliates": [
{
"user_id": "XXWBD7UOKM1756304064",
"commission_percentage": 15
}
] }
headers = {
"X-Api-Client-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Client-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({affiliates: [{user_id: 'XXWBD7UOKM1756304064', commission_percentage: 15}]})
};
fetch('https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch', 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://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch",
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([
'affiliates' => [
[
'user_id' => 'XXWBD7UOKM1756304064',
'commission_percentage' => 15
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Client-Token: <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://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch"
payload := strings.NewReader("{\n \"affiliates\": [\n {\n \"user_id\": \"XXWBD7UOKM1756304064\",\n \"commission_percentage\": 15\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Client-Token", "<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.patch("https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch")
.header("X-Api-Client-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"affiliates\": [\n {\n \"user_id\": \"XXWBD7UOKM1756304064\",\n \"commission_percentage\": 15\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://nexus.ticto.com.br/api/v1/products/{product_hash}/affiliates/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Client-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"affiliates\": [\n {\n \"user_id\": \"XXWBD7UOKM1756304064\",\n \"commission_percentage\": 15\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Operação em lote iniciada com sucesso",
"data": {
"batch_id": "batch_abc123",
"status": "queued"
}
}Authorizations
ApiClientTokenbearerAuth
Token de autenticação do cliente obtido via endpoint /auth
Path Parameters
Hash do produto
Body
application/json
Lista de afiliados com novos percentuais de comissão
Required array length:
1 - 5000 elementsShow child attributes
Show child attributes