1. Getting Started
Evertrack Affiliate API provides programmatic access to the tracker data and statistics. This API is accessed by making HTTPS requests to a specific endpoint URL. It is REST-compliant, so you can program your application in your preferred programming language, using HTTP client. This guide describes usage details of this API.

1.1 Get API key
Log in to Evertrack affiliate dashboard and request your API key on the “API” page. Once approved, your key will be available there.
2. Requests

2.1 Requirements
Requests must be sent over HTTPS with any payload formatted in JSON (application/json). Every request must include the authorization header and, optionally, content type:
Header Value Description
Authorization Api-Key Authorization header, where is your API key. Required.
Content-Type application/json Content type for requests with payload. Optional.
Use Base API URL as prefix for all endpoint paths described below. Base API URL - https://api.affiliate.evertrack.io/v1 In the text below, we provide sample requests using cURL. You can use them as reference to test the API. Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/offer/100' \
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'

2.2 Pagination
Depending on the endpoint, the results returned may be paginated. You can page through the results by using the following parameters in the query string.
Parameter name Default value Max value Description
limit 25 500 The number of results returned per page.
skip 0 - Amount of records to skip. For example, if the limit is 50
and you want to retrieve the page #2,
then you need such query parameters: “&limit=50&skip=50”.
To get total records count, read value of "x-total-count" response header.

2.3 Sorting
Depending on the endpoint, the results returned may be sorted. Add the "sort" parameter with field name or comma-delimited field names to sort ascending. To use descending sorting, add "-" prefix to field name.
Parameter name Description
sort Field name or comma-delimited field names to sort ascending. To use descending sorting, add "-" prefix to field name. Example: "&sort=-cost".
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/offers?sort=-cost'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'

2.3 Filtering
Depending on the endpoint, the results returned may be filtered. Add parameters with field names and corresponding filter values to endpoint URL. For example, to filter by country, add "&country=us" parameter. To filter by multiple values, use comma-delimited list, for example "&country=us,ca". To filter by range, use ">", ">=", "<", "<=" parameters. For example, to filter by cost from 0.2 to 0.5, add "&cost>=0.2&cost<=0.5".

Filtering rules:
Query parameter Example Description
key=val &countries=us Filter by exact value
key=val1,val2 &countries=us,ca Filter by list of values
key>val &cost>0.2 Filter records with values greater than filter value
key &cost<0.5 Filter records with values less than filter value
key>=val &cost>=0.2 Filter records with values greater than or equal to filter value
key<=val &cost<=0.5 Filter records with values less than or equal to filter value
key!=val &countries!=us Filter records not equal to filter value
You can select only required fields to return in result by "fields" parameter.
Parameter name Description
fields Comma-delimited field names to return. Example: "&fields=title,countries,cost".
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/offers?date>=2018-11-11T00:00:00.000Z&date<=2018-11-11T23:59:59.999Z&fields=title,countries,cost'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'

2.3 Rate limiting
Evertrack Affiliate API allows a maximum 20 requests per second. Requests above this rate will be discarded.

Response headers:
Header Description
X-RateLimit-Limit Rate limit
X-RateLimit-Remaining Remaining request count
X-RateLimit-Reset Rate limit reset time
3. Responses

3.1 Format
Each response returns HTTP response code in header and result JSON object in body. In case of success the JSON object returned for each endpoint is different. An error object will contain an “errors” field with error messages. An “errors.message” sub-field is a human readable message.

Example success response:
HTTP: 200 OK
{“success”:true}
Example error response:
HTTP: 400
{“errors”:{“message”:“Invalid parameters”}}

3.2 HTTP response codes
HTTP status code Status Description
200 OK The request was successful
201 Created The object was successfully created
204 No content The object was successfully updated or deleted
400 Bad request Request is invalid. Check the error code in JSON
401 Unauthorized You did not authenticate. Make sure you passed the Authorization header
403 Forbidden You do not have the rights to access the resource
404 Not found Resource not found. Make sure you are calling existing endpoint and correct resource ID
429 Too Many Requests Rate limit exceeded
500 Internal server error An unexpected condition that prevented server from fulfilling the request
4. Endpoints

