Getting Started
Get started with the Affelios Platform API
Let's get you set up with the Affelios Platform API so you can interact with the Affelios system programmatically.
Get your API key
Your API requests are authenticated using an API key sent in the X-Api-Key
HTTP Header:
-H 'X-Api-Key: YOUR_API_KEY'
Any request sent to an endpoint that requires Authorization and doesn't include an X-Api-Key will return a 401 (Unauthorized) error.
You can generate an API key from your Dashboard at any time by navigating to Settings > API Keys
Once created click Copy to Clipboard and store the key somewhere safe ensuring that it is not exposed.
Make your first request
To make your first request, send an authenticated request to the customer
endpoint using an External Customer Id and a Click Id.
POST /api/v1/customer HTTP/1.1
Host:
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 226
{
"brandId": "text",
"externalId": "text",
"externalBrandId": "text",
"clickId": "text",
"username": "text",
"registrationDate": "2025-06-28T19:29:48.174Z",
"country": "text",
"country_code": "text",
"revShareExcluded": true,
"cpaExcluded": true
}
Success
{
"id": "text",
"operatorId": "text",
"updatedTs": "2025-06-28T19:29:48.174Z",
"createdTs": "2025-06-28T19:29:48.174Z",
"isIdEmpty": true,
"createdBy": "text",
"importId": "text",
"externalId": "text",
"externalBrandId": "text",
"username": "text",
"country": "text",
"country_code": "text",
"registerIp": "text",
"referringUrl": "text",
"registrationDate": "2025-06-28T19:29:48.174Z",
"hasDeposited": true,
"ftdDate": "2025-06-28T19:29:48.174Z",
"cpaQualified": true,
"cpaQualificationDate": "2025-06-28T19:29:48.174Z",
"lifetimeRevenue": 1,
"firstDepositAmount": 1,
"lifetimeDeposits": 1,
"lifetimeCommission": 1,
"tracking": {
"clickId": "text",
"affiliateId": "text",
"affiliateName": "text",
"campaignId": "text",
"campaignName": "text",
"brandId": "text",
"brandName": "text",
"productId": "text",
"productName": "text",
"mediaId": "text",
"media": {
"type": "text",
"text": "text",
"imageUrl": "text"
},
"customParameter": "text",
"date": "2025-06-28T19:29:48.174Z",
"referringUrl": "text"
},
"category": "text",
"label": "text",
"revShareExcluded": true,
"cpaExcluded": true,
"transactions": [
{
"id": "text",
"operatorId": "text",
"updatedTs": "2025-06-28T19:29:48.174Z",
"createdTs": "2025-06-28T19:29:48.174Z",
"isIdEmpty": true,
"createdBy": "text",
"importId": "text",
"integrationType": "text",
"customerId": "text",
"type": "text",
"externalId": "text",
"externalCustomerId": "text",
"externalBrandId": "text",
"externalProductId": "text",
"country": "text",
"country_code": "text",
"depositAmount": 1,
"firstTransaction": true,
"grossRevenue": 1,
"revenueAmount": 1,
"wageredAmount": 1,
"taxes": 1,
"costOfGoodsSold": 1,
"paymentFees": 1,
"cpaQualified": true,
"revShareCommission": 1,
"cpaCommission": 1,
"adjustmentAmount": 1,
"totalCommission": 1,
"transactionDate": "2025-06-28T19:29:48.174Z",
"tracking": {
"clickId": "text",
"affiliateId": "text",
"affiliateName": "text",
"campaignId": "text",
"campaignName": "text",
"brandId": "text",
"brandName": "text",
"productId": "text",
"productName": "text",
"mediaId": "text",
"media": {
"type": "text",
"text": "text",
"imageUrl": "text"
},
"customParameter": "text",
"date": "2025-06-28T19:29:48.174Z",
"referringUrl": "text"
},
"category": "text",
"label": "text",
"note": "text",
"childAffiliateIds": [
"text"
],
"payoutInfo": {
"affiliateId": "text",
"affiliateName": "text",
"invoicePeriod": "text",
"invoiceDate": "2025-06-28T19:29:48.174Z",
"dueDate": "2025-06-28T19:29:48.174Z",
"payoutMethod": {
"id": "text",
"operatorId": "text",
"updatedTs": "2025-06-28T19:29:48.174Z",
"createdTs": "2025-06-28T19:29:48.174Z",
"isIdEmpty": true,
"createdBy": "text",
"companyId": "text",
"companyName": "text",
"type": "text",
"payee": "text",
"walletAddress": "text",
"email": "text",
"iban": "text",
"swift": "text",
"accountNumber": "text",
"sortcode": "text",
"bankName": "text",
"bankAddress": {
"addressLine": "text",
"addressLine2": "text",
"city": "text",
"region": "text",
"country": "text",
"postcode": "text"
}
},
"paymentDate": "2025-06-28T19:29:48.174Z",
"amount": 1,
"tax": 1,
"total": 1,
"notes": "text",
"email": "text",
"website": "text",
"affiliateContact": "text",
"affiliateCompany": "text",
"affiliateCompanyNo": "text",
"affiliateAddress": {
"addressLine": "text",
"addressLine2": "text",
"city": "text",
"region": "text",
"country": "text",
"postcode": "text"
},
"affiliateTaxIds": [
{
"id": "text",
"value": "text",
"type": "text",
"country": "text",
"stripeId": "text",
"stripeStatus": "text"
}
],
"affiliateVatRegistered": true,
"affiliateTaxRate": 1,
"companyName": "text",
"companyInvoiceAddress": {
"addressLine": "text",
"addressLine2": "text",
"city": "text",
"region": "text",
"country": "text",
"postcode": "text"
},
"companyTaxIds": [
{
"id": "text",
"value": "text",
"type": "text",
"country": "text",
"stripeId": "text",
"stripeStatus": "text"
}
],
"companyNumber": "text",
"accountsEmail": "text",
"currencyCode": "text"
}
}
]
}
ExternalId*
Required. The Customer Id from your system.
ExternalBrandId*
Required. The identifier that you configured in Affelios for the Brand or Shop that this customer registered to.
RegistrationDate*
Required. An ISO-8601 Zulu Timestamp of the date and time when the customer registered in your system.
ClickKey
The ClickKey is generated by Affelios and passed to your website or application. If no ClickKey exists, Affelios will either reject this customer or assign it to an internal Organic Tracking campaign which can be configured in System Settings.
Take a look at a few examples of how you might call this method using curl, Node, or C#:
curl -X POST https://platform.affelios.com/api/v1/customer
-H 'Content-Type: application/json'
-H 'X-Api-Key: YOUR_API_KEY'
-d '{
"externalId": "YOUR_CUSTOMER_ID",
"externalBrandId": "YOUR_BRAND_ID",
"clickKey": "CLICK_KEY",
"registrationDate": "DATETIME"
}'
Last updated