Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.affelios.com/llms.txt

Use this file to discover all available pages before exploring further.

Authentication Overview

The Affelios Platform API uses API Key authentication for all requests. This simple and secure method is ideal for server-to-server integrations and provides reliable access control.

Authentication Method

  • API Key Authentication (Primary)
    • Simple header-based authentication using X-Api-Key
    • Suitable for server-to-server integrations
    • Long-lived credentials with configurable expiration
    • Per-operator access control

API Key Authentication

Obtaining API Keys

API keys are generated through the Affelios dashboard:
  1. Via Dashboard
    • Log into your Affelios account
    • Navigate to Settings > API Keys
    • Click “Generate New API Key”
    • Provide a descriptive name for your integration
    • Copy and securely store the generated key

API Key Structure

5XPmdXTl8j93xI0j45b6a3fd-1062-4c11-b434-b8de3e4eafeb

└── Unique identifier with random characters and UUID format

Using API Keys

All API requests must include your API key in the X-Api-Key header: Required Header:
X-Api-Key: 5XPmdXTl8j93xI0j45b6a3fd-1062-4c11-b434-b8de3e4eafeb
const response = await fetch('https://api.affelios.com/api/v1/customer', {
  method: 'POST',
  headers: {
    'X-Api-Key': '5XPmdXTl8j93xI0j45b6a3fd-1062-4c11-b434-b8de3e4eafeb',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    externalId: 'customer_123',
    brandId: 'brand_456'
  })
});

Troubleshooting

Common Issues

401 Unauthorized:
  • Verify API key is correct and active
  • Check that key has required permissions
  • Ensure key hasn’t been revoked or expired
403 Forbidden:
  • Confirm user has necessary permissions
  • Check if key scope matches request
  • Verify program access rights
Insufficient Permissions:
  • Review key permission configuration
  • Request additional permissions if needed
  • Check user role and access level
Data Access Denied:
  • Verify data belongs to user’s scope
  • Check program-level permissions
  • Confirm affiliate vs operator access
Connection Issues:
  • Verify API endpoint URL
  • Check network connectivity
  • Confirm SSL/TLS configuration

Getting Help

Support Resources

If you encounter issues with API authentication or usage:
  • 📚 API Documentation: API Reference - Detailed endpoint information and examples
  • 🔧 Troubleshooting: Error Handling - Common issues and solutions
  • 🧪 Testing: Testing Guide - Tools and resources for testing your integrations
  • Best practices: Best Practices - Guidelines for secure and efficient integrations