4.1 /offers
This endpoint is used to retrieve available offers list. Returns array of JSON objects.
Method URL path
GET /offers
Additional query parameters (see offer fields for the full list):
Parameter name Type Description
date Date (String) Date in ISO 8601 format ("2018-11-11T00:00:00.000Z"). Use it as date range filter,
for example "&date>=2018-11-11T00:00:00.000Z&date<=2018-11-11T23:59:59.999Z"
Offer fields:
See 4.2 /offer/:id for details. Additionally, you can filter offers by date with "date" parameter, which is alias to "created" field.
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/offers?limit=50&skip=50'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
[
  {
    "cost": 0.1,
    "is_private": false,
    "require_approval": true,
    "cap": false,
    "daily_impressions": 0,
    "monthly_impressions": 0,
    "lifetime_impressions": 0,
    "daily_clicks": 0,
    "monthly_clicks": 0,
    "lifetime_clicks": 0,
    "daily_conversions": 0,
    "monthly_conversions": 0,
    "lifetime_conversions": 0,
    "countries": [],
    "advanced_targeting": false,
    "status": "active",
    "categories": [
      "music"
    ],
    "id": 108,
    "title": "Talking Tom Gold Run Android Non incent",
    "cover": "https://lh3.googleusercontent.com/hC9yzrjX059LZV8hdO2w_4_NrnX9X_VR-cldRp76Kvveg5kjUwtpdttJ7q_KAypTBfA",
    "developer": "Outfit7 Limited",
    "developerurl": "https://play.google.com/store/apps/dev?id=5630538819012062144&hl=en",
    "appname": "Talking Tom Gold Run",
   "description": "Run to chase after the robber and explore the endless running worlds of Talking Tom Gold Run",
   "preview_url": "https://play.google.com/store/apps/details?id=com.outfit7.talkingtomgoldrun",
   "type_id": "cpa",
   "created": "2018-10-02T12:28:36.894Z",
   "approval_status": "pending"
 },
 {
   "cost": 0.9,
   "is_private": false,
   "require_approval": true,
   "cap": false,
   "daily_impressions": 0,
   "monthly_impressions": 0,
   "lifetime_impressions": 0,
   "daily_clicks": 0,
   "monthly_clicks": 0,
   "lifetime_clicks": 0,
   "daily_conversions": 0,
   "monthly_conversions": 0,
   "lifetime_conversions": 0,
   "countries": [],
   "advanced_targeting": false,
   "status": "active",
   "categories": [],
   "id": 107,
   "title": "Skype Android Non incent",
   "cover": "https://lh3.googleusercontent.com/d6TTnyRybU8B2naK8a0y1_u8ufjtK5V-mizS6o1tCx0U1aYPX9nJzcq9rSm5W2VVzBw",
   "developer": "Skype",
   "developerurl": "https://play.google.com/store/apps/developer?id=Skype",
   "appname": "Skype - free IM & video calls",
   "description": "Say hello with an instant message, voice or video call",
   "preview_url": "https://play.google.com/store/apps/details?id=com.skype.raider",
   "type_id": "cpa",
   "created": "2018-10-02T12:20:13.458Z",
   "approval_status": "pending"
  }
]

