cURL
curl --request GET \
--url https://api.lomadee.com.br/affiliate/channels \
--header 'x-api-key: <api-key>'import requests
url = "https://api.lomadee.com.br/affiliate/channels"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.lomadee.com.br/affiliate/channels', 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://api.lomadee.com.br/affiliate/channels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.lomadee.com.br/affiliate/channels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lomadee.com.br/affiliate/channels")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lomadee.com.br/affiliate/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"name": "<string>",
"active": true,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"count": 123
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"success": false,
"message": "<string>",
"code": "<string>"
}Channels
Get all Channels
Returns all affiliate channels owned by the authenticated user (max 20 per request). Does not filter by network or organization. Excludes WhiteLabel channels.
GET
/
affiliate
/
channels
cURL
curl --request GET \
--url https://api.lomadee.com.br/affiliate/channels \
--header 'x-api-key: <api-key>'import requests
url = "https://api.lomadee.com.br/affiliate/channels"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.lomadee.com.br/affiliate/channels', 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://api.lomadee.com.br/affiliate/channels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.lomadee.com.br/affiliate/channels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lomadee.com.br/affiliate/channels")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lomadee.com.br/affiliate/channels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"name": "<string>",
"active": true,
"createdAt": "2023-11-07T05:31:56Z"
}
],
"count": 123
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"success": false,
"message": "<string>",
"code": "<string>"
}Get all Channels
Lista todos os canais do afiliado autenticado. OaffiliateId é derivado da API key — não é enviado na URL.
Cada canal representa um meio de divulgação do afiliado (ex.: Blog, Push) e é usado na geração de links via shortener.
Comportamento
- Retorna canais onde
user_idcorresponde ao afiliado da chave - Exclui canais de WhiteLabel (
white_label_idnulo) - Não filtra por rede ou organização — todos os canais do afiliado elegíveis são retornados
- Retorno limitado a no máximo 20 canais por request
HTTP Request
GET https://api-beta.lomadee.com.br/affiliate/channels
Headers
| Header | Valor |
|---|---|
x-api-key | Chave de afiliado com escopo channels:read |
Example Request
curl -X GET "https://api-beta.lomadee.com.br/affiliate/channels" \
-H "x-api-key: your-api-key"
Response Format
array
Lista de canais do afiliado
integer
Quantidade de canais retornados
Channel Object
string
Identificador único do canal
string
Nome do tipo de canal (ex.: Blog, PushNotification)
boolean
Se o canal está ativo
string
Data de criação (ISO 8601)
Example Response
{
"data": [
{
"id": "b328b5ff-af33-405a-994b-70192267419c",
"name": "Blog",
"active": true,
"createdAt": "2025-01-15T10:30:00.000Z"
}
],
"count": 1
}
Error Responses
| Status | Descrição |
|---|---|
401 | API key ausente, inválida ou tipo incorreto |
403 | Escopo channels:read ausente na chave |
404 | Afiliado não encontrado |
429 | Rate limit excedido (60 req/60s por chave + IP) |