# Awin Multi-Merchant Affiliate Discovery — BR & Global Brands (`viralanalyzer/awin-multi-merchant-affiliate`) Actor

Discover Awin affiliate programmes and generate tracked deep-links. Works with Awin Publisher API and accepts legacy ShareASale credentials (post-2024 merger). 4500+ merchants across BR, EU, US. BYOC: bring your awinApiToken + awinPublisherId from ui.awin.com Toolbox > API Credentials.

- **URL**: https://apify.com/viralanalyzer/awin-multi-merchant-affiliate.md
- **Developed by:** [viralanalyzer](https://apify.com/viralanalyzer) (community)
- **Categories:** E-commerce, Lead generation, SEO tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🤝 Awin Multi-Merchant Affiliate Discovery — BR & Global Brands

> 🔗 [View on Apify Store](https://apify.com/viralanalyzer/awin-multi-merchant-affiliate) | 🇺🇸 English | [🇧🇷 Português](#português)

Discover **affiliate merchants on the Awin network** and build tracked deep-links to hundreds of brands in Brazil (Fastshop, Pontofrio, Casas Bahia, Magalu, Booking.com, Renner, Dafiti, Netshoes, Riachuelo, Carrefour, Pão de Açúcar, Submarino, Americanas...) and globally — using the **official Awin Publisher REST API** (OAuth2 Bearer). One actor unlocks the entire Awin catalog. Tested with 252 BR merchants on a real publisher token.

### ✨ Features

- 🤝 **Hundreds of merchants in one call** — Filter by `relationship`, `countryCode`, and minimum commission
- 🇧🇷 **Brazil-focused by default** — Pre-filtered for `BR` country code; 252 active BR merchants confirmed
- 🌐 **Global reach** — Query any country (`US`, `GB`, `DE`, `AU`, `ES`, `IT`, `FR`, etc.) or multiple regions
- 🔗 **Built-in tracking link generator** — Assembles `awin1.com/cread.php` URLs per Awin spec, no extra API call
- 🎯 **`clickref` support** — Embed sub-IDs (campaign, creative, date, channel) for granular attribution in Awin reports
- 📊 **Commission visibility** — `defaultCommissionType` / `defaultCommissionValue` exposed for joined merchants
- ✅ **4 relationship modes** — `joined` · `pending` · `rejected` · `notjoined` (the last = discovery mode for new publishers)
- 🛡️ **Hard failure on missing credentials** — Never silently returns mock; throws helpful 4-step instructions
- 💰 **Pay per result** — Tiered PPE on 2 events: `merchant-discovered` + `tracking-link-generated`

### ⚙️ Requirements

You need an **Awin Publisher** account with an active API token:

1. Sign up at [ui.awin.com/publisher-signup/br/awin/step1](https://ui.awin.com/publisher-signup/br/awin/step1) (~10 min)
   - Refundable signup deposit: **~$5 USD** (refunded with your first commission)
   - Operational tax: **25% on Brazilian commission earnings** (deducted automatically)
   - Payouts: BRL → EUR conversion (Brazilian Central Bank rate − 5% spread)
2. Wait for advertiser approvals (`relationship=joined` populates after merchants approve you)
3. From `ui.awin.com` → **Toolbox → API Credentials** → generate **OAuth2 Bearer token**
4. From **Account → Account Details** → copy **Publisher ID** (numeric, e.g. `2892795`)
5. Paste both into the actor input (`awinApiToken` + `awinPublisherId`)

> 💡 **Just signed up?** Start with `relationship: "notjoined"` and `countryCode: "BR"` to browse all 252 BR merchants you can apply to. The default `joined` returns 0 until merchants approve your applications.

### 📥 Input

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `awinApiToken` | string (secret) | ✅ | — | OAuth2 token (or env var `AWIN_API_TOKEN`) |
| `awinPublisherId` | string | ✅ | — | Numeric Publisher ID (or env var `AWIN_PUBLISHER_ID`) |
| `relationship` | enum | ❌ | `joined` | `joined` / `pending` / `rejected` / `notjoined` |
| `countryCode` | string | ❌ | `BR` | ISO country code (empty = all countries) |
| `regions` | string[] | ❌ | `[]` | Multi-region query (overrides `countryCode`) |
| `minCommissionValue` | number | ❌ | `1` | Drop merchants below this default commission |
| `buildTrackingLinks` | boolean | ❌ | `true` | Build `cread.php` deep-link per merchant |
| `targetUrlOverride` | string | ❌ | — | Tracking link points here instead of homepage |
| `clickref` | string | ❌ | — | Sub-ID embedded in tracking link |

#### Input examples

**Discovery mode (new publisher, no joined merchants yet):**
```json
{
  "awinApiToken": "<your-token>",
  "awinPublisherId": "2892795",
  "relationship": "notjoined",
  "countryCode": "BR",
  "minCommissionValue": 0,
  "buildTrackingLinks": false
}
````

**Active publisher mode (with approved partnerships):**

```json
{
  "awinApiToken": "<your-token>",
  "awinPublisherId": "2892795",
  "relationship": "joined",
  "countryCode": "BR",
  "minCommissionValue": 3,
  "buildTrackingLinks": true,
  "targetUrlOverride": "https://www.magazineluiza.com.br/categoria/celulares",
  "clickref": "campanha_verao_instagram"
}
```

### 📤 Output

Each merchant record:

| Field | Type | Description |
|---|---|---|
| `advertiserId` | number | Awin advertiser ID |
| `advertiserName` | string | Brand name |
| `displayUrl` | string | Merchant homepage |
| `logoUrl` | string | Brand logo URL |
| `sector` | string | Sector (Fashion, Travel, Electronic Superstore, etc.) |
| `primaryRegion` | string | ISO country |
| `currencyCode` | string | Accepted currency (BRL, USD, EUR, ...) |
| `defaultCommissionType` | string | null | `percentage` / `fixed` (null for `notjoined`) |
| `defaultCommissionValue` | number | null | Commission amount (null for `notjoined`) |
| `validationPeriod` | number | null | Days until validation (null for `notjoined`) |
| `joinStatus` | string | null | Your relationship (null for `notjoined`) |
| `trackingLink` | string | null | Pre-built `cread.php` deep-link (null when `buildTrackingLinks=false`) |
| `clickref` | string | null | Sub-ID embedded |
| `platform` | string | Always `awin` |
| `_dataQuality` | string | `full` / `partial` |
| `scrapedAt` | string | ISO 8601 |

#### Output example

```json
{
  "advertiserId": 17590,
  "advertiserName": "Fastshop BR",
  "displayUrl": "https://site.fastshop.com.br/",
  "logoUrl": "https://ui.awin.com/images/upload/merchant/profile/17590.png",
  "sector": "Electronic Superstore",
  "primaryRegion": "BR",
  "currencyCode": "BRL",
  "defaultCommissionType": "percentage",
  "defaultCommissionValue": 4.5,
  "validationPeriod": 30,
  "joinStatus": "joined",
  "trackingLink": "https://www.awin1.com/cread.php?awinmid=17590&awinaffid=2892795&clickref=campanha_verao_instagram&ued=https%3A%2F%2Fsite.fastshop.com.br%2F",
  "clickref": "campanha_verao_instagram",
  "platform": "awin",
  "_dataQuality": "full",
  "scrapedAt": "2026-05-12T15:10:35.235Z"
}
```

### 📋 Use cases

- 🤝 **Multi-brand affiliate strategy** — Promote dozens of major BR retailers with one token
- 🇧🇷 **Brazilian e-commerce coverage** — Fastshop, Pontofrio, Magalu, Casas Bahia, Renner, etc. — most major BR retailers are on Awin
- 🌍 **International reach** — Booking.com, AliExpress (yes, also on Awin), Adidas, ASOS, and more
- 🎯 **Granular attribution** — Use `clickref` per campaign/channel/creative for downstream reporting
- 🔍 **Merchant discovery** — `relationship: "notjoined"` reveals merchants you can apply to join

### ❓ FAQ

**Q: Is Awin Publisher free?**
A: **Almost.** You pay a refundable ~$5 USD security deposit at signup, refunded with your first commission. Operational tax: 25% of commissions on Brazilian programs (deducted automatically before payout). Payouts in EUR with -5% spread for currency conversion.

**Q: How do I get my Awin API token and Publisher ID?**
A:

1. Sign up at [ui.awin.com/publisher-signup/br/awin/step1](https://ui.awin.com/publisher-signup/br/awin/step1)
2. Pay $5 USD deposit (refundable)
3. Account → Account Details → copy **Publisher ID**
4. Toolbox → API Credentials → generate **OAuth2 token**

**Q: Why does the actor throw if credentials are missing?**
A: This actor never returns mock data — that would mislead you in production. Missing creds = clear error message with the 4-step path to fix.

**Q: How are tracking links built?**
A: Per Awin's official spec, fully assembled client-side (no API call):

```
https://www.awin1.com/cread.php?awinmid={advertiserId}&awinaffid={publisherId}&clickref={subId}&ued={encodedTargetUrl}
```

**Q: Can I generate links to deep product pages instead of merchant homepages?**
A: Yes — set `targetUrlOverride` to the deep URL (category, product, search page). The actor URL-encodes it correctly.

**Q: I joined merchants but the actor returns 0 — why?**
A: Awin sometimes takes 24h to propagate `joined` status to API. Try `relationship: "notjoined"` first to verify your token works, then re-run with `joined` after a day.

**Q: Why are `defaultCommissionValue` and `joinStatus` null in my output?**
A: Awin's API only exposes those fields for `joined` merchants. For `notjoined` discovery, you only see the merchant catalog metadata — commission details show up after you apply and get approved.

**Q: Why is `tracking-link-generated` a separate PPE event?**
A: Some users want only the merchant catalog (no links). Setting `buildTrackingLinks: false` skips the second event entirely.

### 💰 Pricing

This actor uses **Pay Per Event (PPE)** pricing across 2 event types and 6 plan tiers:

| Event | FREE | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
|---|---|---|---|---|---|---|
| `merchant-discovered` | $0.0023 | $0.0020 | $0.0017 | $0.0013 | $0.0008 | $0.0004 |
| `tracking-link-generated` | $0.0012 | $0.0010 | $0.0008 | $0.0007 | $0.0004 | $0.0002 |

**Example:** A BRONZE-plan user discovering 252 BR merchants with tracking links pays roughly `252 × $0.0020 + 252 × $0.0010 = $0.76` for a full BR catalog dump with attribution-ready links.

### 🔗 Related actors

- [Shopee Affiliate Open API](https://apify.com/viralanalyzer/shopee-affiliate-products) — Single-platform Shopee BR with commission rates + bulk feeds
- [AliExpress Product Discovery](https://apify.com/viralanalyzer/aliexpress-affiliate-products) — Cross-border AliExpress via Dropshipping API
- [Mercado Livre Scraper](https://apify.com/viralanalyzer/mercadolivre-scraper) — ML BR products
- [Amazon Brazil Intelligence](https://apify.com/viralanalyzer/amazon-brazil-intelligence) — Amazon BR data
- [Influencer Discovery Agent](https://apify.com/viralanalyzer/influencer-discovery-agent) — Find creators to promote your selected merchants

### 📝 Changelog

#### v1.0 (Current, 2026-05-12)

- Awin Publisher REST API integration with OAuth2 Bearer auth
- 4 relationship modes (`joined` / `pending` / `rejected` / `notjoined`)
- Multi-region querying with deduplication by `advertiserId`
- Built-in `cread.php` tracking link generator with `clickref` sub-ID
- Hard failure with 4-step instructions when credentials missing (no mock fallback)
- Anti-placeholder guardrails on every record
- **6-tier PPE pricing** (FREE → DIAMOND) on `merchant-discovered` and `tracking-link-generated`
- Owner-skip for internal ViralAnalyzer runs (userId `rpTa37o1ctfdFWZk9`)
- Validated with 252 active BR merchants on a real publisher token

***

<a name="português"></a>

## 🤝 Awin Multi-Merchant Affiliate Discovery — Marcas BR & Globais

> 🔗 [Ver na Apify Store](https://apify.com/viralanalyzer/awin-multi-merchant-affiliate) | [🇺🇸 English](#-awin-multi-merchant-affiliate-discovery--br--global-brands) | 🇧🇷 Português

Descubra **merchants afiliados na rede Awin** e gere deep-links rastreáveis para centenas de marcas brasileiras (Fastshop, Pontofrio, Casas Bahia, Magalu, Booking.com, Renner, Dafiti, Netshoes, Riachuelo, Carrefour, Pão de Açúcar, Submarino, Americanas...) e globais — via a **API REST oficial de Publisher da Awin** (OAuth2 Bearer). Validado com 252 merchants BR em um token publisher real.

### ✨ Funcionalidades

- 🤝 **Centenas de merchants em uma chamada** com filtros de relação, país e comissão mínima
- 🇧🇷 **Foco no Brasil por padrão** — pré-filtrado em `BR`; 252 merchants BR ativos confirmados
- 🌐 **Alcance global** — qualquer país ou múltiplas regiões
- 🔗 **Gerador de tracking link integrado** — `awin1.com/cread.php` montado localmente
- 🎯 **`clickref`** para atribuição granular nos relatórios Awin
- 📊 **Visibilidade de comissão** — tipo e valor padrão por merchant (apenas para `joined`)
- ✅ **4 modos de relação** — `joined`, `pending`, `rejected`, `notjoined` (descoberta)
- 🛡️ **Falha clara sem credenciais** — nunca retorna mock
- 💰 **PPE tiered** — 6 tiers em 2 eventos: `merchant-discovered` + `tracking-link-generated`

### ⚙️ Requisitos

Você precisa de uma conta **Awin Publisher** com token de API ativo:

1. Cadastro em [ui.awin.com/publisher-signup/br/awin/step1](https://ui.awin.com/publisher-signup/br/awin/step1) (~10 min)
   - Depósito de segurança reembolsável: **~$5 USD** (devolvido com a 1ª comissão)
   - Taxa operacional: **25% sobre comissões BR** (deduzida automaticamente)
   - Saques: BRL → EUR pela taxa do BCB − 5% de spread
2. Aguardar aprovação dos anunciantes (`relationship=joined` aparece quando merchants te aprovam)
3. `ui.awin.com` → **Toolbox → API Credentials** → gera **OAuth2 Bearer token**
4. **Account → Account Details** → copia **Publisher ID** (numérico, ex: `2892795`)
5. Cola ambos no input do actor (`awinApiToken` + `awinPublisherId`)

> 💡 **Acabou de se cadastrar?** Comece com `relationship: "notjoined"` e `countryCode: "BR"` para listar os 252 merchants BR aos quais você pode aplicar. O default `joined` retorna 0 até que merchants aprovem suas aplicações.

### 📥 Entrada (campos principais)

Veja a tabela completa em inglês. Campos obrigatórios: `awinApiToken`, `awinPublisherId`. Sub-IDs no campo `clickref` para atribuição.

#### Exemplo (descoberta, novo publisher)

```json
{
  "awinApiToken": "<seu-token>",
  "awinPublisherId": "2892795",
  "relationship": "notjoined",
  "countryCode": "BR",
  "minCommissionValue": 0,
  "buildTrackingLinks": false
}
```

### 📤 Saída

Cada merchant: `advertiserId`, `advertiserName`, `displayUrl`, `logoUrl`, `sector`, `primaryRegion`, `currencyCode`, `defaultCommissionType`, `defaultCommissionValue`, `validationPeriod`, `joinStatus`, `trackingLink`, `clickref`, `_dataQuality`, `scrapedAt`. Veja tabela em inglês.

### 📋 Casos de uso

- 🤝 **Estratégia multi-marca** — Promover dezenas de varejistas BR com um token
- 🇧🇷 **Cobertura de e-commerce BR** — Fastshop, Pontofrio, Magalu, Casas Bahia, Renner, etc.
- 🌍 **Alcance internacional** — Booking.com, AliExpress, Adidas, ASOS, e mais
- 🎯 **Atribuição granular** — `clickref` por campanha/canal/criativo
- 🔍 **Descoberta de merchants** — `relationship: "notjoined"` para listar quem você pode aplicar

### ❓ Perguntas Frequentes

**P: A Awin Publisher é grátis?**
R: **Quase.** Você paga um depósito reembolsável de ~$5 USD no cadastro, devolvido com a 1ª comissão. Taxa operacional: 25% sobre comissões em programas brasileiros (deduzida automaticamente antes do pagamento). Pagamentos em EUR com -5% de spread cambial.

**P: Como pego meu token e Publisher ID Awin?**
R:

1. Cadastra em `ui.awin.com/publisher-signup/br/awin/step1`
2. Pagar $5 USD reembolsável
3. Account → Account Details → copia **Publisher ID**
4. Toolbox → API Credentials → gera **OAuth2 token**

**P: Acabei de aplicar a merchants mas o actor retorna 0 com `joined` — por quê?**
R: Awin leva até 24h para propagar o status `joined` na API. Use `notjoined` para validar que o token funciona, e tente `joined` depois.

**P: Por que `defaultCommissionValue` e `joinStatus` voltam null?**
R: A API Awin só expõe esses campos para merchants `joined`. Para descoberta `notjoined`, você só vê metadata do merchant — detalhes de comissão aparecem após aplicação aprovada.

### 💰 Preços

PPE tiered em 2 eventos × 6 tiers (FREE → DIAMOND). Veja tabela em inglês. Exemplo BRONZE: descobrir 252 merchants BR com tracking links custa ~`$0.76` (252 × $0.0020 + 252 × $0.0010).

### 🔗 Actors Relacionados

- [Shopee Affiliate Open API](https://apify.com/viralanalyzer/shopee-affiliate-products)
- [AliExpress Product Discovery](https://apify.com/viralanalyzer/aliexpress-affiliate-products)
- [Mercado Livre Scraper](https://apify.com/viralanalyzer/mercadolivre-scraper)
- [Amazon Brazil Intelligence](https://apify.com/viralanalyzer/amazon-brazil-intelligence)
- [Influencer Discovery Agent](https://apify.com/viralanalyzer/influencer-discovery-agent)

### 📝 Changelog

#### v1.0 (Atual, 2026-05-12)

- Integração Awin Publisher REST API com OAuth2 Bearer
- 4 modos de relação (`joined` / `pending` / `rejected` / `notjoined`)
- Multi-região com deduplicação por `advertiserId`
- Gerador de tracking link `cread.php` integrado com sub-ID via `clickref`
- Falha clara com instruções de 4 passos quando credenciais ausentes
- Guardrails anti-placeholder em cada registro
- **PPE tiered em 6 níveis** (FREE → DIAMOND) em `merchant-discovered` e `tracking-link-generated`
- Owner-skip para runs internos ViralAnalyzer (userId `rpTa37o1ctfdFWZk9`)
- Validado com 252 merchants BR ativos em token publisher real

# Actor input Schema

## `awinApiToken` (type: `string`):

OAuth2 token from ui.awin.com → Toolbox → API Credentials. Stored as a secret. Leave empty to read from environment variable AWIN\_API\_TOKEN.

## `awinPublisherId` (type: `string`):

Your numeric Publisher ID (ui.awin.com → Account Details). Leave empty to read from environment variable AWIN\_PUBLISHER\_ID.

## `relationship` (type: `string`):

Filter merchants by your join status: 'joined' (active partnerships), 'pending', 'rejected', 'notjoined'.

## `countryCode` (type: `string`):

Two-letter ISO country code (BR, US, GB, DE, AU, etc). Leave empty for all countries.

## `regions` (type: `array`):

Optional list of country codes to query separately. Overrides countryCode when set.

## `minCommissionValue` (type: `number`):

Drop merchants with default commission below this value (numeric, depends on commissionType).

## `buildTrackingLinks` (type: `boolean`):

When true, builds an Awin tracked deep-link to the advertiser homepage (or to targetUrlOverride). Each link triggers an additional PPE event.

## `targetUrlOverride` (type: `string`):

Optional. When set, tracking links point here instead of the advertiser homepage.

## `clickref` (type: `string`):

Optional tracking sub-ID embedded as 'clickref' in the deep-link (e.g. 'campanha\_verao\_instagram'). Used in Awin reports.

## Actor input object example

```json
{
  "relationship": "joined",
  "countryCode": "BR",
  "regions": [],
  "minCommissionValue": 1,
  "buildTrackingLinks": true
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing all Awin merchants matching the filter. Each item follows the dataset schema.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "regions": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("viralanalyzer/awin-multi-merchant-affiliate").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "regions": [] }

# Run the Actor and wait for it to finish
run = client.actor("viralanalyzer/awin-multi-merchant-affiliate").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "regions": []
}' |
apify call viralanalyzer/awin-multi-merchant-affiliate --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=viralanalyzer/awin-multi-merchant-affiliate",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Awin Multi-Merchant Affiliate Discovery — BR & Global Brands",
        "description": "Discover Awin affiliate programmes and generate tracked deep-links. Works with Awin Publisher API and accepts legacy ShareASale credentials (post-2024 merger). 4500+ merchants across BR, EU, US. BYOC: bring your awinApiToken + awinPublisherId from ui.awin.com Toolbox > API Credentials.",
        "version": "1.0",
        "x-build-id": "eIfxv7t5GyehoQaRp"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/viralanalyzer~awin-multi-merchant-affiliate/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-viralanalyzer-awin-multi-merchant-affiliate",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/viralanalyzer~awin-multi-merchant-affiliate/runs": {
            "post": {
                "operationId": "runs-sync-viralanalyzer-awin-multi-merchant-affiliate",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/viralanalyzer~awin-multi-merchant-affiliate/run-sync": {
            "post": {
                "operationId": "run-sync-viralanalyzer-awin-multi-merchant-affiliate",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "awinApiToken": {
                        "title": "Awin API Token",
                        "type": "string",
                        "description": "OAuth2 token from ui.awin.com → Toolbox → API Credentials. Stored as a secret. Leave empty to read from environment variable AWIN_API_TOKEN."
                    },
                    "awinPublisherId": {
                        "title": "Awin Publisher ID",
                        "type": "string",
                        "description": "Your numeric Publisher ID (ui.awin.com → Account Details). Leave empty to read from environment variable AWIN_PUBLISHER_ID."
                    },
                    "relationship": {
                        "title": "Relationship Filter",
                        "enum": [
                            "joined",
                            "pending",
                            "rejected",
                            "notjoined"
                        ],
                        "type": "string",
                        "description": "Filter merchants by your join status: 'joined' (active partnerships), 'pending', 'rejected', 'notjoined'.",
                        "default": "joined"
                    },
                    "countryCode": {
                        "title": "Country Code",
                        "type": "string",
                        "description": "Two-letter ISO country code (BR, US, GB, DE, AU, etc). Leave empty for all countries.",
                        "default": "BR"
                    },
                    "regions": {
                        "title": "Multi-Region",
                        "maxItems": 20,
                        "type": "array",
                        "description": "Optional list of country codes to query separately. Overrides countryCode when set.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "minCommissionValue": {
                        "title": "Minimum Default Commission",
                        "minimum": 0,
                        "type": "number",
                        "description": "Drop merchants with default commission below this value (numeric, depends on commissionType).",
                        "default": 1
                    },
                    "buildTrackingLinks": {
                        "title": "Build Tracking Links",
                        "type": "boolean",
                        "description": "When true, builds an Awin tracked deep-link to the advertiser homepage (or to targetUrlOverride). Each link triggers an additional PPE event.",
                        "default": true
                    },
                    "targetUrlOverride": {
                        "title": "Target URL Override",
                        "type": "string",
                        "description": "Optional. When set, tracking links point here instead of the advertiser homepage."
                    },
                    "clickref": {
                        "title": "Click Reference (sub-ID)",
                        "type": "string",
                        "description": "Optional tracking sub-ID embedded as 'clickref' in the deep-link (e.g. 'campanha_verao_instagram'). Used in Awin reports."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
