Skip to main content
GET
/
affiliate
/
brands
cURL
curl --request GET \
  --url https://api-beta.lomadee.com.br/affiliate/brands \
  --header 'x-api-key: <api-key>'
{
  "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
  }
}

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

Search by brand name (full-text search)
page
integer
default:"1"
Page number (default: 1)
limit
integer
default:"20"
Items per page (default: 20)
categories
string
Categories separated by comma
isExclusive
boolean
Filter only exclusive brands
isFavorite
boolean
Filter only favorite brands
isHighlight
boolean
Filter only highlighted brands
isPublic
boolean
Filter by public visibility (true = public, false = private)
startAt
string
Start date to filter by creation date (ISO 8601)
endAt
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"

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"

Response Format

data
array
Array of brand objects
pagination
object
Pagination metadata

Brand Object Structure

id
string
The unique identifier of the brand
The logo URL of the brand
name
string
The name of the brand
slug
string
The URL-friendly slug of the brand
site
string
The website URL of the brand
segment
string
Brand segment/category
network
object
Network information for the brand
createdAt
string
Creation date (ISO 8601)
commission
object
Commission information for the brand
channels
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

  1. Pagination: Always implement pagination for large datasets
  2. Caching: Cache brand data when appropriate (TTL: 60 seconds)
  3. Commission Tracking: Use commission information to calculate earnings
  4. Channel Management: Check channel availability before generating links
  5. Error Handling: Implement proper error handling for all responses
  6. 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

Authorizations

x-api-key
string
header
required

Query Parameters

Search by brand name (full-text search)

page
integer<int32>
default:1

Page number (default: 1)

limit
integer<int32>
default:20

Items per page (default: 20)

categories
string

Categories separated by comma

isExclusive
boolean

Filter only exclusive brands

isFavorite
boolean

Filter only favorite brands

isHighlight
boolean

Filter only highlighted brands

isPublic
boolean

Filter by public visibility (true = public, false = private)

startAt
string<date-time>

Start date to filter by creation date (ISO 8601)

endAt
string<date-time>

End date to filter by creation date (ISO 8601)

Response

Brand response

Brand response structure with data array and pagination

data
object[]
pagination
object