Skip to content

Internal APIs

This API is used for server-to-server communication between your product and AffiliateControl.
You can find a description of our internal API here:

Environments

Test environment

Production environment

Exports

The External API lets you request a data dump for the following five types of entities:

  • Reports — aggregated performance statistics (traffic, deposits, bets, revenue and fees) broken down by day, site, player, affiliate and offer. This is the analytics dump.
  • Players — the end users (players) attributed to your affiliates, with their registration, attribution and tracking details.
  • Affiliates — your affiliate accounts, including profile data, payout and referral settings, and current balances.
  • Payments History — the history of payouts to affiliates, with amounts and moderation / payout statuses.
  • Affiliate Offers — the commission offers (deals) assigned to affiliates, including their CPA / RevShare payout rules and brand visibility.

How exports work

Any data dump export is an asynchronous process. When you request an export, you receive an export ID:

{ "id": "export-id-here" }

You can use this ID in one of two ways to obtain the file:

  • Poll the status via the Misc API endpoint GET /misc/exports/{id}.
  • Provide a webhook_url request parameter. When the file is ready, a POST request is made to that URL with a JSON body containing the export ID, the download URL and the status:
{
  "exportId": "export-id-here",
  "downloadUrl": "url-to-data-dump-file",
  "status": "success"
}

status is either success or error.

Authentication

Every export request must include your API credentials as headers:

  • x-access-key — your access key.
  • x-secret-key — your secret key.

File format

Each export produces a single GZIP-compressed file. The format is fixed per export type:

Export Endpoint File format
Reports POST /exports/report GZIP CSV
Players POST /exports/players GZIP CSV
Affiliates POST /exports/affiliates GZIP CSV
Payments History POST /exports/payments-history GZIP CSV
Affiliate Offers POST /exports/affiliate-offers GZIP NDJSON

All endpoints are relative to the External API base URL (e.g. https://affiliatecontrol-api.com/external). See each sub-page for the request example and the full list of exported fields.

Rate limits

We restrict the number of requests to create dumps to no more than five per hour and no more than ten per 24 hours for each type. Contact us if you need to increase the limit.