Affilibee
Toggle sidebar

Get an affiliate

API reference for retrieving a single affiliate by its slug.

Endpoint

GET
/api/v2/affiliates/{affiliate:slug}

Authorization

Learn more
Authorization
string
header
required

The Bearer token generated in the Affilibee dashboard.

Body

application/json

affiliate
string
required

The slug of the affiliate to retrieve.

Example requests

curl -X GET https://affilibee.com/api/v2/affiliates/john-doe \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json"
const token = "YOUR_ACCESS_TOKEN";
const url = "https://affilibee.com/api/v2/affiliates/john-doe";

fetch(url, {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${token}`,
    "Accept": "application/json"
  }
})
  .then(response => response.json())
  .then(data => console.log("Success:", data))
  .catch(error => console.error("Error:", error));
import requests

token = "YOUR_ACCESS_TOKEN"
url = "https://affilibee.com/api/v2/affiliates/john-doe"

response = requests.get(
    url,
    headers={
        "Authorization": f"Bearer {token}",
        "Accept": "application/json",
    },
)

print(response.json())
<?php

require 'vendor/autoload.php';

use GuzzleHttp\Client;

$token = 'YOUR_ACCESS_TOKEN';

$client = new Client([
    'base_uri' => 'https://affilibee.com/api/v2',
    'headers' => [
        'Authorization' => "Bearer $token",
        'Accept' => 'application/json',
    ],
]);

$response = $client->get('affiliates/john-doe');

echo $response->getBody();

Responses

application/json

200
Success

Returned when the affiliate is successfully retrieved.

404
Not Found

Returned when the affiliate is not found or does not belong to the authenticated merchant.

401
Unauthorized

Returned when the request does not include a valid Bearer token.

Response examples

{
    "success": true,
    "data": {
        "affiliate": {
            "name": "John Doe",
            "slug": "john-doe",
            "status": "active",
            "tier": {
                "name": "Gold",
                "slug": "gold"
            },
            "accepted_at": "2026-04-05T18:30:00Z",
            "created_at": "2026-04-01T10:00:00Z"
        }
    },
    "errors": null,
    "meta": {
        "trace_id": "20260405-183000:api:abc12"
    }
}
{
    "success": false,
    "data": null,
    "errors": {
        "message": [
            "Not Found"
        ]
    },
    "meta": {
        "trace_id": "20260405-183000:api:abc12"
    }
}
{
    "success": false,
    "data": null,
    "errors": {
        "message": [
            "Unauthenticated."
        ]
    },
    "meta": {
        "trace_id": "20260405-183000:api:abc12"
    }
}

Notes

  • The affiliate must be associated with your merchant account.

Got questions? We're here for you.

We help teams run affiliate programs through API-first integrations that fit the platform they already use.

© 2025 Affilibee Handelsbolag (969802-2481)

Integrations

API Integration
How can we assist you today?

Fill in the form below and we'll get back to you as soon as possible.

Name
Email
Message