4.2 /offer/:id
Get offer data. Returns JSON object representing offer record.
Method URL path and query Description
GET /offers/:id Where “:id” is offer ID.
Offer fields:
Name Type Description
id Number Offer ID
title String Offer title
cover String URL of offer icon (cover)
description String Offer description
preview_url String URL of offer in store
type_id String Offer type
cost Number Offer payout, $
require_approval Boolean Require approval flag.
approval_status String Your application to offer status. One of:
-"approved"
-"pending"
-"require"
-"blocked"
cap Boolean Offer has capping enabled flag
daily_impressions Number Daily impressions. Not limited when 0.
monthly_impressions Number Monthly impressions. Not limited when 0.
lifetime_impressions Number Lifetime impressions. Not limited when 0.
daily_clicks Number Daily clicks. Not limited when 0.
monthly_clicks Number Monthly clicks. Not limited when 0.
lifetime_clicks Number Lifetime clicks. Not limited when 0.
daily_conversions Number Daily conversions. Not limited when 0.
monthly_conversions Number Monthly conversions. Not limited when 0.
lifetime_conversions Number Lifetime conversions. Not limited when 0.
countries Array Offer countries list. Is active when “enforce_geo” flag is true. Countries are presented by 2-letter country code.
advanced_targeting Boolean Advanced targeting flag. Offer can have platform-specific rules, which are enabled by this flag. Example rule is targeting by OS version.
rules Array Offer rules for advanced targeting. Array contains JSON objects with the following fields:
-"logic" - rule logic ("allow" or "deny")
-"rule_id"
-"name" - rule name
status String Offer status. One of:
-“active”
-“paused”
-“pending”
-“deleted”
categories Array Offer categories list
created Date (String) Offer creation date
developer String Offer developer
developerurl String Offer developer link
appname String Application name
impressions Number Today impressions statistic
clicks Number Today clicks statistic
conversions Number Today conversions statistic
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/offer/108&fields=title,countries,cost,approval_status'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
{
  "cost": 0.1,
  "is_private": false,
  "require_approval": true,
  "cap": false,
  "daily_impressions": 0,
  "monthly_impressions": 0,
  "lifetime_impressions": 0,
  "daily_clicks": 0,
  "monthly_clicks": 0,
  "lifetime_clicks": 0,
  "daily_conversions": 0,
  "monthly_conversions": 0,
  "lifetime_conversions": 0,
  "countries": [],
  "advanced_targeting": false,
  "status": "active",
  "categories": [
    "music"
  ],
  "id": 108,
  "title": "Talking Tom Gold Run Android Non-Incent",
  "cover": "https://lh3.googleusercontent.com/hC9yzrjX059LZV8hdO2w_4_NrnX9X_VR-cldRp76Kvveg5kjUwtpdttJ7q_KAypTBfA",
  "developer": "Outfit7 Limited",
  "developerurl": "",
  "appname": "Talking Tom Gold Run",
  "description": "Run to chase after the robber and explore the endless running worlds of Talking Tom Gold Run",
  "preview_url": "https://play.google.com/store/apps/details?id=com.outfit7.talkingtomgoldrun",
  "type_id": "cpa",
  "created": "2018-10-02T12:28:36.894Z",
  "approval_status": "pending"
 } 

4.3 /offers/csv
Download offers list in CSV format.
Method URL path
GET /offers/csv
In this request limit is optional (no limit by default).

Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/offers/csv'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'

4.4 /offer/approval/:id
Get information about your application to offer or apply to the offer.
Method URL path and query Description
GET /offer/approval/:id Where “:id” is offer ID. Get approval information.
POST /offer/approval/:id Where “:id” is offer ID, and request body is empty. Apply to the offer. On success, returns the same response as GET request, otherwise returns error message.
Response fields:
Name Type Description
offer_id Number Offer ID
affiliate_id Number Your Affiliate ID
status String Your application to offer status. One of:
-"approved"
-"pending"
-"require"
-"blocked"
is_requested Boolean Offer application request flag
Example read approval state request:
curl -i 'https://api.affiliate.evertrack.io/v1/offer/approval/108'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
{
  "offer_id": 108,
  "affiliate_id": 1,
  "status": "require",
  "is_requested": false
}
Example offer approval request:
curl -i -X POST 'https://api.affiliate.evertrack.io/v1/offer/approval/108'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
{
  "offer_id": 108,
  "affiliate_id": 1,
  "status": "pending",
  "is_requested": true
 } 

