cURL
curl --request GET \
--url https://api.lomadee.com.br/affiliate/brands \
--header 'x-api-key: <api-key>'import requests
url = "https://api.lomadee.com.br/affiliate/brands"
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/brands', 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/brands",
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/brands"
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/brands")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lomadee.com.br/affiliate/brands")
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>",
"logo": "<string>",
"slug": "<string>",
"site": "<string>",
"segment": "<string>",
"network": {
"active": true,
"isPublic": true,
"trait": {
"isExclusive": true,
"isHighlight": true,
"isFavorite": true
},
"rating": {
"approval": 123,
"commission": 123,
"conversion": 123,
"popularity": 123,
"validation": 123
}
},
"createdAt": "2023-11-07T05:31:56Z",
"channels": [
{
"id": "<string>",
"name": "<string>",
"availableChannel": {
"id": "<string>",
"name": "<string>"
},
"shortUrls": [
"<string>"
],
"message": "<string>"
}
],
"commission": {
"value": 123,
"transfer": "<string>"
}
}
],
"pagination": {
"total": 123,
"page": 123,
"limit": 123,
"totalPages": 123
}
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}Brands
Get all Brands
Returns all brands from the system that the user has access to
GET
/
affiliate
/
brands
cURL
curl --request GET \
--url https://api.lomadee.com.br/affiliate/brands \
--header 'x-api-key: <api-key>'import requests
url = "https://api.lomadee.com.br/affiliate/brands"
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/brands', 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/brands",
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/brands"
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/brands")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lomadee.com.br/affiliate/brands")
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>",
"logo": "<string>",
"slug": "<string>",
"site": "<string>",
"segment": "<string>",
"network": {
"active": true,
"isPublic": true,
"trait": {
"isExclusive": true,
"isHighlight": true,
"isFavorite": true
},
"rating": {
"approval": 123,
"commission": 123,
"conversion": 123,
"popularity": 123,
"validation": 123
}
},
"createdAt": "2023-11-07T05:31:56Z",
"channels": [
{
"id": "<string>",
"name": "<string>",
"availableChannel": {
"id": "<string>",
"name": "<string>"
},
"shortUrls": [
"<string>"
],
"message": "<string>"
}
],
"commission": {
"value": 123,
"transfer": "<string>"
}
}
],
"pagination": {
"total": 123,
"page": 123,
"limit": 123,
"totalPages": 123
}
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>"
}Get all Brands
Retrieve a comprehensive list of all affiliate brands available in the Lomadee network. This endpoint provides detailed brand information including logos, commission rates, and available channels.HTTP Request
GET https://api-beta.lomadee.com.br/affiliate/brands
Query Parameters
string
Search by brand name (full-text search)
integer
default:"1"
Page number (default: 1)
integer
default:"20"
Items per page (default: 20, max: 20)
string
Categories separated by comma
boolean
Filter only exclusive brands
boolean
Filter only favorite brands
boolean
Filter only highlighted brands
boolean
Filter by public visibility (true = public, false = private)
string
Start date to filter by creation date (ISO 8601)
string
End date to filter by creation date (ISO 8601)
Example Requests
Basic Request
curl -X GET "https://api-beta.lomadee.com.br/affiliate/brands" \
-H "x-api-key: your-api-key"
With Pagination
curl -X GET "https://api-beta.lomadee.com.br/affiliate/brands?page=1&limit=20" \
-H "x-api-key: your-api-key"
Response Format
array
Array of brand objects
object
Brand Object Structure
string
The unique identifier of the brand
string
The logo URL of the brand
string
The name of the brand
string
The URL-friendly slug of the brand
string
The website URL of the brand
string
Brand segment/category
object
Network information for the brand
Show properties
Show properties
boolean
Whether the network is active
boolean
Whether the network is public
object
string
Creation date (ISO 8601)
object
array
Available affiliate channels for the brand
Example Response
{
"data": [
{
"id": "e36f5bbb-3e5f-42e2-be4c-6c32dac101c2",
"logo": "https://example.com/logo.png",
"name": "Example Brand",
"slug": "example-brand",
"site": "https://example.com",
"segment": "Electronics",
"network": {
"active": true,
"isPublic": true,
"trait": {
"isExclusive": false,
"isHighlight": true,
"isFavorite": false
},
"rating": {
"approval": 4.5,
"commission": 4.2,
"conversion": 3.8,
"popularity": 85,
"validation": 4.8
}
},
"createdAt": "2024-01-15T10:30:00Z",
"commission": {
"value": 4.2,
"transfer": "cpa"
},
"channels": [
{
"id": "channel-1",
"name": "Main Channel",
"availableChannel": {
"id": "available-1",
"name": "Available Channel"
},
"shortUrls": ["https://lomadee.com/short-url-1"],
"message": null
}
]
}
],
"pagination": {
"total": 150,
"page": 1,
"limit": 10,
"totalPages": 15
}
}
Error Responses
401 Unauthorized
{
"message": "API key is required",
"error": "Unauthorized",
"statusCode": 401
}
500 Internal Server Error
{
"message": "Internal server error",
"error": "InternalServerError",
"statusCode": 500
}
Usage Examples
JavaScript/Node.js
const axios = require("axios");
async function getBrands() {
try {
const response = await axios.get(
"https://api-beta.lomadee.com.br/affiliate/brands",
{
headers: {
"x-api-key": "your-api-key",
},
params: {
page: 1,
limit: 20,
},
}
);
console.log("Brands:", response.data.data);
console.log("Pagination:", response.data.pagination);
} catch (error) {
console.error("Error:", error.response.data);
}
}
Python
import requests
def get_brands():
url = 'https://api-beta.lomadee.com.br/affiliate/brands'
headers = {'x-api-key': 'your-api-key'}
params = {
'page': 1,
'limit': 20
}
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
data = response.json()
print('Brands:', data['data'])
print('Pagination:', data['pagination'])
else:
print('Error:', response.json())
PHP
<?php
$url = 'https://api-beta.lomadee.com.br/affiliate/brands';
$headers = ['x-api-key: your-api-key'];
$params = [
'page' => 1,
'limit' => 20
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$data = json_decode($response, true);
echo 'Brands: ' . print_r($data['data'], true);
echo 'Pagination: ' . print_r($data['pagination'], true);
} else {
echo 'Error: ' . $response;
}
?>
Best Practices
- Pagination: Always implement pagination for large datasets
- Caching: Cache brand data when appropriate (TTL: 60 seconds)
- Commission Tracking: Use commission information to calculate earnings
- Channel Management: Check channel availability before generating links
- Error Handling: Implement proper error handling for all responses
- Rate Limiting: Respect the 60 requests per 60 seconds limit
Common Use Cases
- Brand Directory: Display available affiliate brands
- Commission Analysis: Compare commission rates across brands
- Channel Management: Check available channels for each brand
- Link Generation: Generate affiliate links for specific brands
- Performance Tracking: Monitor brand performance and earnings
Authorizations
Query Parameters
Search by brand name (full-text search)
Page number (default: 1)
Items per page (default: 20, max: 20)
Required range:
x <= 20Categories separated by comma
Filter only exclusive brands
Filter only favorite brands
Filter only highlighted brands
Filter by public visibility (true = public, false = private)
Start date to filter by creation date (ISO 8601)
End date to filter by creation date (ISO 8601)