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
The maximum number of results to return
The page number to return
The organization id to return brands from
The organization ids to return brands from
This parameter is used to filter brands by additional identifier. Return all
brands has this identifier if set to true.
Example Requests
Basic Request
curl -X GET "https://api-beta.lomadee.com.br/affiliate/brands" \
-H "x-api-key: your-api-key"
curl -X GET "https://api-beta.lomadee.com.br/affiliate/brands?page=1&limit=20" \
-H "x-api-key: your-api-key"
Filter by Organization
curl -X GET "https://api-beta.lomadee.com.br/affiliate/brands?organizationId=e36f5bbb-3e5f-42e2-be4c-6c32dac101c2" \
-H "x-api-key: your-api-key"
Brand Object Structure
The unique identifier of the brand
The logo URL of the brand
The URL-friendly slug of the brand
The website URL of the brand
Commission information for the brand Commission percentage value (e.g., 4.2 for 4.2%)
Commission transfer type (e.g., “cpa” for Cost Per Action)
Available affiliate channels for the brand Available channel information Available channel identifier
Shortened URLs for the channel
Restriction message if channel has limitations
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" ,
"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
}
]
}
],
"meta" : {
"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 . meta );
} 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[ 'meta' ])
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 [ 'meta' ], 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 10 requests per minute 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
The maximum number of results to return
The page number to return