4.5 /report/conversions
Get conversion report. Returns array of JSON objects.
Method URL path and query
GET /report/conversions
Query fields:
Name Type Description
date Date (String) Date in ISO 8601 format ("2018-11-14T00:00:00.000Z"). Example of date range filter: "&date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999Z". This parameter is alias to "created" field.
offer_id Number Offer ID
is_approved Boolean Conversion approved flag
affiliate_source String "source" parameter from click URL
String "aff_sub" parameter from click URL
See 4.6 /report/conversion/:id for field descriptions.
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/report/conversions?limit=50&date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999Z'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
[
  {
    "is_approved": true,
    "status_message": [],
    "_id": "5beb6ac9a1616929addf7300",
    "created": "2018-11-14T00:22:31.147Z",
    "transaction_id": "5beb6875a1616929addf58ba",
    "idfa": "",
    "gaid": "",
    "affiliate_id": 1,
    "advertiser_id": 1,
    "offer_id": 6,
    "offer_title": "War Robots",
    "affiliate_source": "Lakin.io",
    "affiliate_sub1": "",
    "affiliate_sub2": "",
    "affiliate_sub3": "",
    "affiliate_sub4": "",
    "affiliate_sub5": "",
    "session_ip": "184.47.109.99",
    "session_user_agent": "Mozilla/5.0 (iPad; CPU OS 8_1_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B435 Safari/600.1.4",
    "session_created": "2018-11-14T00:12:37.252Z",
    "track_url": "https://advertisertracker.com/aff_c?offer_id=1111&aff_id=2222&aff_sub=5beb6875a1616929addf58ba&affiliate_id=1&aff_sub2=",
    "base_url": "http://www.example.com/",
    "browser_name": "Mobile Safari",
    "browser_version": "8.0",
    "engine_name": "WebKit",
    "engine_version": "600.1.4",
    "os_name": "iOS",
    "os_version": "8.1.1",
    "device_model": "iPad",
    "device_type": "tablet",
    "device_vendor": "Apple",
    "cpu_architecture": null,
    "continent_geoname_id": "6255149",
    "continent_code": "na",
    "continent_name": "North America",
    "country_geoname_id": "6252001",
    "country_code": "us",
    "country_name": "United States"
  },
  {
    "is_approved": false,
    "status_message": [
      "IP is not whitelisted"
    ],
    "_id": "5beb6d5ca1616929addf940c",
    "created": "2018-11-14T00:33:30.577Z",
    "transaction_id": "5beb6c7aa1616929addf8966",
    "idfa": "",
    "gaid": "",
    "affiliate_id": 1,
    "advertiser_id": 1,
    "offer_id": 1,
    "offer_title": "Star Wars: Galaxy of Heroes",
    "affiliate_source": "",
    "affiliate_sub1": "114",
    "affiliate_sub2": "",
    "affiliate_sub3": "",
    "affiliate_sub4": "",
    "affiliate_sub5": "",
    "session_ip": "39.182.150.83",
    "session_user_agent": "Mozilla/5.0 (Windows NT 6.1; rv:34.0) Gecko/20100101 Firefox/34.0",
    "session_created": "2018-11-14T00:29:45.792Z",
    "track_url": "https://advertisertracker.com/aff_c?offer_id=1111&aff_id=2222&aff_sub=5beb6c7aa1616929addf8966&affiliate_id=1&aff_sub2=",
    "base_url": "http://example.com/",
    "browser_name": "Firefox",
    "browser_version": "34.0",
    "engine_name": "Gecko",
    "engine_version": "34.0",
    "os_name": "Windows",
    "os_version": "7",
    "device_model": null,
    "device_type": null,
    "device_vendor": null,
    "cpu_architecture": null,
    "continent_geoname_id": "6255147",
    "continent_code": "as",
    "continent_name": "Asia",
    "country_geoname_id": "1814991",
    "country_code": "cn",
    "country_name": "China"
  }
 ] 

