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.
Important note: Do NOT store your API Key in any client-side or accessible code and ensure you only set permissions that are specifically required for the use case needed. Permission modules can be added or removed at any time, however, the API Key itself will only be accessible at the point of creation.
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.
Take a look at a few examples of how you might call this method using curl, Node, or C#:
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.
Creates a new customer item.
POST/api/v1/customer
Header parameters
Body
The new customer item body.
brandIdnullable string
externalIdnullable string
externalBrandIdnullable string
clickIdnullable string
usernamenullable string
registrationDatestring (date-time)
countrynullable string
country_codenullable string
revShareExcludednullable boolean
cpaExcludednullable boolean
Response
Success
Body
idnullable string
operatorIdnullable string
updatedTsstring (date-time)
createdTsnullable string (date-time)
isIdEmptyboolean
createdBynullable string
importIdnullable string
externalIdnullable string
externalBrandIdnullable string
usernamenullable string
countrynullable string
country_codenullable string
registerIpnullable string
referringUrlnullable string
registrationDatestring (date-time)
hasDepositedboolean
ftdDatestring (date-time)
cpaQualifiedboolean
cpaQualificationDatestring (date-time)
lifetimeRevenuenumber (double)
firstDepositAmountnullable number (double)
lifetimeDepositsnullable number (double)
lifetimeCommissionnumber (double)
trackingnullable all of
categorynullable string
labelnullable string
revShareExcludedboolean
cpaExcludedboolean
transactionsnullable array of Transaction (object)