Before You Start
Understanding the Affelios API
Before integrating with the Affelios API, it’s important to understand how to interact with our platform programmatically.Developer Resources
- API authentication methods
- Available endpoints and data structures
- Request/response examples
- SDKs and code samples
- Testing tools and playground
API Reference
Setting Up Custom Integration
Step 1: Configure Brand Integration Settings
Access Brand Settings
Select Custom Integration
Configure API Settings
Step 2: Capture Click Keys from Tracking Links
Once your custom integration is set up, you’ll need to capture click keys from affiliate tracking links to properly attribute conversions.Understanding Click Keys
Understand Click Key Generation
Learn About Tracking Links
Implement Click Key Capture
Click Key Capture Example
Here’s a practical example of how to capture click keys from affiliate tracking links:- Store click keys in both cookies and server-side sessions for reliability
- Use a 30-day expiration to match Affelios’ attribution window
- Always include the click key when submitting user registrations or purchases
- Store click keys in your database alongside user and transaction records
Step 3: Send Customer Records to Affelios
When a new customer registers in your system, you need to send their information to Affelios using the Customer API endpoint.Customer API Endpoint
/api/v1/customer - Creates a new customer item in Affelios with tracking information for proper attribution.Required Fields
Based on the API reference, the following fields are required:externalId- Your internal customer IDbrandId- The Affelios brand ID for your programclickKey- The click key captured from the affiliate tracking link
Customer Creation Example
Here’s how to send customer data to Affelios when they register:- Always include the
clickKeywhen creating customers to ensure proper attribution - The
externalIdshould be your internal customer ID for reference - The
brandIdis your specific Affelios brand/program ID - Registration should not fail if Affelios API is unavailable - log errors but continue
- Store the Affelios customer ID returned in the response for future reference
- Ensure GDPR compliance by only sending anonymized data
Step 4: Plan Transaction Aggregation Strategy
For high-volume systems, consider how frequently you want to send transactions to Affelios, as each transaction incurs a cost.Transaction Cost Consideration
Aggregation Strategies
Real-time Processing
Real-time Processing
- Send each transaction immediately to Affelios
- Provides real-time attribution and reporting
- Higher cost but maximum accuracy
- Suitable for systems with < 10,000 transactions/month
Batch Processing
Batch Processing
- Aggregate transactions by customer over a time window (e.g., daily, hourly)
- Send aggregated data at predetermined intervals
- Significantly reduces API costs
- Recommended for systems with > 10,000 transactions/month
Hybrid Approach
Hybrid Approach
- Real-time for high-value transactions
- Batch processing for low-value/frequent transactions
- Balance between cost and accuracy
- Customize based on transaction value thresholds
Implementation Examples
Step 5: Test Your Integration
Before going live, thoroughly test your integration to ensure everything works correctly.Test Click Key Capture
Test Customer Creation
Test Transaction Processing
Test Error Handling
Testing Tools
Step 6: Monitor and Maintain
Once your integration is live, ongoing monitoring and maintenance are essential for success.Performance Monitoring
Performance Monitoring
- Monitor API response times and success rates
- Set up alerts for failed requests or high error rates
- Track transaction processing delays
- Monitor click key capture rates
Data Quality
Data Quality
- Regularly verify customer attribution is working correctly
- Check that transactions are being processed and attributed properly
- Monitor for missing or duplicate data
- Validate click key tracking across different traffic sources
Cost Optimization
Cost Optimization
- Review transaction volume and adjust aggregation strategy if needed
- Monitor API costs and usage patterns
- Consider batching strategies for high-volume periods
- Regular cost-benefit analysis of real-time vs. batch processing
Troubleshooting
Common Issues
Click Key Not Captured
Click Key Not Captured
- Verify affiliate tracking links are properly formatted
- Check that your click key capture code is running on all pages
- Ensure tracking parameters match your capture logic
- Test with different affiliate tracking link formats
Customer Attribution Failing
Customer Attribution Failing
- Verify click key is being passed to customer creation API
- Check that click key hasn’t expired (30-day window)
- Ensure customer creation happens within attribution window
- Validate click key format and encoding
Transaction Processing Issues
Transaction Processing Issues
- Check transaction API endpoint and authentication
- Verify customer ID mapping between systems
- Ensure transaction data includes required fields
- Review batch processing logic if using aggregation
Getting Help
Check Documentation
Review Logs
Test with API Tools
Contact Support
Best Practices Summary
Integration Checklist
- ✅ Click key capture implemented and tested
- ✅ Customer creation API integrated with proper attribution
- ✅ Transaction processing strategy chosen and implemented
- ✅ Error handling and retry logic in place
- ✅ GDPR compliance ensured (no PII sent to Affelios)
- ✅ Testing completed across all integration points
- ✅ Monitoring and alerting configured
- ✅ Documentation updated for your team
Next Steps
Your Integration is Complete!
What Happens Next
Go Live
Monitor Performance
Optimize Strategy
Scale Success