4.6 /report/conversion/:id
Get conversion object.
Method URL path and query Description
GET /report/conversion/:id Where ":id” is conversion ID.
Conversion fields:
Name Type Description
created Date (String) Timestamp of conversion
offer_id Number Offer id
offer_title String Offer title
is_approved Boolean Conversion approved flag
cost Number Conversion payout, $
transaction_id String Transaction (click) ID
affiliate_source String
affiliate_sub1 String
affiliate_sub2 String
affiliate_sub3 String
affiliate_sub4 String
affiliate_sub5 String
session_created Date (String) Timestamp of transaction start (click timestamp)
session_ip String Click IP
session_user_agent String Click user agent
session_refer String Click referrer
session_url String Click original URL
base_url String Click referrer page, if available
type_id String Offer type
country_code String 2-letter country code
country_name String Country name
browser_name String Browser name
browser_version String Browser version
os_name String OS name
os_version String OS version
device_model String Device model
device_type String Device type
device_vendor String Device vendor
idfa String IDFA (Apple identifier for advertisers)
gaid String GAID (Google advertising ID)
status_message String Empty if conversion is approved or rejection reason.
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/report/conversion/5beb6ac9a1616929addf7300'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
{
  "is_approved": true,
  "status_message": [],
  "_id": "5beb6ac9a1616929addf7300",
  "created": "2018-11-14T00:22:31.147Z",
  "transaction_id": "5beb6875a1616929addf58ba",
  "idfa": "",
  "gaid": "",
  "affiliate_id": 1,
  "advertiser_id": 1,
  "offer_id": 6,
  "offer_title": "War Robots",
  "affiliate_source": "Lakin.io",
  "affiliate_sub1": "",
  "affiliate_sub2": "",
  "affiliate_sub3": "",
  "affiliate_sub4": "",
  "affiliate_sub5": "",
  "session_ip": "184.47.109.99",
  "session_user_agent": "Mozilla/5.0 (iPad; CPU OS 8_1_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B435 Safari/600.1.4",
  "session_created": "2018-11-14T00:12:37.252Z",
  "base_url": "http://www.example.com/",
  "browser_name": "Mobile Safari",
  "browser_version": "8.0",
  "engine_name": "WebKit",
  "engine_version": "600.1.4",
  "os_name": "iOS",
  "os_version": "8.1.1",
  "device_model": "iPad",
  "device_type": "tablet",
  "device_vendor": "Apple",
  "cpu_architecture": null,
  "continent_geoname_id": "6255149",
  "continent_code": "na",
  "continent_name": "North America",
  "country_geoname_id": "6252001",
  "country_code": "us",
  "country_name": "United States"
 } 

4.7 /report/conversions/csv
Get conversion report. Returns array of JSON objects.
Method URL path and query
GET /report/conversions/csv
For query parameters see 4.5 /report/conversions.
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/report/conversions/csv?limit=50&date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999Z'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'

