Adicionar custos a influenciadores
curl --request POST \
--url https://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"influencers": [
{
"name": "Duda Raiz",
"influencer_cost_id": "Ro7ckB",
"campaign_id": "N93ys5",
"costs": [
{
"fixed_fee": 200,
"var_fee": 10,
"value": 0,
"start_date": "2026-09-01",
"end_date": "2026-09-30",
"is_campaign_cost": true,
"is_coupon_cost": false
}
]
}
]
}
'import requests
url = "https://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs"
payload = { "influencers": [
{
"name": "Duda Raiz",
"influencer_cost_id": "Ro7ckB",
"campaign_id": "N93ys5",
"costs": [
{
"fixed_fee": 200,
"var_fee": 10,
"value": 0,
"start_date": "2026-09-01",
"end_date": "2026-09-30",
"is_campaign_cost": True,
"is_coupon_cost": False
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
influencers: [
{
name: 'Duda Raiz',
influencer_cost_id: 'Ro7ckB',
campaign_id: 'N93ys5',
costs: [
{
fixed_fee: 200,
var_fee: 10,
value: 0,
start_date: '2026-09-01',
end_date: '2026-09-30',
is_campaign_cost: true,
is_coupon_cost: false
}
]
}
]
})
};
fetch('https://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs', 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://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs",
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([
'influencers' => [
[
'name' => 'Duda Raiz',
'influencer_cost_id' => 'Ro7ckB',
'campaign_id' => 'N93ys5',
'costs' => [
[
'fixed_fee' => 200,
'var_fee' => 10,
'value' => 0,
'start_date' => '2026-09-01',
'end_date' => '2026-09-30',
'is_campaign_cost' => true,
'is_coupon_cost' => false
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs"
payload := strings.NewReader("{\n \"influencers\": [\n {\n \"name\": \"Duda Raiz\",\n \"influencer_cost_id\": \"Ro7ckB\",\n \"campaign_id\": \"N93ys5\",\n \"costs\": [\n {\n \"fixed_fee\": 200,\n \"var_fee\": 10,\n \"value\": 0,\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-09-30\",\n \"is_campaign_cost\": true,\n \"is_coupon_cost\": false\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"influencers\": [\n {\n \"name\": \"Duda Raiz\",\n \"influencer_cost_id\": \"Ro7ckB\",\n \"campaign_id\": \"N93ys5\",\n \"costs\": [\n {\n \"fixed_fee\": 200,\n \"var_fee\": 10,\n \"value\": 0,\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-09-30\",\n \"is_campaign_cost\": true,\n \"is_coupon_cost\": false\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"influencers\": [\n {\n \"name\": \"Duda Raiz\",\n \"influencer_cost_id\": \"Ro7ckB\",\n \"campaign_id\": \"N93ys5\",\n \"costs\": [\n {\n \"fixed_fee\": 200,\n \"var_fee\": 10,\n \"value\": 0,\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-09-30\",\n \"is_campaign_cost\": true,\n \"is_coupon_cost\": false\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": {}
},
"request_id": "<string>",
"timestamp": "<string>"
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
},
"request_id": "<string>",
"timestamp": "<string>"
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
},
"request_id": "<string>",
"timestamp": "<string>"
}Influenciadores
Adicionar custos
Adiciona custos (comissão fixa, comissão variável e/ou valor por entrega) a um ou mais influenciadores. Valida sobreposição de período entre custos com comissão. Requer o escopo influencers.write.
POST
/
influencers
/
costs
Adicionar custos a influenciadores
curl --request POST \
--url https://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"influencers": [
{
"name": "Duda Raiz",
"influencer_cost_id": "Ro7ckB",
"campaign_id": "N93ys5",
"costs": [
{
"fixed_fee": 200,
"var_fee": 10,
"value": 0,
"start_date": "2026-09-01",
"end_date": "2026-09-30",
"is_campaign_cost": true,
"is_coupon_cost": false
}
]
}
]
}
'import requests
url = "https://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs"
payload = { "influencers": [
{
"name": "Duda Raiz",
"influencer_cost_id": "Ro7ckB",
"campaign_id": "N93ys5",
"costs": [
{
"fixed_fee": 200,
"var_fee": 10,
"value": 0,
"start_date": "2026-09-01",
"end_date": "2026-09-30",
"is_campaign_cost": True,
"is_coupon_cost": False
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
influencers: [
{
name: 'Duda Raiz',
influencer_cost_id: 'Ro7ckB',
campaign_id: 'N93ys5',
costs: [
{
fixed_fee: 200,
var_fee: 10,
value: 0,
start_date: '2026-09-01',
end_date: '2026-09-30',
is_campaign_cost: true,
is_coupon_cost: false
}
]
}
]
})
};
fetch('https://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs', 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://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs",
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([
'influencers' => [
[
'name' => 'Duda Raiz',
'influencer_cost_id' => 'Ro7ckB',
'campaign_id' => 'N93ys5',
'costs' => [
[
'fixed_fee' => 200,
'var_fee' => 10,
'value' => 0,
'start_date' => '2026-09-01',
'end_date' => '2026-09-30',
'is_campaign_cost' => true,
'is_coupon_cost' => false
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs"
payload := strings.NewReader("{\n \"influencers\": [\n {\n \"name\": \"Duda Raiz\",\n \"influencer_cost_id\": \"Ro7ckB\",\n \"campaign_id\": \"N93ys5\",\n \"costs\": [\n {\n \"fixed_fee\": 200,\n \"var_fee\": 10,\n \"value\": 0,\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-09-30\",\n \"is_campaign_cost\": true,\n \"is_coupon_cost\": false\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"influencers\": [\n {\n \"name\": \"Duda Raiz\",\n \"influencer_cost_id\": \"Ro7ckB\",\n \"campaign_id\": \"N93ys5\",\n \"costs\": [\n {\n \"fixed_fee\": 200,\n \"var_fee\": 10,\n \"value\": 0,\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-09-30\",\n \"is_campaign_cost\": true,\n \"is_coupon_cost\": false\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin-api.sandbox.solomon.com.br/admin/v1/influencers/costs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"influencers\": [\n {\n \"name\": \"Duda Raiz\",\n \"influencer_cost_id\": \"Ro7ckB\",\n \"campaign_id\": \"N93ys5\",\n \"costs\": [\n {\n \"fixed_fee\": 200,\n \"var_fee\": 10,\n \"value\": 0,\n \"start_date\": \"2026-09-01\",\n \"end_date\": \"2026-09-30\",\n \"is_campaign_cost\": true,\n \"is_coupon_cost\": false\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": {}
},
"request_id": "<string>",
"timestamp": "<string>"
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
},
"request_id": "<string>",
"timestamp": "<string>"
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
},
"request_id": "<string>",
"timestamp": "<string>"
}
