Affiliate data aggregator integration
Our Affiliate API docs are below.
https://app.avelonetwork.com/assets/swagger.yaml
You can access any endpoint that starts with /api/affiliate by using basic (username / password) authentication programmatically.
Types of affiliates
Affiliates can be individuals or publishers. It makes no difference from the Avelon system’s point of view.
Avelon will set you up with two different types of accounts. A subnetwork account and multiple affiliate accounts for each one of your affiliates. If we are already working with an existing affiliate, a separate account will need to be created. Subnetwork affiliates are clearly marked as such on our platform.
Integration is headless and data is consumed via two APIs.
Endpoints
Endpoints which are available within our API docs are below:
| Endpoint | Age |
|---|---|
| /api/affiliate/link/create | Generates new affiliate link |
| /api/affiliate/links | Lists all affiliate links |
| /api/affiliate/commission | Exports current commission data |
| /api/affiliate/retailers | Returns a list of merchants whose program the affiliate has been approved for |
| /api/affiliate/productfeed/download/{retailerPk} | Downloads product feeds |
| /api/affiliate/purchases/{monthStartDay} | Reports on all sales |
Affiliate links
There are two types of links. Affiliate link, that actually exist in the Avelon system and ad-hoc links, which will automatically create affiliate links when clicked.
Affiliate link syntax:
https://{retailerPk}.avln.me/c/{linkPk}
Example:
https://myretailerpk.avln.me/c/gSrIEthtieiy
Affiliate links need to be created in the Avelon system before they can be used. There are two ways to do this programmatically.
- via the Affiliate API (see above)
- via ad-hoc links
Ad-hoc links are URLs that, when clicked, will create an actual affiliate link or return an existing one and redirect to the destination the same way as clicking an actual affiliate link.
Ad-hoc link syntax:
https://app.avelonetwork.com/api/c/{retailerPk}/@@@/{JWT}
Replace the @@@ with the affiliatePk of your choice. Ensure that the affiliate is approved on the retailer’s program, otherwise the click will result in an error. Use the /listAffiliates endpoint to do that. (see above)
You can pass in your own subnetwork ID in the subId parameter in the URL. You can just append it to any affiliate or ad-hoc link. E.g. ?subId=mySubId. The subId will be reported back to you when you export purchases.