4.8 /report/performance
Method URL path and query
GET /report/performance
Query fields (all are optional):
Parameter name Type Description
date Date (String) Date in ISO 8601 format ("2018-11-14T00:00:00.000Z"). Example of date range filter: "&date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999Z".
offer_id Number Offer ID
Report row fields:
Name Type Description
startDate Date (String) Start date in ISO 8601 format ("2018-11-14T00:00:00.000Z")
endDate Date (String) End date in ISO 8601 format ("2018-11-14T23:59:59.999Z")
offer_id Number Offer ID
offer String Offer title
impressions Number Impressions count
clicks Number Clicks count
conversions Number Conversions count
cost Number Payout, $
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/report/performance?date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999Z'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
[
  {
    "impressions": 0,
    "clicks": 593564,
    "conversions": 18912,
    "cost": 91723.2,
    "offer_id": 6,
    "offer": "War Robots",
    "startDate": "2018-11-14T00:00:00.000Z",
    "endDate": "2018-11-14T23:59:59.999Z"
  },
  {
    "impressions": 0,
    "clicks": 567188,
    "conversions": 9843,
    "cost": 41832.75,
    "offer_id": 4,
    "offer": "LiveMe - Video chat, new friends",
    "startDate": "2018-11-14T00:00:00.000Z",
    "endDate": "2018-11-14T23:59:59.999Z"
  },
  {
    "impressions": 0,
    "clicks": 564003,
    "conversions": 4163,
    "cost": 1665.2,
    "offer_id": 101,
    "offer": "AWOK.com",
    "startDate": "2018-11-14T00:00:00.000Z",
    "endDate": "2018-11-14T23:59:59.999Z"
  }
 ]

4.9 /report/performance/csv
Get offer performance report in CSV format.
Method URL path and query
GET /report/performance/csv
For query parameters see 4.8 /report/performance.
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/report/performance?date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'

4.10 /bills
Get company bills listing. Returns array of invoice objects in JSON format.
Method URL path and query
GET /bills
Query fields (all are optional):
Parameter name Type Description
date Date (String) Date in ISO 8601 format ("2018-11-14T00:00:00.000Z"). Example of date range filter: "&date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999Z". This field is alias to "start_date" field.
For bill fields see 4.11 /bill/:id.
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/bills?limit=50&date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999Z'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
[
  {
    "status": "paid",
    "conversions": 37,
    "payout": 46,
    "_id": 5,
    "affiliate_id": {
      "_id": 1,
      "company": "Publisher 1",
      "address": "",
      "country": "in",
      "city": ""
    },
    "start_date": "2018-10-19T12:32:37.894Z",
    "end_date": "2018-10-19T12:32:37.894Z",
    "activity": [
      {
        "conversions": 3,
        "payout": 23,
        "offer_title": "Adjustment",
        "offer_type": "cpa",
        "note": "23444"
      },
      {
        "conversions": 34,
        "payout": 23,
        "offer_title": "Adjustment",
        "offer_type": "cpa",
        "note": "23444"
      }
    ],
    "created": "2018-10-19T12:33:18.388Z",
    "updated": "2018-10-19T12:33:18.388Z"
  },
  {
    "status": "confirmed",
    "conversions": 3,
    "payout": 23,
    "_id": 3,
    "affiliate_id": {
      "_id": 1,
      "company": "Publisher 1",
      "address": "",
      "country": "in",
      "city": ""
    },
    "start_date": "2018-10-11T08:14:29.000Z",
    "end_date": "2018-10-19T08:14:29.301Z",
    "activity": [
      {
        "conversions": 3,
        "payout": 23,
        "offer_title": "Adjustment",
        "offer_type": "cpa",
        "note": "23444"
      }
    ],
    "created": "2018-10-19T08:14:54.624Z",
    "updated": "2018-10-19T12:31:59.039Z"
  }
 ]
 

4.11 /bill/:id
Get invoice data. Returns JSON object representing invoice record.
Method URL path and query Description
GET /bill/:id Where “:id” is bill ID.
Bill fields:
Name Type Description
id Number Bill ID
start_date Date (String) Bill period start
end_date Date (String) Bill period end
status String Bill status. One of:
-"confirmed"
-"paid"
conversions Number Conversions count
payout Number Bill total, $
activity Array Array of activity objects. Activity object fields:
-"conversions"
-"payout"
-"offer_title"
-"offer_type"
-"note"
affiliate_id Object Company data object with the following fields:
-"_id"
-"company"
-"address"
-"country"
-"city"
created Date (String) Bill creation date
updated Date (String) Bill modification date

4.12 /bills/csv
Get company bills listing CSV format.
Method URL path and query
GET /bills/csv
For query parameters see 4.10 /bills.
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/bills/csv?date>=2018-11-14T00:00:00.000Z&date<=2018-11-14T23:59:59.999Z'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'

4.13 /categories
Get offer category list.
Method URL path and query Description
GET /categories Returns array of categories
Category fields:
Name Type Description
key String Category key
text String Category text
Example request:
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/categories'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
[
  {
    "key": "android",
    "text": "Android"
  },
  {
    "key": "ios",
    "text": "iOS"
  },
  {
    "key": "non-incent",
    "text": "Non-incent"
  },
  {
    "key": "rewarded",
    "text": "Rewarded"
  },
  {
    "key": "music",
    "text": "Music"
  },
  {
    "key": "lifestyle",
    "text": "Lifestyle"
  },
  {
    "key": "education",
    "text": "Education"
  },
  {
    "key": "photo_&_video",
    "text": "Photo & Video"
  },
  {
    "key": "games",
    "text": "Games"
  },
  {
    "key": "news_magazines",
    "text": "News/Magazines"
  },
  {
    "key": "shopping",
    "text": "Shopping"
  },
  {
    "key": "sport_&_gambling",
    "text": "Sport & Gambling"
  },
  {
    "key": "travel",
    "text": "Travel"
  },
  {
    "key": "food_&_drink",
    "text": "Food & Drink"
  },
  {
    "key": "finance",
    "text": "Finance"
  }
 ] 

4.14 /countries
Get country list.
Method URL path and query Description
GET /countries Returns array of countries
Category fields:
Name Type Description
_id String Country code
name String Country name
Example request:
Example request:
curl -i 'https://api.affiliate.evertrack.io/v1/countries'
-H 'Authorization: Api-Key bb5d474ee609a5a2159f1f66d831680e'
Example response:
[
  {
    "_id": "us",
    "name": "United States"
  },
  {
    "_id": "ca",
    "name": "Canada"
  },
  {
    "_id": "gb",
    "name": "United Kingdom"
  }
 ] 
5. Code examples

5.1 JavaScript
JavaScript code examples using axios HTTP client library.
import axios from 'axios'
import moment from 'moment'

axios.defaults.baseURL = 'https://api.affiliate.evertrack.io/v1'
axios.defaults.headers.common['Authorization'] = 'Api-Key bb5d474ee609a5a2159f1f66d831680e'

// GET offers 
axios.get('/offers', {
  params: {
    limit: 50,
    skip: 50,
    sort: 'created',
    'date>': moment().startOf('week').toDate(),
    'date<': moment().endOf('day').toDate()
  }
}).then(response => {
  console.log(response.data)
  console.log('Total', response.headers['x-total-count'])
})

// GET one offer by id
axios.get('/offer/108').then(response => {
  console.log(response.data)
})

// GET offer approval (check approval for a particular offer)
axios.get('/offer/approval/108').then(response => {
  console.log(response.data)
})

// POST offer approval (request approval for a particular offer by id)
axios.post('/offer/approval/108').then(response => {
  console.log(response.data)
})


5.2 PHP
PHP example using guzzle:
 
use GuzzleHttpClient;

$client = new Client([
    'base_uri' => 'https://api.affiliate.evertrack.io/v1',
    'headers' => ['Authorization' => 'Api-Key bb5d474ee609a5a2159f1f66d831680e']
]);

// GET offers
$response = $client->get('/offers', [
  'limit' => 100,
  'sort' => 'type_id',
  'type_id' => 'cpa',
  'categories' => 'android'
]);
echo $response->getBody();

// GET one offer by id
$response = $client->get('/offer/108');
echo $response->getBody();

// GET offer approval (check approval status for a particular offer)
$response = $client->get('/offer/approval/108');
echo $response->getBody();

// POST offer approval (request approval for a particular offer by id)
$response = $client->post('/offer/approval/108');
echo $response->getBody();

2018 © Evertrack.All rights reserved.
Terms and Conditions.